Interface CollectExternalClient
- All Superinterfaces:
AutoCloseable
,MockOrRestClient
,VitamAutoCloseable
- All Known Implementing Classes:
CollectExternalClientRest
Collect Client Interface
-
Method Summary
Modifier and TypeMethodDescriptionabortTransaction
(VitamContext vitamContext, String transactionId) Abort Transaction Consume and produce MediaType.APPLICATION_JSONjavax.ws.rs.core.Response
addBinary
(VitamContext vitamContext, String unitId, Integer version, InputStream inputStreamUploaded, String usage) ADD Binary Consume and produce MediaType.OCTET_STREAMRequestResponse<com.fasterxml.jackson.databind.JsonNode>
addObjectGroup
(VitamContext vitamContext, String unitId, Integer version, com.fasterxml.jackson.databind.JsonNode objectJsonNode, String usage) ADD Object Group Consume and produce MediaType.APPLICATION_JSONbulkAtomicUpdateUnits
(VitamContext vitamContext, String transactionId, com.fasterxml.jackson.databind.JsonNode updateQueriesJson) Bulk atomic update of archive units with json queries of the provided collect transaction.closeTransaction
(VitamContext vitamContext, String transactionId) Close Transaction Consume and produce MediaType.APPLICATION_JSONRequestResponse<com.fasterxml.jackson.databind.JsonNode>
deleteProjectById
(VitamContext vitamContext, String projectId) delete a collect project produce MediaType.APPLICATION_JSONRequestResponse<com.fasterxml.jackson.databind.JsonNode>
deleteTransactionById
(VitamContext vitamContext, String transactionId) delete a collect transaction produce MediaType.APPLICATION_JSONRequestResponse<com.fasterxml.jackson.databind.JsonNode>
getObjectById
(VitamContext vitamContext, String gotId) get an object group by Id Consume and produce MediaType.APPLICATION_JSONjavax.ws.rs.core.Response
getObjectStreamByUnitId
(VitamContext vitamContext, String unitId, String usage, int version) Get all AU attached to transactions related to project Id paramRequestResponse<com.fasterxml.jackson.databind.JsonNode>
getProjectById
(VitamContext vitamContext, String projectId) get a collect project Consume and produce MediaType.APPLICATION_JSONRequestResponse<com.fasterxml.jackson.databind.JsonNode>
getProjects
(VitamContext vitamContext) get all collect project by tenant Consume and produce MediaType.APPLICATION_JSONRequestResponse<com.fasterxml.jackson.databind.JsonNode>
getTransactionById
(VitamContext vitamContext, String transactionId) get a collect transaction by ID Consume and produce MediaType.APPLICATION_JSONRequestResponse<com.fasterxml.jackson.databind.JsonNode>
getTransactionByProjectId
(VitamContext vitamContext, String projectId) get a collect transaction Consume and produce MediaType.APPLICATION_JSONRequestResponse<com.fasterxml.jackson.databind.JsonNode>
getUnitById
(VitamContext vitamContext, String unitId) get an archive unit by Id Consume and produce MediaType.APPLICATION_JSONRequestResponse<com.fasterxml.jackson.databind.JsonNode>
getUnitsByTransaction
(VitamContext vitamContext, String transactionId, com.fasterxml.jackson.databind.JsonNode query) get an archive unit by transaction Id Consume and produce MediaType.APPLICATION_JSONingest
(VitamContext vitamContext, String transactionId) Generate SIP + Send to Vitam Consume and produce MediaType.APPLICATION_JSONRequestResponse<com.fasterxml.jackson.databind.JsonNode>
initProject
(VitamContext vitamContext, ProjectDto projectDto) Initialize a collect project Consume and produce MediaType.APPLICATION_JSONRequestResponse<com.fasterxml.jackson.databind.JsonNode>
initTransaction
(VitamContext vitamContext, TransactionDto transactionDto, String projectId) Initialize a collect transaction Consume and produce MediaType.APPLICATION_JSONreopenTransaction
(VitamContext vitamContext, String transactionId) Reopen Transaction Consume and produce MediaType.APPLICATION_JSONsearchProject
(VitamContext vitamContext, CriteriaProjectDto criteria) get all projects by criteria Consume and produce MediaType.APPLICATION_JSONRequestResponse<com.fasterxml.jackson.databind.JsonNode>
selectUnitsWithInheritedRules
(VitamContext vitamContext, String transactionId, com.fasterxml.jackson.databind.JsonNode selectQuery) RequestResponse<com.fasterxml.jackson.databind.JsonNode>
updateProject
(VitamContext vitamContext, ProjectDto projectDto) Update a collect project Consume and produce MediaType.APPLICATION_JSONRequestResponse<com.fasterxml.jackson.databind.JsonNode>
updateTransaction
(VitamContext vitamContext, TransactionDto transactionDto) Update a collect transaction Consume and produce MediaType.APPLICATION_JSONdefault RequestResponse<com.fasterxml.jackson.databind.JsonNode>
updateUnits
(VitamContext vitamContext, String transactionId, InputStream is) Deprecated, for removal: This API element is subject to removal in a future version.Use updateUnitsWithCsvMetadata() or updateUnitsWithJsonlMetadata() instead.RequestResponse<com.fasterxml.jackson.databind.JsonNode>
updateUnitsWithCsvMetadata
(VitamContext vitamContext, String transactionId, InputStream metadataCsvInputStream) Update transaction units using CSV metadata file Consumes a csv file (text/csv).RequestResponse<com.fasterxml.jackson.databind.JsonNode>
updateUnitsWithJsonlMetadata
(VitamContext vitamContext, String transactionId, InputStream metadataJsonlInputStream) Update transaction units using JSON-Lines (jsonl) metadata file Consumes an JSON-Lines file (application/octet-stream).RequestResponse<com.fasterxml.jackson.databind.JsonNode>
uploadArchiveUnit
(VitamContext vitamContext, com.fasterxml.jackson.databind.JsonNode unitJsonNode, String transactionId) ADD Archive Unit Consume and produce MediaType.APPLICATION_JSONdefault RequestResponse<com.fasterxml.jackson.databind.JsonNode>
uploadProjectZip
(VitamContext vitamContext, String transactionId, InputStream inputStreamUploaded) Deprecated, for removal: This API element is subject to removal in a future version.Use uploadZipToTransaction() instead.uploadZipToProject
(VitamContext vitamContext, String projectId, InputStream inputStreamUploaded) Upload zip to a project with automatic transaction management.uploadZipToProject
(VitamContext vitamContext, String projectId, InputStream inputStreamUploaded, String encoding) Upload zip to a project with automatic transaction management.RequestResponse<com.fasterxml.jackson.databind.JsonNode>
uploadZipToTransaction
(VitamContext vitamContext, String transactionId, InputStream inputStreamUploaded) Upload zip to a transaction.RequestResponse<com.fasterxml.jackson.databind.JsonNode>
uploadZipToTransaction
(VitamContext vitamContext, String transactionId, InputStream inputStreamUploaded, String encoding) Upload zip to a transaction.Methods inherited from interface fr.gouv.vitam.common.client.MockOrRestClient
checkStatus, checkStatus, close, consumeAnyEntityAndClose, getResourcePath, getServiceUrl
-
Method Details
-
initProject
RequestResponse<com.fasterxml.jackson.databind.JsonNode> initProject(VitamContext vitamContext, ProjectDto projectDto) throws VitamClientException Initialize a collect project Consume and produce MediaType.APPLICATION_JSON- Returns:
- RequestResponse
- Throws:
VitamClientException
- exception occurs when parse operation failed
-
updateProject
RequestResponse<com.fasterxml.jackson.databind.JsonNode> updateProject(VitamContext vitamContext, ProjectDto projectDto) throws VitamClientException Update a collect project Consume and produce MediaType.APPLICATION_JSON- Returns:
- RequestResponse
- Throws:
VitamClientException
- exception occurs when parse operation failed
-
getProjectById
RequestResponse<com.fasterxml.jackson.databind.JsonNode> getProjectById(VitamContext vitamContext, String projectId) throws VitamClientException get a collect project Consume and produce MediaType.APPLICATION_JSON- Returns:
- RequestResponse
- Throws:
VitamClientException
- exception occurs when parse operation failed
-
getTransactionByProjectId
RequestResponse<com.fasterxml.jackson.databind.JsonNode> getTransactionByProjectId(VitamContext vitamContext, String projectId) throws VitamClientException get a collect transaction Consume and produce MediaType.APPLICATION_JSON- Returns:
- RequestResponse
- Throws:
VitamClientException
- exception occurs when parse operation failed
-
getTransactionById
RequestResponse<com.fasterxml.jackson.databind.JsonNode> getTransactionById(VitamContext vitamContext, String transactionId) throws VitamClientException get a collect transaction by ID Consume and produce MediaType.APPLICATION_JSON- Returns:
- RequestResponse
- Throws:
VitamClientException
- exception occurs when parse operation failed
-
getProjects
RequestResponse<com.fasterxml.jackson.databind.JsonNode> getProjects(VitamContext vitamContext) throws VitamClientException get all collect project by tenant Consume and produce MediaType.APPLICATION_JSON- Parameters:
vitamContext
-- Returns:
- RequestResponse
- Throws:
VitamClientException
- exception occurs when parse operation failed
-
deleteTransactionById
RequestResponse<com.fasterxml.jackson.databind.JsonNode> deleteTransactionById(VitamContext vitamContext, String transactionId) throws VitamClientException delete a collect transaction produce MediaType.APPLICATION_JSON- Returns:
- RequestResponse
- Throws:
VitamClientException
- exception occurs when parse operation failed
-
deleteProjectById
RequestResponse<com.fasterxml.jackson.databind.JsonNode> deleteProjectById(VitamContext vitamContext, String projectId) throws VitamClientException delete a collect project produce MediaType.APPLICATION_JSON- Returns:
- RequestResponse
- Throws:
VitamClientException
- exception occurs when parse operation failed
-
getUnitById
RequestResponse<com.fasterxml.jackson.databind.JsonNode> getUnitById(VitamContext vitamContext, String unitId) throws VitamClientException get an archive unit by Id Consume and produce MediaType.APPLICATION_JSON- Returns:
- RequestResponse
- Throws:
VitamClientException
- exception occurs when parse operation failed
-
getUnitsByTransaction
RequestResponse<com.fasterxml.jackson.databind.JsonNode> getUnitsByTransaction(VitamContext vitamContext, String transactionId, com.fasterxml.jackson.databind.JsonNode query) throws VitamClientException get an archive unit by transaction Id Consume and produce MediaType.APPLICATION_JSON- Returns:
- RequestResponse
- Throws:
VitamClientException
- exception occurs when parse operation failed
-
getObjectById
RequestResponse<com.fasterxml.jackson.databind.JsonNode> getObjectById(VitamContext vitamContext, String gotId) throws VitamClientException get an object group by Id Consume and produce MediaType.APPLICATION_JSON- Returns:
- RequestResponse
- Throws:
VitamClientException
- exception occurs when parse operation failed
-
initTransaction
RequestResponse<com.fasterxml.jackson.databind.JsonNode> initTransaction(VitamContext vitamContext, TransactionDto transactionDto, String projectId) throws VitamClientException Initialize a collect transaction Consume and produce MediaType.APPLICATION_JSON- Returns:
- RequestResponse
guid created for the transaction - Throws:
VitamClientException
- exception occurs when parse operation failed
-
uploadArchiveUnit
RequestResponse<com.fasterxml.jackson.databind.JsonNode> uploadArchiveUnit(VitamContext vitamContext, com.fasterxml.jackson.databind.JsonNode unitJsonNode, String transactionId) throws VitamClientException ADD Archive Unit Consume and produce MediaType.APPLICATION_JSON- Returns:
- RequestResponse
Archive Unit saved - Throws:
VitamClientException
- exception occurs when parse operation failed
-
addObjectGroup
RequestResponse<com.fasterxml.jackson.databind.JsonNode> addObjectGroup(VitamContext vitamContext, String unitId, Integer version, com.fasterxml.jackson.databind.JsonNode objectJsonNode, String usage) throws VitamClientException ADD Object Group Consume and produce MediaType.APPLICATION_JSON- Returns:
- RequestResponse
objectgroup saved - Throws:
VitamClientException
- exception occurs when parse operation failed
-
addBinary
javax.ws.rs.core.Response addBinary(VitamContext vitamContext, String unitId, Integer version, InputStream inputStreamUploaded, String usage) throws VitamClientException ADD Binary Consume and produce MediaType.OCTET_STREAM- Returns:
- Response
- Throws:
VitamClientException
- exception occurs when parse operation failed
-
closeTransaction
RequestResponse closeTransaction(VitamContext vitamContext, String transactionId) throws VitamClientException Close Transaction Consume and produce MediaType.APPLICATION_JSON- Returns:
- Response
- Throws:
VitamClientException
- exception occurs when parse operation failed
-
ingest
Generate SIP + Send to Vitam Consume and produce MediaType.APPLICATION_JSON- Returns:
- RequestResponse
- Throws:
VitamClientException
- exception occurs when parse operation failed
-
abortTransaction
RequestResponse abortTransaction(VitamContext vitamContext, String transactionId) throws VitamClientException Abort Transaction Consume and produce MediaType.APPLICATION_JSON- Returns:
- Response
- Throws:
VitamClientException
- exception occurs when parse operation failed
-
reopenTransaction
RequestResponse reopenTransaction(VitamContext vitamContext, String transactionId) throws VitamClientException Reopen Transaction Consume and produce MediaType.APPLICATION_JSON- Returns:
- RequestResponse
- Throws:
VitamClientException
- exception occurs when parse operation failed
-
uploadProjectZip
@Deprecated(forRemoval=true, since="Vitam 7.1") default RequestResponse<com.fasterxml.jackson.databind.JsonNode> uploadProjectZip(VitamContext vitamContext, String transactionId, InputStream inputStreamUploaded) throws VitamClientException Deprecated, for removal: This API element is subject to removal in a future version.Use uploadZipToTransaction() instead.Upload zip to a transaction. Consumes a ZIP (application/zip).- Returns:
- RequestResponse
- Throws:
VitamClientException
- exception occurs when parse operation failed
-
uploadZipToProject
@Beta RequestResponse<String> uploadZipToProject(VitamContext vitamContext, String projectId, InputStream inputStreamUploaded) throws VitamClientException Upload zip to a project with automatic transaction management. Consumes a ZIP (application/zip). Warning: This Method is marked as "beta". API signature & behavior might evolve in next versions.- Returns:
- RequestResponse
- Throws:
VitamClientException
- exception occurs when parse operation failed
-
uploadZipToProject
@Beta RequestResponse<String> uploadZipToProject(VitamContext vitamContext, String projectId, InputStream inputStreamUploaded, @Nullable String encoding) throws VitamClientException Upload zip to a project with automatic transaction management. Consumes a ZIP (application/zip) and it's encoding (optional) Warning: This Method is marked as "beta". API signature & behavior might evolve in next versions.- Returns:
- RequestResponse
- Throws:
VitamClientException
- exception occurs when parse operation failed
-
uploadZipToTransaction
RequestResponse<com.fasterxml.jackson.databind.JsonNode> uploadZipToTransaction(VitamContext vitamContext, String transactionId, InputStream inputStreamUploaded) throws VitamClientException Upload zip to a transaction. Consumes a ZIP (application/zip).- Returns:
- RequestResponse
- Throws:
VitamClientException
- exception occurs when parse operation failed
-
uploadZipToTransaction
RequestResponse<com.fasterxml.jackson.databind.JsonNode> uploadZipToTransaction(VitamContext vitamContext, String transactionId, InputStream inputStreamUploaded, @Nullable String encoding) throws VitamClientException Upload zip to a transaction. Consumes a ZIP (application/zip) and it's encoding (optional)- Returns:
- RequestResponse
- Throws:
VitamClientException
- exception occurs when parse operation failed
-
getObjectStreamByUnitId
javax.ws.rs.core.Response getObjectStreamByUnitId(VitamContext vitamContext, String unitId, String usage, int version) throws VitamClientException Get all AU attached to transactions related to project Id param- Parameters:
vitamContext
- security contextunitId
- unit idusage
- usageversion
- version- Returns:
- Response
- Throws:
VitamClientException
- Thrown exception
-
searchProject
RequestResponse searchProject(VitamContext vitamContext, CriteriaProjectDto criteria) throws VitamClientException get all projects by criteria Consume and produce MediaType.APPLICATION_JSON- Parameters:
vitamContext
-criteria
-- Returns:
- RequestResponse
- Throws:
VitamClientException
- exception occurs when parse operation failed
-
updateTransaction
RequestResponse<com.fasterxml.jackson.databind.JsonNode> updateTransaction(VitamContext vitamContext, TransactionDto transactionDto) throws VitamClientException Update a collect transaction Consume and produce MediaType.APPLICATION_JSON- Returns:
- RequestResponse
- Throws:
VitamClientException
- exception occurs when parse operation failed
-
updateUnits
@Deprecated(forRemoval=true, since="Vitam 7.1") default RequestResponse<com.fasterxml.jackson.databind.JsonNode> updateUnits(VitamContext vitamContext, String transactionId, InputStream is) throws VitamClientException Deprecated, for removal: This API element is subject to removal in a future version.Use updateUnitsWithCsvMetadata() or updateUnitsWithJsonlMetadata() instead.Update transaction units using CSV metadata file. Defaults to updateUnitsWithCsvMetadata() method.- Returns:
- RequestResponse
- Throws:
VitamClientException
- exception occurs when parse operation failed
-
updateUnitsWithCsvMetadata
RequestResponse<com.fasterxml.jackson.databind.JsonNode> updateUnitsWithCsvMetadata(VitamContext vitamContext, String transactionId, InputStream metadataCsvInputStream) throws VitamClientException Update transaction units using CSV metadata file Consumes a csv file (text/csv).- Returns:
- RequestResponse
- Throws:
VitamClientException
- exception occurs when parse operation failed
-
updateUnitsWithJsonlMetadata
RequestResponse<com.fasterxml.jackson.databind.JsonNode> updateUnitsWithJsonlMetadata(VitamContext vitamContext, String transactionId, InputStream metadataJsonlInputStream) throws VitamClientException Update transaction units using JSON-Lines (jsonl) metadata file Consumes an JSON-Lines file (application/octet-stream).- Returns:
- RequestResponse
- Throws:
VitamClientException
- exception occurs when parse operation failed
-
selectUnitsWithInheritedRules
RequestResponse<com.fasterxml.jackson.databind.JsonNode> selectUnitsWithInheritedRules(VitamContext vitamContext, String transactionId, com.fasterxml.jackson.databind.JsonNode selectQuery) throws VitamClientException - Throws:
VitamClientException
-
bulkAtomicUpdateUnits
RequestResponseOK<BulkAtomicUpdateResult> bulkAtomicUpdateUnits(VitamContext vitamContext, String transactionId, com.fasterxml.jackson.databind.JsonNode updateQueriesJson) throws VitamClientException 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:
transactionId
- the transaction Id. Must be a valid OPEN transaction.updateQueriesJson
- the bulk update queries (null not allowed)- Throws:
VitamClientException
-