@Path(value="/ingest/v1") @ApplicationPath(value="webresources") public class IngestInternalResource extends ApplicationStatusResource
Modifier and Type | Field and Description |
---|---|
static String |
INGEST_INTERNAL_MODULE |
STATUS_URL, TENANTS_URL
Constructor and Description |
---|
IngestInternalResource(IngestInternalConfiguration configuration)
IngestInternalResource constructor
|
Modifier and Type | Method and Description |
---|---|
javax.ws.rs.core.Response |
cancelOperationProcessExecution(String id)
Interrupt the process of an operation identified by Id.
|
javax.ws.rs.core.Response |
delegateCreateLogbookOperation(Queue<LogbookOperationParameters> queue)
Allow to create a logbook by delegation
|
javax.ws.rs.core.Response |
delegateUpdateLogbookOperation(Queue<LogbookOperationParameters> queue)
Allow to update a logbook by delegation
|
javax.ws.rs.core.Response |
downloadObjectAsStream(String objectId,
String type)
Download object stored by Ingest operation (currently ATR and manifest)
|
javax.ws.rs.core.Response |
getOperationProcessExecutionDetails(String id)
get the workflow status
|
javax.ws.rs.core.Response |
getWorkflowDefinitions(javax.ws.rs.core.HttpHeaders headers) |
javax.ws.rs.core.Response |
getWorkflowDetails(String workfowId) |
javax.ws.rs.core.Response |
getWorkFlowExecutionStatus(String id) |
javax.ws.rs.core.Response |
listOperationsDetails(javax.ws.rs.core.HttpHeaders headers,
ProcessQuery query) |
javax.ws.rs.core.Response |
storeATR(String guid,
InputStream atr) |
javax.ws.rs.core.Response |
updateWorkFlowStatus(javax.ws.rs.core.HttpHeaders headers,
String id)
Update the status of an operation.
|
javax.ws.rs.core.Response |
uploadSipAsStream(String contentType,
String contextId,
String actionId,
String xActionInit,
LogbookTypeProcess logbookTypeProcess,
InputStream uploadedInputStream)
Upload compressed SIP as Stream, will be uncompressed in workspace.
Will return
Response containing an InputStream for the ArchiveTransferReply (OK or KO) except in
INTERNAL_ERROR (no body) |
getServerTenants, status
public static final String INGEST_INTERNAL_MODULE
public IngestInternalResource(IngestInternalConfiguration configuration)
configuration
- ingest configuration@POST @Path(value="/logbooks") @Consumes(value="application/json") @Produces(value="application/json") public javax.ws.rs.core.Response delegateCreateLogbookOperation(Queue<LogbookOperationParameters> queue)
queue
- list of LogbookOperationParameters, first being the created master@PUT @Path(value="/logbooks") @Consumes(value="application/json") @Produces(value="application/json") public javax.ws.rs.core.Response delegateUpdateLogbookOperation(Queue<LogbookOperationParameters> queue)
queue
- list of LogbookOperationParameters in append mode (created already done before)@POST @Path(value="/ingests") @Consumes(value={"application/octet-stream","application/zip","application/x-gzip","application/gzip","application/x-tar","application/x-bzip2"}) public javax.ws.rs.core.Response uploadSipAsStream(@HeaderParam(value="Content-Type") String contentType, @HeaderParam(value="X-Context-Id") String contextId, @HeaderParam(value="X-ACTION") String actionId, @HeaderParam(value="X_ACTION_INIT") String xActionInit, @HeaderParam(value="X_TYPE_PROCESS") LogbookTypeProcess logbookTypeProcess, InputStream uploadedInputStream)
Response
containing an InputStream for the ArchiveTransferReply (OK or KO) except in
INTERNAL_ERROR (no body)contentType
- the header Content-Type (zip, tar, ...)contextId
- the header X-Context-Id (steptoStep or not)actionId
- the header X-ACTION (next,resume,..)uploadedInputStream
- the stream to upload@Path(value="/operations/{id}") @PUT @Produces(value="application/json") public javax.ws.rs.core.Response updateWorkFlowStatus(@Context javax.ws.rs.core.HttpHeaders headers, @PathParam(value="id") String id)
headers
- contain X-Action and X-Context-IDid
- operation identifier@Path(value="/operations/{id}") @HEAD @Produces(value="application/json") public javax.ws.rs.core.Response getWorkFlowExecutionStatus(@PathParam(value="id") String id)
id
- operation identifier@Path(value="/operations/{id}") @GET @Consumes(value="application/json") @Produces(value="application/json") public javax.ws.rs.core.Response getOperationProcessExecutionDetails(@PathParam(value="id") String id)
id
- operation identifier@Path(value="/operations/{id}") @DELETE @Produces(value="application/json") public javax.ws.rs.core.Response cancelOperationProcessExecution(@PathParam(value="id") String id)
id
- operation identifier@GET @Path(value="/ingests/{objectId}/{type}") @Produces(value="application/octet-stream") public javax.ws.rs.core.Response downloadObjectAsStream(@PathParam(value="objectId") String objectId, @PathParam(value="type") String type)
Return the object as stream asynchronously
objectId
- the object idtype
- the collection type@POST @Path(value="/ingests/{objectId}/report") @Consumes(value="application/octet-stream") public javax.ws.rs.core.Response storeATR(@PathParam(value="objectId") String guid, InputStream atr)
guid
- the object guidatr
- the inputStream ATR@GET @Path(value="/operations") @Consumes(value="application/json") @Produces(value="application/json") public javax.ws.rs.core.Response listOperationsDetails(@Context javax.ws.rs.core.HttpHeaders headers, ProcessQuery query)
headers
- the http header for requestquery
- the filter query@GET @Path(value="/workflows") @Produces(value="application/json") public javax.ws.rs.core.Response getWorkflowDefinitions(@Context javax.ws.rs.core.HttpHeaders headers)
headers
- the http header for request@Path(value="workflows/{workfowId}") @GET @Produces(value="application/json") public javax.ws.rs.core.Response getWorkflowDetails(@PathParam(value="workfowId") String workfowId)
Copyright © 2019 Vitam. All rights reserved.