use of org.nuxeo.drive.service.FileSystemItemManager in project nuxeo-drive-server by nuxeo.
the class NuxeoDriveScrollDescendants method run.
@OperationMethod
public Blob run() throws IOException {
FileSystemItemManager fileSystemItemManager = Framework.getService(FileSystemItemManager.class);
ScrollFileSystemItemList descendants = fileSystemItemManager.scrollDescendants(id, ctx.getPrincipal(), scrollId, batchSize, keepAlive);
return writeJSONBlob(descendants);
}
use of org.nuxeo.drive.service.FileSystemItemManager in project nuxeo-drive-server by nuxeo.
the class NuxeoDriveUpdateFile method run.
@OperationMethod
public Blob run(Blob blob) throws ParseException, IOException {
FileSystemItemManager fileSystemItemManager = Framework.getService(FileSystemItemManager.class);
NuxeoDriveOperationHelper.normalizeMimeTypeAndEncoding(blob);
FileItem fileItem;
if (parentId == null) {
fileItem = fileSystemItemManager.updateFile(id, blob, ctx.getPrincipal());
} else {
fileItem = fileSystemItemManager.updateFile(id, parentId, blob, ctx.getPrincipal());
}
return Blobs.createJSONBlobFromValue(fileItem);
}
use of org.nuxeo.drive.service.FileSystemItemManager in project nuxeo-drive-server by nuxeo.
the class NuxeoDriveGetFileSystemItem method run.
@OperationMethod
public Blob run() throws IOException {
FileSystemItemManager fileSystemItemManager = Framework.getService(FileSystemItemManager.class);
FileSystemItem fsItem;
if (parentId == null) {
fsItem = fileSystemItemManager.getFileSystemItemById(id, ctx.getPrincipal());
} else {
fsItem = fileSystemItemManager.getFileSystemItemById(id, parentId, ctx.getPrincipal());
}
return Blobs.createJSONBlobFromValue(fsItem);
}
use of org.nuxeo.drive.service.FileSystemItemManager in project nuxeo-drive-server by nuxeo.
the class NuxeoDriveGetTopLevelChildren method run.
@OperationMethod
public Blob run() throws IOException {
FileSystemItemManager fileSystemItemManager = Framework.getService(FileSystemItemManager.class);
List<FileSystemItem> children = fileSystemItemManager.getTopLevelChildren(ctx.getPrincipal());
return Blobs.createJSONBlobFromValue(children);
}
use of org.nuxeo.drive.service.FileSystemItemManager in project nuxeo-drive-server by nuxeo.
the class NuxeoDriveCreateFolder method run.
@OperationMethod
public Blob run() throws IOException {
FileSystemItemManager fileSystemItemManager = Framework.getService(FileSystemItemManager.class);
FolderItem folderItem = fileSystemItemManager.createFolder(parentId, name, ctx.getPrincipal(), overwrite);
return Blobs.createJSONBlobFromValue(folderItem);
}
Aggregations