// PropertyIds
// .
// CMIS_BASE_TYPE_ID
// ;
String rootFolderId = createFolder();
ObjectGenerator gen = new ObjectGenerator(fFactory, fNavSvc, fObjSvc, fRepSvc, fRepositoryId);
// Set the type id for all created documents:
gen.setDocumentTypeId(InMemoryDocumentTypeDefinition.getRootDocumentType().getId());
// Set the type id for all created folders:
gen.setNumberOfDocumentsToCreatePerFolder(1); // create one document in
// each folder
gen.createFolderHierachy(3, 2, rootFolderId);
gen.setFolderTypeId(InMemoryFolderTypeDefinition.getRootFolderType().getId());
gen.dumpFolder(fRootFolderId, propertyFilter);
Holder<String> holder = new Holder<String>();
String sourceIdToMove = gen.getFolderId(rootFolderId, 2, 1);
if (!isFolder) {
sourceIdToMove = gen.getDocumentId(sourceIdToMove, 0);
}
holder.setValue(sourceIdToMove); // "/Folder_1/My Folder 0/My Folder 1");
String sourceFolderId = getSourceFolder(sourceIdToMove);
log.info("Id before moveObject: " + holder.getValue());
fObjSvc.moveObject(fRepositoryId, holder, rootFolderId, sourceFolderId, null);
log.info("Id after moveObject: " + holder.getValue());
gen.dumpFolder(fRootFolderId, propertyFilter);
List<ObjectParentData> result = fNavSvc.getObjectParents(fRepositoryId, holder.getValue(), null, Boolean.FALSE,
IncludeRelationships.NONE, null, Boolean.FALSE, null);
// check that new parent is set correctly
String newParentId = result.get(0).getObject().getId();