01-26-2010 08:31 AM
public void updateFolderName (String folderPath, String newFoldername){
UpdateResult [] result = null;
final Reference reference = new Reference(STORE, null, folderPath);
final Predicate p = new Predicate(new Reference[]{reference},null,null);
final CMLUpdate updateFolder = new CMLUpdate( new NamedValue[]{Utils.createNamedValue(Constants.PROP_NAME, newFoldername),p,null);
CML cml = new CML();
cml.setUpdate(new CMLUpdate[]{updateFolder});
try {
result = WebServiceFactory.getRepositoryService().update(cml);
//getting the old path!!
System.out.println("path: " + result[0].getSource().getPath());
} catch ( RepositoryFault rf ) {
rf.printStackTrace();
} catch ( RemoteException re ) {
re.printStackTrace();
}
}
01-28-2010 07:47 AM
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.