public class BatchUploadObject extends AbstractResource<ResourceTypeImpl>
Provides the APIs listed below:
initBatch()
upload(HttpServletRequest, String, String)
getBatchInfo(String)
getFileInfo(String, String)
execute(String, String, ExecutionRequest)
execute(String, String, String, ExecutionRequest)
cancel(String)
removeFile(String, String)
Modifier and Type | Class and Description |
---|---|
class |
BatchUploadObject.ResumeIncompleteStatusType |
Modifier and Type | Field and Description |
---|---|
static String |
FILE_SIZE |
static String |
KEY |
protected static org.apache.commons.logging.Log |
log |
static String |
MD5 |
static String |
MIMETYPE |
static String |
NAME |
protected static String |
OPERATION_ID |
protected javax.servlet.http.HttpServletRequest |
request |
protected static String |
REQUEST_BATCH_ID |
protected static String |
REQUEST_FILE_IDX |
protected static String |
REQUEST_HANDLER_NAME |
protected javax.servlet.http.HttpServletResponse |
response |
static String |
UPLOAD_TYPE_CHUNKED |
static String |
UPLOAD_TYPE_NORMAL |
Constructor and Description |
---|
BatchUploadObject() |
Modifier and Type | Method and Description |
---|---|
protected void |
addBlob(String uploadType,
String batchId,
String fileIdx,
Blob blob,
String fileName,
String mimeType,
long uploadedSize,
int chunkCount,
int uploadChunkIndex,
long fileSize) |
protected javax.ws.rs.core.Response |
buildEmptyResponse(javax.ws.rs.core.Response.StatusType status) |
protected javax.ws.rs.core.Response |
buildHTMLResponse(javax.ws.rs.core.Response.StatusType status,
String message) |
protected javax.ws.rs.core.Response |
buildJSONResponse(javax.ws.rs.core.Response.StatusType status,
String message) |
protected javax.ws.rs.core.Response |
buildResponse(javax.ws.rs.core.Response.StatusType status,
Object object) |
protected javax.ws.rs.core.Response |
buildResponse(javax.ws.rs.core.Response.StatusType status,
Object object,
boolean html) |
protected javax.ws.rs.core.Response |
buildResponse(javax.ws.rs.core.Response.StatusType status,
String type,
String message) |
protected javax.ws.rs.core.Response |
buildTextResponse(javax.ws.rs.core.Response.StatusType status,
String message) |
javax.ws.rs.core.Response |
cancel(String batchId) |
javax.ws.rs.core.Response |
createNewBatch(String handlerName) |
Object |
execute(String batchId,
String operationId,
ExecutionRequest xreq) |
Object |
execute(String batchId,
String fileIdx,
String operationId,
ExecutionRequest xreq) |
protected Object |
executeBatch(String batchId,
String fileIdx,
String operationId,
javax.servlet.http.HttpServletRequest request,
ExecutionRequest xreq) |
javax.ws.rs.core.Response |
getBatchExtraInfo(String batchId) |
javax.ws.rs.core.Response |
getBatchInfo(String batchId) |
protected Map<String,Object> |
getFileInfo(BatchFileEntry fileEntry) |
javax.ws.rs.core.Response |
getFileInfo(String batchId,
String fileIdx) |
javax.ws.rs.core.Response |
getHandlerInfo(String handlerName) |
protected long |
getUploadedSize(javax.servlet.http.HttpServletRequest request) |
javax.ws.rs.core.Response |
handlers() |
javax.ws.rs.core.Response |
initBatch() |
protected Map<String,String> |
mapWithName(String name) |
javax.ws.rs.core.Response |
removeFile(String batchId,
String fileIdx) |
javax.ws.rs.core.Response |
upload(javax.servlet.http.HttpServletRequest request,
String batchId,
String fileIdx) |
javax.ws.rs.core.Response |
uploadCompleted(String batchId,
String fileIdx,
String body) |
protected javax.ws.rs.core.Response |
uploadNoTransaction(javax.servlet.http.HttpServletRequest request,
String batchId,
String fileIdx) |
checkGuard, dispose, getActiveAdapter, getAdapter, getContext, getFacets, getLinks, getModule, getName, getNext, getNextSegment, getPath, getPrevious, getTemplate, getTrailingPath, getType, getURL, getView, hasFacet, initialize, initialize, isAdapter, isInstanceOf, isRoot, newAdapter, newObject, redirect, setNext, setPrevious, setRoot, toString
protected static final org.apache.commons.logging.Log log
protected static final String REQUEST_BATCH_ID
protected static final String REQUEST_FILE_IDX
protected static final String OPERATION_ID
protected static final String REQUEST_HANDLER_NAME
public static final String UPLOAD_TYPE_NORMAL
public static final String UPLOAD_TYPE_CHUNKED
public static final String KEY
public static final String NAME
public static final String MIMETYPE
public static final String FILE_SIZE
public static final String MD5
@Context protected javax.servlet.http.HttpServletRequest request
@Context protected javax.servlet.http.HttpServletResponse response
public BatchUploadObject()
protected Map<String,String> mapWithName(String name)
public javax.ws.rs.core.Response handlers() throws IOException
IOException
public javax.ws.rs.core.Response getHandlerInfo(String handlerName) throws IOException
IOException
public javax.ws.rs.core.Response createNewBatch(String handlerName) throws IOException
IOException
public javax.ws.rs.core.Response initBatch() throws IOException
IOException
public javax.ws.rs.core.Response upload(@Context javax.servlet.http.HttpServletRequest request, String batchId, String fileIdx) throws IOException
IOException
protected javax.ws.rs.core.Response uploadNoTransaction(@Context javax.servlet.http.HttpServletRequest request, String batchId, String fileIdx) throws IOException
IOException
protected long getUploadedSize(javax.servlet.http.HttpServletRequest request)
protected void addBlob(String uploadType, String batchId, String fileIdx, Blob blob, String fileName, String mimeType, long uploadedSize, int chunkCount, int uploadChunkIndex, long fileSize)
public javax.ws.rs.core.Response getBatchInfo(String batchId) throws IOException
IOException
public javax.ws.rs.core.Response getFileInfo(String batchId, String fileIdx) throws IOException
IOException
public javax.ws.rs.core.Response removeFile(String batchId, String fileIdx)
public Object execute(String batchId, String operationId, ExecutionRequest xreq)
public Object execute(String batchId, String fileIdx, String operationId, ExecutionRequest xreq)
public javax.ws.rs.core.Response getBatchExtraInfo(String batchId) throws IOException
IOException
public javax.ws.rs.core.Response uploadCompleted(String batchId, String fileIdx, String body) throws IOException
IOException
protected Object executeBatch(String batchId, String fileIdx, String operationId, javax.servlet.http.HttpServletRequest request, ExecutionRequest xreq)
protected javax.ws.rs.core.Response buildResponse(javax.ws.rs.core.Response.StatusType status, Object object) throws IOException
IOException
protected javax.ws.rs.core.Response buildResponse(javax.ws.rs.core.Response.StatusType status, Object object, boolean html) throws IOException
IOException
protected javax.ws.rs.core.Response buildJSONResponse(javax.ws.rs.core.Response.StatusType status, String message) throws UnsupportedEncodingException
UnsupportedEncodingException
protected javax.ws.rs.core.Response buildHTMLResponse(javax.ws.rs.core.Response.StatusType status, String message) throws UnsupportedEncodingException
UnsupportedEncodingException
protected javax.ws.rs.core.Response buildTextResponse(javax.ws.rs.core.Response.StatusType status, String message) throws UnsupportedEncodingException
UnsupportedEncodingException
protected javax.ws.rs.core.Response buildEmptyResponse(javax.ws.rs.core.Response.StatusType status)
protected javax.ws.rs.core.Response buildResponse(javax.ws.rs.core.Response.StatusType status, String type, String message) throws UnsupportedEncodingException
UnsupportedEncodingException
protected Map<String,Object> getFileInfo(BatchFileEntry fileEntry)
Copyright © 2019 Nuxeo. All rights reserved.