Class TransactionInternalResource

java.lang.Object
fr.gouv.vitam.collect.internal.rest.TransactionInternalResource

@Path("/collect-internal/v1/transactions") public class TransactionInternalResource extends Object
  • Field Details

    • SIP_GENERATED_MANIFEST_CAN_T_BE_NULL

      public static final String SIP_GENERATED_MANIFEST_CAN_T_BE_NULL
      See Also:
  • Constructor Details

  • Method Details

    • getTransactionsToAutomaticallyIngest

      @GET @Path("/withAutomaticIngest") @Produces("application/json") public javax.ws.rs.core.Response getTransactionsToAutomaticallyIngest() throws CollectInternalException
      Throws:
      CollectInternalException
    • getTransactionById

      @Path("/{transactionId}") @GET @Produces("application/json") public javax.ws.rs.core.Response getTransactionById(@PathParam("transactionId") String transactionId)
    • updateTransaction

      @PUT @Consumes("application/json") @Produces("application/json") public javax.ws.rs.core.Response updateTransaction(TransactionDto transactionDto)
    • deleteTransactionById

      @Path("/{transactionId}") @DELETE @Produces("application/json") public javax.ws.rs.core.Response deleteTransactionById(@PathParam("transactionId") String transactionId)
    • uploadArchiveUnit

      @Path("/{transactionId}/units") @POST @Consumes("application/json") @Produces("application/json") public javax.ws.rs.core.Response uploadArchiveUnit(@PathParam("transactionId") String transactionId, com.fasterxml.jackson.databind.JsonNode unitJsonNode)
    • selectUnits

      @Path("/{transactionId}/units") @GET @Consumes("application/json") @Produces("application/json") public javax.ws.rs.core.Response selectUnits(@PathParam("transactionId") String transactionId, com.fasterxml.jackson.databind.JsonNode jsonQuery)
      select Unit
      Parameters:
      jsonQuery - as String { $query : query}
    • closeTransaction

      @Path("/{transactionId}/close") @POST @Consumes("application/json") @Produces("application/json") public javax.ws.rs.core.Response closeTransaction(@PathParam("transactionId") String transactionId)
    • abortTransaction

      @Path("/{transactionId}/abort") @PUT @Consumes("application/json") @Produces("application/json") public javax.ws.rs.core.Response abortTransaction(@PathParam("transactionId") String transactionId)
    • reopenTransaction

      @Path("/{transactionId}/reopen") @PUT @Consumes("application/json") @Produces("application/json") public javax.ws.rs.core.Response reopenTransaction(@PathParam("transactionId") String transactionId)
    • generateSip

      @Path("/{transactionId}/send") @POST @Produces("application/octet-stream") public javax.ws.rs.core.Response generateSip(@PathParam("transactionId") String transactionId) throws CollectInternalException
      Throws:
      CollectInternalException
    • updateUnitsWithMetadataCsv

      @Path("/{transactionId}/units/metadata/csv") @PUT @Consumes("text/csv") @Produces("application/json") public javax.ws.rs.core.Response updateUnitsWithMetadataCsv(@PathParam("transactionId") String transactionId, InputStream metadataCsvInputStream)
    • updateUnitsWithMetadataJsonl

      @Path("/{transactionId}/units/metadata/jsonl") @PUT @Consumes("application/octet-stream") @Produces("application/json") public javax.ws.rs.core.Response updateUnitsWithMetadataJsonl(@PathParam("transactionId") String transactionId, InputStream metadataJsonlInputStream)
    • uploadTransactionZip

      @Path("/{transactionId}/upload") @POST @Consumes("application/zip") @Produces("application/json") public javax.ws.rs.core.Response uploadTransactionZip(@PathParam("transactionId") String transactionId, InputStream inputStreamObject, @HeaderParam("X-Encoding") @Nullable String encoding)
    • changeTransactionStatus

      @Path("/{transactionId}/status/{transactionStatus}") @PUT @Consumes("application/json") @Produces("application/json") public javax.ws.rs.core.Response changeTransactionStatus(@PathParam("transactionId") String transactionId, @PathParam("transactionStatus") TransactionStatus transactionStatus)
    • attachVitamOperationId

      @Path("/{transactionId}/operation-id/{operationId}") @PUT @Consumes("application/json") @Produces("application/json") public javax.ws.rs.core.Response attachVitamOperationId(@PathParam("transactionId") String transactionId, @PathParam("operationId") String operationId)
    • selectUnitsWithInheritedRules

      @GET @Path("/{transactionId}/unitsWithInheritedRules") @Consumes("application/json") @Produces("application/json") public javax.ws.rs.core.Response selectUnitsWithInheritedRules(@PathParam("transactionId") String transactionId, com.fasterxml.jackson.databind.JsonNode queryDsl)
      Select units with inherited rules
      Parameters:
      transactionId - as transaction Id
      queryDsl - as JsonNode
      Returns:
      an archive unit result list with inherited rules
    • bulkAtomicUpdateUnits

      @POST @Path("/{transactionId}/units/bulk") @Consumes("application/json") @Produces("application/json") public javax.ws.rs.core.Response bulkAtomicUpdateUnits(@PathParam("transactionId") String transactionId, com.fasterxml.jackson.databind.JsonNode updateQueriesJson)
      Bulk atomic update of archive units with json queries of the provided collect transaction.
      Units are update in blocking mode (might take a few moments to proceed before returning). Please ensure proper request size / timeout is configured.
      Parameters:
      updateQueriesJson - the bulk update queries (null not allowed)
      Returns:
      HTTP 202 when request is accepted, 400 on BAD REQUEST, 500 on internal server error