Class TransactionInternalResource
java.lang.Object
fr.gouv.vitam.collect.internal.rest.TransactionInternalResource
-
Field Summary
-
Constructor Summary
ConstructorDescriptionTransactionInternalResource
(TransactionService transactionService, SipService sipService, MetadataService metadataService, ProjectService projectService, BulkAtomicUpdateMetadataService bulkAtomicUpdateMetadataService) -
Method Summary
Modifier and TypeMethodDescriptionjavax.ws.rs.core.Response
abortTransaction
(String transactionId) javax.ws.rs.core.Response
attachVitamOperationId
(String transactionId, String operationId) javax.ws.rs.core.Response
bulkAtomicUpdateUnits
(String transactionId, com.fasterxml.jackson.databind.JsonNode updateQueriesJson) Bulk atomic update of archive units with json queries of the provided collect transaction.javax.ws.rs.core.Response
changeTransactionStatus
(String transactionId, TransactionStatus transactionStatus) javax.ws.rs.core.Response
closeTransaction
(String transactionId) javax.ws.rs.core.Response
deleteTransactionById
(String transactionId) javax.ws.rs.core.Response
generateSip
(String transactionId) javax.ws.rs.core.Response
getTransactionById
(String transactionId) javax.ws.rs.core.Response
javax.ws.rs.core.Response
reopenTransaction
(String transactionId) javax.ws.rs.core.Response
selectUnits
(String transactionId, com.fasterxml.jackson.databind.JsonNode jsonQuery) select Unitjavax.ws.rs.core.Response
selectUnitsWithInheritedRules
(String transactionId, com.fasterxml.jackson.databind.JsonNode queryDsl) Select units with inherited rulesjavax.ws.rs.core.Response
updateTransaction
(TransactionDto transactionDto) javax.ws.rs.core.Response
updateUnitsWithMetadataCsv
(String transactionId, InputStream metadataCsvInputStream) javax.ws.rs.core.Response
updateUnitsWithMetadataJsonl
(String transactionId, InputStream metadataJsonlInputStream) javax.ws.rs.core.Response
uploadArchiveUnit
(String transactionId, com.fasterxml.jackson.databind.JsonNode unitJsonNode) javax.ws.rs.core.Response
uploadTransactionZip
(String transactionId, InputStream inputStreamObject, String encoding)
-
Field Details
-
SIP_GENERATED_MANIFEST_CAN_T_BE_NULL
- See Also:
-
-
Constructor Details
-
TransactionInternalResource
public TransactionInternalResource(TransactionService transactionService, SipService sipService, MetadataService metadataService, ProjectService projectService, BulkAtomicUpdateMetadataService bulkAtomicUpdateMetadataService)
-
-
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
-
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 IdqueryDsl
- 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
-