public class FileUploadHandler extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
ABORT_ACTION
The Constant ABORT_ACTION.
|
static String |
CHECK_EXIST
The Constant CHECK_EXIST.
|
static String |
CREATE_VERSION |
static String |
DELETE_ACTION
The Constant DELETE_ACTION.
|
static String |
KEEP_BOTH
The Constant KEEP_BOTH.
|
static String |
POST_CREATE_CONTENT_EVENT |
static String |
PROGRESS_ACTION
The Constant PROGRESS_ACTION.
|
static String |
REPLACE
The Constant REPLACE.
|
static String |
SAVE_ACTION
The Constant SAVE_ACTION.
|
static String |
SAVE_NEW_VERSION_ACTION
The Constant SAVE_NEW_VERSION_ACTION.
|
static String |
UPLOAD_ACTION
The Constant UPLOAD_ACTION.
|
| Constructor and Description |
|---|
FileUploadHandler()
Instantiates a new file upload handler.
|
| Modifier and Type | Method and Description |
|---|---|
javax.ws.rs.core.Response |
checkExistence(javax.jcr.Node parent,
String fileName)
checks if file already existed in parent folder
|
javax.ws.rs.core.Response |
checkStatus(String uploadId,
String language)
Check status of uploaded file.
|
javax.ws.rs.core.Response |
cleanName(String fileName)
Clean name using Transliterator
|
javax.ws.rs.core.Response |
control(String uploadId,
String action)
Control.
|
long |
getUploadingFileCount()
get number of files uploading
|
boolean |
isDocumentNodeType(javax.jcr.Node node) |
javax.ws.rs.core.Response |
saveAsNTFile(javax.jcr.Node parent,
String uploadId,
String fileName,
String language,
String siteName,
String userId)
Save as nt file.
|
javax.ws.rs.core.Response |
saveAsNTFile(javax.jcr.Node parent,
String uploadId,
String fileName,
String language,
String siteName,
String userId,
String existenceAction)
Save as nt file.
|
javax.ws.rs.core.Response |
saveAsNTFile(javax.jcr.Node parent,
String uploadId,
String fileName,
String language,
String siteName,
String userId,
String existenceAction,
boolean isNewVersion)
Save as nt file.
|
javax.ws.rs.core.Response |
upload(javax.servlet.http.HttpServletRequest servletRequest,
String uploadId,
Integer limit)
Upload
|
public static final String UPLOAD_ACTION
public static final String PROGRESS_ACTION
public static final String ABORT_ACTION
public static final String DELETE_ACTION
public static final String SAVE_ACTION
public static final String SAVE_NEW_VERSION_ACTION
public static final String CHECK_EXIST
public static final String REPLACE
public static final String CREATE_VERSION
public static final String KEEP_BOTH
public static final String POST_CREATE_CONTENT_EVENT
public FileUploadHandler()
public javax.ws.rs.core.Response upload(javax.servlet.http.HttpServletRequest servletRequest,
String uploadId,
Integer limit)
throws Exception
servletRequest - The request to upload fileuploadId - Upload Idlimit - Limit size of upload fileExceptionpublic javax.ws.rs.core.Response checkStatus(String uploadId, String language) throws Exception
uploadId - upload IDlanguage - language for getting messageExceptionpublic javax.ws.rs.core.Response control(String uploadId, String action) throws Exception
uploadId - the upload idaction - the actionException - the exceptionpublic javax.ws.rs.core.Response checkExistence(javax.jcr.Node parent,
String fileName)
throws Exception
parent - the parentfileName - the file nameException - the exceptionpublic javax.ws.rs.core.Response cleanName(String fileName) throws Exception
fileName - original file nameExceptionpublic javax.ws.rs.core.Response saveAsNTFile(javax.jcr.Node parent,
String uploadId,
String fileName,
String language,
String siteName,
String userId)
throws Exception
parent - the parentuploadId - the upload idfileName - the file namelanguage - the languageException - the exceptionpublic javax.ws.rs.core.Response saveAsNTFile(javax.jcr.Node parent,
String uploadId,
String fileName,
String language,
String siteName,
String userId,
String existenceAction)
throws Exception
parent - the parentuploadId - the upload idfileName - the file namelanguage - the languageException - the exceptionpublic javax.ws.rs.core.Response saveAsNTFile(javax.jcr.Node parent,
String uploadId,
String fileName,
String language,
String siteName,
String userId,
String existenceAction,
boolean isNewVersion)
throws Exception
parent - the parentuploadId - the upload idfileName - the file namelanguage - the languageException - the exceptionpublic boolean isDocumentNodeType(javax.jcr.Node node)
throws Exception
Exceptionpublic long getUploadingFileCount()
Copyright © 2003–2019 eXo Platform SAS. All rights reserved.