assertAllowableAction(rootFolderObject.getAllowableActions(), Action.CAN_GET_OBJECT_PARENTS, false);
ObjectData folderObject = getObject(testRootFolder);
String path = getPath(folderObject);
ObjectInFolderList children = getBinding().getNavigationService().getChildren(repId, testRootFolder, "*", null,
Boolean.TRUE, IncludeRelationships.BOTH, null, Boolean.TRUE, null, null, null);
assertNotNull(children);
assertNotNull(children.hasMoreItems());
if (supportsDescendants()) {
List<ObjectInFolderContainer> desc = getBinding().getNavigationService().getDescendants(repId,
testRootFolder, BigInteger.valueOf(2), "*", Boolean.TRUE, IncludeRelationships.BOTH, null,
Boolean.TRUE, null);
assertNotNull(desc);
Tools.print("Descendants", desc);
assertContainer(desc, 5);
} else {
warning("Descendants not supported!");
}
if (supportsFolderTree()) {
List<ObjectInFolderContainer> tree = getBinding().getNavigationService().getFolderTree(repId,
testRootFolder, BigInteger.valueOf(2), "*", Boolean.TRUE, IncludeRelationships.BOTH, null,
Boolean.TRUE, null);
assertNotNull(tree);
Tools.print("Tree", tree);
assertContainer(tree, 5);
} else {
warning("Folder Tree not supported!");
}
for (ObjectInFolderData object : children.getObjects()) {
assertNotNull(object.getObject());
assertNotNull(object.getObject().getId());
assertNotNull(object.getObject().getBaseTypeId());
ObjectData object2 = getObject(object.getObject().getId());
assertNotNull(object2.getId());
assertEquals(object.getObject().getId(), object2.getId());
assertEquals(object.getObject().getProperties(), object2.getProperties());
ObjectData object3 = getObjectByPath((path.equals("/") ? "/" : path + "/") + object.getPathSegment());
assertNotNull(object3);
assertNotNull(object3.getId());
assertEquals(object.getObject().getId(), object3.getId());
assertEquals(object.getObject().getProperties(), object3.getProperties());
checkObject(object.getObject().getId());
if (object.getObject().getBaseTypeId() == BaseTypeId.CMIS_FOLDER) {
ObjectInFolderList children2 = getBinding().getNavigationService().getChildren(repId,
object.getObject().getId(), null, null, Boolean.TRUE, IncludeRelationships.BOTH, null,
Boolean.TRUE, null, null, null);
assertNotNull(children2);
} else if (object.getObject().getBaseTypeId() == BaseTypeId.CMIS_DOCUMENT) {
checkObjectVersions(object.getObject().getId());