06-26-2006 02:55 PM
08-15-2006 04:17 AM
public Reference moveFolder(Store store,String sourceUuid, String parentUuid,String name) throws OasisException{
ParentReference folderParentRef = new ParentReference();
folderParentRef.setStore(store);
folderParentRef.setUuid(parentUuid);
folderParentRef.setAssociationType(Constants.ASSOC_CHILDREN);
folderParentRef.setChildName(Constants.ASSOC_CHILDREN);
// Create Reference
Reference sourceRef = new Reference();
sourceRef.setStore(store);
sourceRef.setUuid(sourceUuid);
CMLMove moveFolder = new CMLMove(
folderParentRef, // to
parentUuid, // to_id
Constants.TYPE_FOLDER, // associationType
name, // childName
new Predicate(new Reference[]{sourceRef}, null, null), // where
null); // where_id
// Create command
CML cml = new CML();
cml.setMove(new CMLMove[]{moveFolder});
// Process command
RepositoryServiceSoapBindingStub repositoryService = WebServiceFactory.getRepositoryService();
try {
UpdateResult[] updateResult = repositoryService.update(cml);
return null;
//return updateResult[0].getDestination();
} catch (RepositoryFault e) {
throw new OasisException("Could not move folder",e);
} catch (RemoteException e) {
throw new OasisException("Could not move folder",e);
}
}
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.