public class ManageDocumentService extends Object implements org.exoplatform.services.rest.resource.ResourceContainer
| Modifier and Type | Field and Description |
|---|---|
static String |
EXO_DOCUMENTFOLDER |
static String |
EXO_FAVOURITE_FOLDER |
static String |
EXO_MUSICFOLDER |
static String |
EXO_PICTUREFOLDER |
static String |
EXO_PRIMARYTYPE |
static String |
EXO_SEARCHFOLDER |
static String |
EXO_SYMLINK |
static String |
EXO_TRASH_FOLDER |
static String |
EXO_VIDEOFOLDER |
protected FileUploadHandler |
fileUploadHandler
The file upload handler.
|
protected static String |
IF_MODIFIED_SINCE_DATE_FORMAT
The Constant IF_MODIFIED_SINCE_DATE_FORMAT.
|
protected static String |
LAST_MODIFIED_PROPERTY
The Constant LAST_MODIFIED_PROPERTY.
|
static String |
NT_FOLDER |
static String |
NT_UNSTRUCTURED |
static String[] |
SPECIFIC_FOLDERS |
| Constructor and Description |
|---|
ManageDocumentService(ManageDriveService manageDriveService,
LinkManager linkManager,
org.exoplatform.container.xml.InitParams params)
Instantiates a document service.
|
| Modifier and Type | Method and Description |
|---|---|
javax.ws.rs.core.Response |
createFolder(String driveName,
String workspaceName,
String currentFolder,
String folderName)
Creates a new folder and returns its information.
|
protected javax.ws.rs.core.Response |
createProcessUploadResponse(String workspaceName,
javax.jcr.Node currentFolderNode,
String siteName,
String userId,
String action,
String language,
String fileName,
String uploadId,
String existenceAction)
Creates the process upload response.
|
javax.ws.rs.core.Response |
deleteFolderOrFile(String driveName,
String workspaceName,
String itemPath)
Deletes a folder/file.
|
javax.ws.rs.core.Response |
getDrives(String driveType,
String showPrivate,
String showPersonal)
Gets all drives by type (General, Group or Personal).
|
javax.ws.rs.core.Response |
getFoldersAndFiles(String driveName,
String workspaceName,
String currentFolder,
String showHidden)
Gets all folders and files which can be viewed by the current user.
|
static String |
getNodeTypeIcon(javax.jcr.Node node) |
javax.ws.rs.core.Response |
processUpload(String workspaceName,
String driveName,
String currentFolder,
String currentPortal,
String action,
String language,
String fileName,
String uploadId,
String existenceAction)
Returns information about the upload status of a file, such as the upload percentage, the file name, and more.
|
javax.ws.rs.core.Response |
uploadFile(javax.servlet.http.HttpServletRequest servletRequest,
String uploadId)
Uploads a file to the server.
|
protected static final String IF_MODIFIED_SINCE_DATE_FORMAT
protected static final String LAST_MODIFIED_PROPERTY
protected FileUploadHandler fileUploadHandler
public static final String EXO_MUSICFOLDER
public static final String EXO_VIDEOFOLDER
public static final String EXO_PICTUREFOLDER
public static final String EXO_DOCUMENTFOLDER
public static final String EXO_SEARCHFOLDER
public static final String EXO_SYMLINK
public static final String EXO_PRIMARYTYPE
public static final String EXO_TRASH_FOLDER
public static final String EXO_FAVOURITE_FOLDER
public static final String NT_UNSTRUCTURED
public static final String NT_FOLDER
public static final String[] SPECIFIC_FOLDERS
public ManageDocumentService(ManageDriveService manageDriveService, LinkManager linkManager, org.exoplatform.container.xml.InitParams params)
manageDriveService - Instantiates a drive manager service.linkManager - Instantiates a link manager service.@RolesAllowed(value="users") public javax.ws.rs.core.Response getDrives(String driveType, String showPrivate, String showPersonal) throws Exception
driveType - The types of drive (General, Group, or Personal).showPrivate - Shows the Private drive or not. The default value is false.showPersonal - Shows the Personal drive or not. The default value is false.Document which contains the drives.Exception - The exception@RolesAllowed(value="users") public javax.ws.rs.core.Response getFoldersAndFiles(String driveName, String workspaceName, String currentFolder, String showHidden)
driveName - The drive name.workspaceName - The workspace name.currentFolder - The path to the folder to achieve its folders and files.showHidden - Shows the hidden items or not. The default value is false.Document which contains the folders and files.@RolesAllowed(value="users") public javax.ws.rs.core.Response deleteFolderOrFile(String driveName, String workspaceName, String itemPath)
driveName - The drive name.workspaceName - The workspace name.itemPath - The path to the folder/file.Response Returns the status of an item which has been deleted.@RolesAllowed(value="users") public javax.ws.rs.core.Response createFolder(String driveName, String workspaceName, String currentFolder, String folderName) throws Exception
driveName - The drive name.workspaceName - The workspace name.currentFolder - The path to the folder where a child folder is added.folderName - The folder name.Document which contains the created folder.Exception - The exception@RolesAllowed(value="users") public javax.ws.rs.core.Response uploadFile(@Context javax.servlet.http.HttpServletRequest servletRequest, String uploadId) throws Exception
uploadId - The Id of the uploaded resource.servletRequest - The request.Exception - The exception@RolesAllowed(value="users") public javax.ws.rs.core.Response processUpload(String workspaceName, String driveName, String currentFolder, String currentPortal, String action, String language, String fileName, String uploadId, String existenceAction) throws Exception
workspaceName - The workspace name.driveName - The drive name.currentFolder - The path to the current folder.currentPortal - The name of the current site.action - The action to perform (saving, processing, and more).language - The language of the user.fileName - The name of the file.uploadId - The Id of the uploaded resource.Exception - The exceptionpublic static String getNodeTypeIcon(javax.jcr.Node node) throws javax.jcr.RepositoryException
javax.jcr.RepositoryExceptionprotected javax.ws.rs.core.Response createProcessUploadResponse(String workspaceName, javax.jcr.Node currentFolderNode, String siteName, String userId, String action, String language, String fileName, String uploadId, String existenceAction) throws Exception
workspaceName - the workspace name.userId - The user Id.action - The action.language - The language.fileName - The file name.uploadId - The upload Id.siteName - The portal name.currentFolderNode - The current folder node.Exception - the exceptionCopyright © 2003–2019 eXo Platform SAS. All rights reserved.