mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-21 18:09:20 +00:00
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:
@@ -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());
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user