public class DriverConnector extends BaseConnector implements org.exoplatform.services.rest.resource.ResourceContainer
| Modifier and Type | Field and Description |
|---|---|
static String |
FILE_TYPE_ALL
The Constant FILE_TYPE_MEDIAS.
|
static String |
FILE_TYPE_DMSDOC
The Constant FILE_TYPE_DMSDOC.
|
static String |
FILE_TYPE_IMAGE
The Constant FILE_TYPE_IMAGE.
|
static String |
FILE_TYPE_MEDIAS
The Constant FILE_TYPE_MEDIAS.
|
static String |
FILE_TYPE_SIMPLE_IMAGE
The Constant FILE_TYPE_SIMPLE_IMAGE for JPG/JPEG, PNG and GIF.
|
static String |
FILE_TYPE_WEBCONTENT
The Constant FILE_TYPE_WEBCONTENT.
|
static String[] |
IMAGE_MIMETYPE
The Constant MEDIA_MIMETYPE.
|
static String[] |
MEDIA_MIMETYPE
The Constant MEDIA_MIMETYPE.
|
static String[] |
SIMPLE_IMAGE_MIMETYPE
The Constant MEDIA_MIMETYPE.
|
static String |
TYPE_CONTENT |
static String |
TYPE_EDITOR |
static String |
TYPE_FOLDER |
fileHandler, fileUploadHandler, folderHandler, IF_MODIFIED_SINCE_DATE_FORMAT, LAST_MODIFIED_PROPERTY, linkManager, livePortalManagerService, repositoryService, votingService, webSchemaConfigService| Constructor and Description |
|---|
DriverConnector(org.exoplatform.container.xml.InitParams params,
DocumentService documentService)
Instantiates a new driver connector.
|
| Modifier and Type | Method and Description |
|---|---|
javax.ws.rs.core.Response |
checkExistence(String repositoryName,
String workspaceName,
String driverName,
String currentFolder,
String currentPortal,
String language,
String fileName)
Check the status of uploading a file, such as aborting, deleting or progressing the file.
|
javax.ws.rs.core.Response |
checkUploadAvailable()
Checks if the drive can upload a new file.
|
javax.ws.rs.core.Response |
cleanName(String fileName)
Clean file name
|
protected javax.ws.rs.core.Response |
createProcessUploadResponse(String workspaceName,
javax.jcr.Node currentFolderNode,
String siteName,
String userId,
String jcrPath,
String action,
String language,
String fileName,
String uploadId,
String existenceAction) |
protected String |
getContentStorageType()
Gets the content storage type.
|
javax.ws.rs.core.Response |
getDriveOfNode(String nodePath)
Returns the driveName according to the nodePath param which is composed by the driveHomePath and the path of the node
|
javax.ws.rs.core.Response |
getDrivers(String lang)
Returns a list of drives for the current user.
|
String |
getDriveTitle(String name) |
javax.ws.rs.core.Response |
getFoldersAndFiles(String driverName,
String currentFolder,
String currentPortal,
String repositoryName,
String workspaceName,
String filterBy,
String type)
Returns all folders and files in a given location.
|
String |
getGroupLabel(String name) |
String |
getGroupLabel(String groupId,
boolean isFull) |
int |
getLimitSize()
Gets the maximum size of the uploaded file.
|
int |
getMaxUploadCount()
Gets the maximum number of files uploaded from the client side.
|
javax.jcr.Node |
getNode(String workspace,
String absPath) |
protected javax.jcr.Node |
getRootContentStorage(javax.jcr.Node node)
Gets the root content storage.
|
javax.ws.rs.core.Response |
processUpload(String repositoryName,
String workspaceName,
String driverName,
String currentFolder,
String currentPortal,
String userId,
String jcrPath,
String action,
String language,
String fileName,
String uploadId,
String existenceAction,
String srcAction)
Controls the process of uploading a file, such as aborting, deleting or progressing the file.
|
javax.ws.rs.core.Response |
uploadFile(javax.servlet.http.HttpServletRequest servletRequest,
String uploadId)
Uploads a file.
|
buildXMLResponseCommon, buildXMLResponseForContentStorage, buildXMLResponseForPortal, buildXMLResponseForRoot, buildXMLResponseOnExpand, getContent, getContent, getCorrectContentStorage, getCurrentPortalNode, getResponse, getWebContentpublic static final String FILE_TYPE_WEBCONTENT
public static final String FILE_TYPE_DMSDOC
public static final String FILE_TYPE_MEDIAS
public static final String FILE_TYPE_ALL
public static final String FILE_TYPE_IMAGE
public static final String FILE_TYPE_SIMPLE_IMAGE
public static final String[] MEDIA_MIMETYPE
public static final String[] IMAGE_MIMETYPE
public static final String[] SIMPLE_IMAGE_MIMETYPE
public static final String TYPE_FOLDER
public static final String TYPE_EDITOR
public static final String TYPE_CONTENT
public DriverConnector(org.exoplatform.container.xml.InitParams params,
DocumentService documentService)
params - The init parameters.public int getLimitSize()
public int getMaxUploadCount()
@RolesAllowed(value="users") public javax.ws.rs.core.Response getDriveOfNode(String nodePath) throws Exception
nodePath - the path of the webContentException@RolesAllowed(value="users") public javax.ws.rs.core.Response getDrivers(String lang) throws Exception
lang - The language of the drive name.Exception - The exception@RolesAllowed(value="users") public javax.ws.rs.core.Response getFoldersAndFiles(String driverName, String currentFolder, String currentPortal, String repositoryName, String workspaceName, String filterBy, String type) throws Exception
driverName - The drive name.currentFolder - The current folder.currentPortal - The current portal.repositoryName - The repository name.workspaceName - The workspace name.filterBy - The type of filter.Exception - The exception@RolesAllowed(value="users") public javax.ws.rs.core.Response checkUploadAvailable() throws Exception
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 file.Exception - The exception@RolesAllowed(value="users") public javax.ws.rs.core.Response checkExistence(String repositoryName, String workspaceName, String driverName, String currentFolder, String currentPortal, String language, String fileName) throws Exception
repositoryName - The repository name.workspaceName - The workspace name.driverName - The drive name.currentFolder - The current folder.currentPortal - The portal name.language - The language file.fileName - The file name.Exception - The exception@RolesAllowed(value="users") public javax.ws.rs.core.Response cleanName(String fileName) throws Exception
fileName - original file nameException@RolesAllowed(value="users") public javax.ws.rs.core.Response processUpload(String repositoryName, String workspaceName, String driverName, String currentFolder, String currentPortal, String userId, String jcrPath, String action, String language, String fileName, String uploadId, String existenceAction, String srcAction) throws Exception
repositoryName - The repository name.workspaceName - The workspace name.driverName - The drive name.currentFolder - The current folder.currentPortal - The current portal.userId - The user identity.jcrPath - The path of the file.action - The action.language - The language.fileName - The file name.uploadId - The Id of upload.existenceAction - Checks if an action exists or not.Exception - The exceptionprotected String getContentStorageType() throws Exception
BaseConnectorgetContentStorageType in class BaseConnectorException - the exceptionprotected javax.jcr.Node getRootContentStorage(javax.jcr.Node node)
throws Exception
BaseConnectorgetRootContentStorage in class BaseConnectornode - the nodeException - the exceptionprotected javax.ws.rs.core.Response createProcessUploadResponse(String workspaceName, javax.jcr.Node currentFolderNode, String siteName, String userId, String jcrPath, String action, String language, String fileName, String uploadId, String existenceAction) throws Exception
workspaceName - The workspace name.currentFolderNode - The current folder.siteName - The portal name.userId - The user Id.jcrPath - The path of the file.action - The action.language - The language.fileName - The file name.uploadId - The Id of upload.existenceAction - Checks if an action exists.Exception - the exceptionCopyright © 2003–2019 eXo Platform SAS. All rights reserved.