Class IngestInternalResource
- java.lang.Object
-
- fr.gouv.vitam.common.server.application.resources.ApplicationStatusResource
-
- fr.gouv.vitam.ingest.internal.upload.rest.IngestInternalResource
-
@Path("/ingest/v1") @ApplicationPath("webresources") public class IngestInternalResource extends ApplicationStatusResource
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
INGEST_INTERNAL_MODULE
static java.lang.String
UPLOAD_SIP
-
Fields inherited from class fr.gouv.vitam.common.server.application.resources.ApplicationStatusResource
STATUS_URL, TENANTS_URL
-
-
Constructor Summary
Constructors Constructor Description IngestInternalResource(IngestInternalConfiguration configuration)
IngestInternalResource constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description javax.ws.rs.core.Response
cancelOperationProcessExecution(java.lang.String id)
Interrupt the process of an operation identified by Id.javax.ws.rs.core.Response
delegateCreateLogbookOperation(java.util.Queue<LogbookOperationParameters> queue)
Allow to create a logbook by delegationjavax.ws.rs.core.Response
delegateUpdateLogbookOperation(java.util.Queue<LogbookOperationParameters> queue)
Allow to update a logbook by delegationjavax.ws.rs.core.Response
downloadObjectAsStream(java.lang.String objectId, java.lang.String type)
Download object stored by Ingest operation (currently ATR and manifest)javax.ws.rs.core.Response
getOperationProcessExecutionDetails(java.lang.String id)
get the workflow statusjavax.ws.rs.core.Response
getWorkflowDefinitions(javax.ws.rs.core.HttpHeaders headers)
javax.ws.rs.core.Response
getWorkflowDetails(java.lang.String workfowId)
javax.ws.rs.core.Response
getWorkFlowExecutionStatus(java.lang.String id)
javax.ws.rs.core.Response
listOperationsDetails(javax.ws.rs.core.HttpHeaders headers, ProcessQuery query)
javax.ws.rs.core.Response
updateWorkFlowStatus(javax.ws.rs.core.HttpHeaders headers, java.lang.String id)
Update the status of an operation.javax.ws.rs.core.Response
updateWorkspaceContainer(java.lang.String id, java.lang.String objectName, java.io.InputStream objectStream)
javax.ws.rs.core.Response
uploadSipAsStream(java.lang.String contentType, java.lang.String contextId, java.lang.String xActionInit, LogbookTypeProcess logbookTypeProcess, java.io.InputStream uploadedInputStream)
Upload compressed SIP as Stream, will be uncompressed in workspace. Will returnResponse
containing an InputStream for the ArchiveTransferReply (OK or KO) except in INTERNAL_ERROR (no body)-
Methods inherited from class fr.gouv.vitam.common.server.application.resources.ApplicationStatusResource
getServerTenants, status
-
-
-
-
Field Detail
-
INGEST_INTERNAL_MODULE
public static final java.lang.String INGEST_INTERNAL_MODULE
- See Also:
- Constant Field Values
-
UPLOAD_SIP
public static final java.lang.String UPLOAD_SIP
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
IngestInternalResource
public IngestInternalResource(IngestInternalConfiguration configuration)
IngestInternalResource constructor- Parameters:
configuration
- ingest configuration
-
-
Method Detail
-
delegateCreateLogbookOperation
@POST @Path("/logbooks") @Consumes("application/json") @Produces("application/json") public javax.ws.rs.core.Response delegateCreateLogbookOperation(java.util.Queue<LogbookOperationParameters> queue)
Allow to create a logbook by delegation- Parameters:
queue
- list of LogbookOperationParameters, first being the created master- Returns:
- the status of the request (CREATED meaning OK)
-
delegateUpdateLogbookOperation
@PUT @Path("/logbooks") @Consumes("application/json") @Produces("application/json") public javax.ws.rs.core.Response delegateUpdateLogbookOperation(java.util.Queue<LogbookOperationParameters> queue)
Allow to update a logbook by delegation- Parameters:
queue
- list of LogbookOperationParameters in append mode (created already done before)- Returns:
- the status of the request (OK)
-
updateWorkspaceContainer
@PUT @Path("/workspace/{id}/{objectName}") public javax.ws.rs.core.Response updateWorkspaceContainer(@PathParam("id") java.lang.String id, @PathParam("objectName") java.lang.String objectName, java.io.InputStream objectStream)
-
uploadSipAsStream
@POST @Path("/ingests") @Consumes({"application/octet-stream","application/zip","application/x-gzip","application/gzip","application/x-tar","application/x-bzip2"}) public javax.ws.rs.core.Response uploadSipAsStream(@HeaderParam("Content-Type") java.lang.String contentType, @HeaderParam("X-Context-Id") java.lang.String contextId, @HeaderParam("X_ACTION_INIT") java.lang.String xActionInit, @HeaderParam("X_TYPE_PROCESS") LogbookTypeProcess logbookTypeProcess, java.io.InputStream uploadedInputStream)
Upload compressed SIP as Stream, will be uncompressed in workspace. Will returnResponse
containing an InputStream for the ArchiveTransferReply (OK or KO) except in INTERNAL_ERROR (no body)- Parameters:
contentType
- the header Content-Type (zip, tar, ...)contextId
- the header X-Context-Id (steptoStep or not)uploadedInputStream
- the stream to upload
-
updateWorkFlowStatus
@Path("/operations/{id}") @PUT @Produces("application/json") public javax.ws.rs.core.Response updateWorkFlowStatus(@Context javax.ws.rs.core.HttpHeaders headers, @PathParam("id") java.lang.String id)
Update the status of an operation.- Parameters:
headers
- contain X-Action and X-Context-IDid
- operation identifier- Returns:
- http response
-
getWorkFlowExecutionStatus
@Path("/operations/{id}") @HEAD @Produces("application/json") public javax.ws.rs.core.Response getWorkFlowExecutionStatus(@PathParam("id") java.lang.String id)
- Parameters:
id
- operation identifier- Returns:
- http response
-
getOperationProcessExecutionDetails
@Path("/operations/{id}") @GET @Consumes("application/json") @Produces("application/json") public javax.ws.rs.core.Response getOperationProcessExecutionDetails(@PathParam("id") java.lang.String id)
get the workflow status- Parameters:
id
- operation identifier- Returns:
- http response
-
cancelOperationProcessExecution
@Path("/operations/{id}") @DELETE @Produces("application/json") public javax.ws.rs.core.Response cancelOperationProcessExecution(@PathParam("id") java.lang.String id)
Interrupt the process of an operation identified by Id.- Parameters:
id
- operation identifier- Returns:
- http response
-
downloadObjectAsStream
@GET @Path("/ingests/{objectId}/{type}") @Produces("application/octet-stream") public javax.ws.rs.core.Response downloadObjectAsStream(@PathParam("objectId") java.lang.String objectId, @PathParam("type") java.lang.String type)
Download object stored by Ingest operation (currently ATR and manifest)Return the object as stream asynchronously
- Parameters:
objectId
- the object idtype
- the collection type
-
listOperationsDetails
@GET @Path("/operations") @Consumes("application/json") @Produces("application/json") public javax.ws.rs.core.Response listOperationsDetails(@Context javax.ws.rs.core.HttpHeaders headers, ProcessQuery query)
- Parameters:
headers
- the http header for requestquery
- the filter query- Returns:
- Response
-
getWorkflowDefinitions
@GET @Path("/workflows") @Produces("application/json") public javax.ws.rs.core.Response getWorkflowDefinitions(@Context javax.ws.rs.core.HttpHeaders headers)
- Parameters:
headers
- the http header for request- Returns:
- Response
-
getWorkflowDetails
@Path("workflows/{workfowId}") @GET @Produces("application/json") public javax.ws.rs.core.Response getWorkflowDetails(@PathParam("workfowId") java.lang.String workfowId)
-
-