Class BatchUploadObject
java.lang.Object
org.nuxeo.ecm.webengine.model.impl.AbstractResource<ResourceTypeImpl>
org.nuxeo.ecm.restapi.server.jaxrs.BatchUploadObject
Batch upload endpoint.
Provides the APIs listed below:
- POST /upload, see
initBatch()
- POST /upload/{batchId}/{fileIdx}, see
upload(HttpServletRequest, String, String)
- GET /upload/{batchId}, see
getBatchInfo(String)
- GET /upload/{batchId}/{fileIdx}, see
getFileInfo(String, String)
- POST /upload/{batchId}/execute/{operationId}, see
execute(String, String, ExecutionRequest)
- POST /upload/{batchId}/refreshToken, see
refreshToken(String)
- POST /upload/{batchId}/{fileIdx}/execute/{operationId}, see
execute(String, String, String, ExecutionRequest)
- DELETE /upload/{batchId}, see
cancel(String)
- DELETE /upload/{batchId}/{fileIdx}, see
removeFile(String, String)
- Since:
- 7.4
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
static final String
static final String
static final String
static final String
protected static final String
protected javax.servlet.http.HttpServletRequest
protected static final String
protected static final String
protected static final String
protected javax.servlet.http.HttpServletResponse
static final String
static final String
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected 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) Deprecated.since 11.2, not used anymoreprotected javax.ws.rs.core.Response
buildJSONResponse
(javax.ws.rs.core.Response.StatusType status, String message) Deprecated.since 11.2, not used anymoreprotected 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) Deprecated.since 11.2, not used anymoreprotected 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
javax.ws.rs.core.Response
protected javax.ws.rs.core.Response
completeNoTransaction
(String batchId, String fileIdx, String body) javax.ws.rs.core.Response
createNewBatch
(String handlerName) execute
(String batchId, String fileIdx, String operationId, ExecutionRequest xreq) execute
(String batchId, 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) javax.ws.rs.core.Response
getFileInfo
(String batchId, String fileIdx) getFileInfo
(BatchFileEntry fileEntry) 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
mapWithName
(String name) javax.ws.rs.core.Response
refreshToken
(String batchId) javax.ws.rs.core.Response
removeFile
(String batchId, String fileIdx) javax.ws.rs.core.Response
protected javax.ws.rs.core.Response
uploadNoTransaction
(javax.servlet.http.HttpServletRequest request, String batchId, String fileIdx) Methods inherited from class org.nuxeo.ecm.webengine.model.impl.AbstractResource
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
-
Field Details
-
REQUEST_BATCH_ID
- See Also:
-
REQUEST_FILE_IDX
- See Also:
-
OPERATION_ID
- See Also:
-
REQUEST_HANDLER_NAME
- See Also:
-
UPLOAD_TYPE_NORMAL
- See Also:
-
UPLOAD_TYPE_CHUNKED
- See Also:
-
KEY
- See Also:
-
NAME
- See Also:
-
MIMETYPE
- See Also:
-
FILE_SIZE
- See Also:
-
MD5
- See Also:
-
request
@Context protected javax.servlet.http.HttpServletRequest request -
response
@Context protected javax.servlet.http.HttpServletResponse response
-
-
Constructor Details
-
BatchUploadObject
public BatchUploadObject()
-
-
Method Details
-
mapWithName
-
handlers
- Throws:
IOException
-
getHandlerInfo
- Throws:
IOException
-
createNewBatch
- Throws:
IOException
-
initBatch
- Throws:
IOException
-
upload
public javax.ws.rs.core.Response upload(@Context javax.servlet.http.HttpServletRequest request, String batchId, String fileIdx) throws IOException - Throws:
IOException
-
uploadNoTransaction
protected javax.ws.rs.core.Response uploadNoTransaction(@Context javax.servlet.http.HttpServletRequest request, String batchId, String fileIdx) throws IOException - Throws:
IOException
-
getUploadedSize
protected long getUploadedSize(javax.servlet.http.HttpServletRequest request) -
addBlob
-
getBatchInfo
- Throws:
IOException
-
getFileInfo
- Throws:
IOException
-
cancel
-
removeFile
- Since:
- 8.4
-
execute
-
execute
-
getBatchExtraInfo
- Throws:
IOException
-
refreshToken
- Throws:
IOException
- Since:
- 11.1
-
complete
public javax.ws.rs.core.Response complete(String batchId, String fileIdx, String body) throws IOException - Throws:
IOException
-
completeNoTransaction
protected javax.ws.rs.core.Response completeNoTransaction(String batchId, String fileIdx, String body) throws IOException - Throws:
IOException
-
executeBatch
protected Object executeBatch(String batchId, String fileIdx, String operationId, javax.servlet.http.HttpServletRequest request, ExecutionRequest xreq) -
buildResponse
protected javax.ws.rs.core.Response buildResponse(javax.ws.rs.core.Response.StatusType status, Object object) throws IOException - Throws:
IOException
-
buildResponse
@Deprecated(since="11.2") protected javax.ws.rs.core.Response buildResponse(javax.ws.rs.core.Response.StatusType status, Object object, boolean html) throws IOException Deprecated.since 11.2, not used anymore- Throws:
IOException
-
buildJSONResponse
@Deprecated(since="11.2") protected javax.ws.rs.core.Response buildJSONResponse(javax.ws.rs.core.Response.StatusType status, String message) throws UnsupportedEncodingException Deprecated.since 11.2, not used anymore- Throws:
UnsupportedEncodingException
-
buildHTMLResponse
@Deprecated(since="11.2") protected javax.ws.rs.core.Response buildHTMLResponse(javax.ws.rs.core.Response.StatusType status, String message) throws UnsupportedEncodingException Deprecated.since 11.2, not used anymore- Throws:
UnsupportedEncodingException
-
buildTextResponse
protected javax.ws.rs.core.Response buildTextResponse(javax.ws.rs.core.Response.StatusType status, String message) throws UnsupportedEncodingException - Throws:
UnsupportedEncodingException
-
buildEmptyResponse
protected javax.ws.rs.core.Response buildEmptyResponse(javax.ws.rs.core.Response.StatusType status) -
buildResponse
protected javax.ws.rs.core.Response buildResponse(javax.ws.rs.core.Response.StatusType status, String type, String message) throws UnsupportedEncodingException - Throws:
UnsupportedEncodingException
-
getFileInfo
-