use of org.nuxeo.ecm.automation.InvalidOperationException in project nuxeo-drive-server by nuxeo.
the class NuxeoDriveRename method run.
@OperationMethod
public Blob run() throws InvalidOperationException, IOException {
FileSystemItemManager fileSystemItemManager = Framework.getService(FileSystemItemManager.class);
FileSystemItem fsItem;
try {
fsItem = fileSystemItemManager.rename(id, name, ctx.getPrincipal());
} catch (UnsupportedOperationException e) {
throw new InvalidOperationException(e);
}
return Blobs.createJSONBlobFromValue(fsItem);
}
use of org.nuxeo.ecm.automation.InvalidOperationException in project nuxeo-drive-server by nuxeo.
the class NuxeoDriveMove method run.
@OperationMethod
public Blob run() throws InvalidOperationException, IOException {
FileSystemItemManager fileSystemItemManager = Framework.getService(FileSystemItemManager.class);
FileSystemItem fsItem;
try {
fsItem = fileSystemItemManager.move(srcId, destId, ctx.getPrincipal());
} catch (UnsupportedOperationException e) {
throw new InvalidOperationException(e);
}
return Blobs.createJSONBlobFromValue(fsItem);
}
Aggregations