Merged HEAD (5.2) to 5.2.N (5.2.1)

126538 jkaabimofrad: Merged FILE-FOLDER-API (5.2.0) to HEAD (5.2)
      123316 jvonka: Nodes (FileFolder) API - add optional include allowableOperations 
      RA-770


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/BRANCHES/DEV/5.2.N/root@126882 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Ancuta Morarasu
2016-05-11 12:04:10 +00:00
parent fbd2ca5698
commit 543d2bbf1c
7 changed files with 205 additions and 18 deletions

View File

@@ -63,6 +63,8 @@ public class Node
protected ContentInfo contentInfo;
protected List<String> allowableOperations;
public Node()
{
}
@@ -207,6 +209,16 @@ public class Node
return this.contentInfo;
}
public List<String> getAllowableOperations()
{
return allowableOperations;
}
public void setAllowableOperations(List<String> allowableOperations)
{
this.allowableOperations = allowableOperations;
}
public void expected(Object o)
{
Node other = (Node) o;
@@ -310,5 +322,19 @@ public class Node
{
assertNull(other.getContent());
}
if (allowableOperations != null)
{
assertNotNull(other.getAllowableOperations());
assertEquals("Expected: "+allowableOperations+", actual: "+other.getAllowableOperations(), allowableOperations.size(), other.getAllowableOperations().size());
for (String allowableOperation : allowableOperations)
{
assertTrue(other.getAllowableOperations().contains(allowableOperation));
}
}
else
{
assertNull(other.getAllowableOperations());
}
}
}