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 Details

  • Constructor Details

    • IngestInternalResource

      public IngestInternalResource(IngestInternalConfiguration configuration)
      IngestInternalResource constructor
      Parameters:
      configuration - ingest configuration
  • Method Details

    • delegateCreateLogbookOperation

      @POST @Path("/logbooks") @Consumes("application/json") @Produces("application/json") public javax.ws.rs.core.Response delegateCreateLogbookOperation(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(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") String id, @PathParam("objectName") String objectName, 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") String contentType, @HeaderParam("X-Context-Id") String contextId, @HeaderParam("X_ACTION_INIT") String xActionInit, @HeaderParam("X_TYPE_PROCESS") 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)
      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") String id)
      Update the status of an operation.
      Parameters:
      headers - contain X-Action and X-Context-ID
      id - operation identifier
      Returns:
      http response
    • getWorkFlowExecutionStatus

      @Path("/operations/{id}") @HEAD @Produces("application/json") public javax.ws.rs.core.Response getWorkFlowExecutionStatus(@PathParam("id") 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") 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") 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") String objectId, @PathParam("type") String type)
      Download object stored by Ingest operation (currently ATR and manifest)

      Return the object as stream asynchronously

      Parameters:
      objectId - the object id
      type - 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 request
      query - 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") String workfowId)