@Path(value="/ingest/v1") @ApplicationPath(value="webresources") public class IngestInternalResource extends ApplicationStatusResource
STATUS_URL, TENANTS_URL
Constructor and Description |
---|
IngestInternalResource(IngestInternalConfiguration configuration)
IngestInternalResource constructor
|
Modifier and Type | Method and Description |
---|---|
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 |
executeWorkFlow(javax.ws.rs.core.HttpHeaders headers,
String id,
InputStream uploadedInputStream)
Execute the process of an operation related to the id.
|
javax.ws.rs.core.Response |
getWorkflowDefinitions(javax.ws.rs.core.HttpHeaders headers) |
javax.ws.rs.core.Response |
getWorkFlowExecutionStatus(String id) |
javax.ws.rs.core.Response |
getWorkFlowStatus(String id)
get the workflow status
|
javax.ws.rs.core.Response |
interruptWorkFlowExecution(String id)
Interrupt the process of an operation identified by 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,
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 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/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, 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 uploadInternalServerException
- if request resources server exception occurredVitamClientException
- if the server is unreachable@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}") @POST @Consumes(value={"application/octet-stream","application/zip","application/x-gzip","application/x-tar","application/x-bzip2"}) @Produces(value="application/octet-stream") public javax.ws.rs.core.Response executeWorkFlow(@Context javax.ws.rs.core.HttpHeaders headers, @PathParam(value="id") String id, InputStream uploadedInputStream)
headers
- contain X-Action and X-Context-IDid
- operation identifieruploadedInputStream
- input stream to uploadInternalServerException
- if request resources server exceptionVitamClientException
- if the server is unreachableIngestInternalException
- if error when request to ingest internal serverInvalidGuidOperationException
- if error when create guidProcessingException
- if error in workflow execution@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 getWorkFlowStatus(@PathParam(value="id") String id)
id
- operation identifier@Path(value="/operations/{id}") @DELETE @Produces(value="application/json") public javax.ws.rs.core.Response interruptWorkFlowExecution(@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 requestCopyright © 2018 Vitam. All rights reserved.