As we transition to the new Hyland Community, some post links may be temporarily disrupted as we finalize redirects. We apologize for the inconvenience and are working to resolve this as quickly as possible. Details.
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); } }