Class IngestInternalResource

    • 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 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")
                                                              java.lang.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")
                                                                    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 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")
                                                            java.lang.String workfowId)