Interface CollectExternalClient
-
- All Superinterfaces:
java.lang.AutoCloseable
,MockOrRestClient
,VitamAutoCloseable
- All Known Implementing Classes:
CollectExternalClientRest
public interface CollectExternalClient extends MockOrRestClient
Collect Client Interface
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description RequestResponse
abortTransaction(VitamContext vitamContext, java.lang.String transactionId)
Abort Transaction Consume and produce MediaType.APPLICATION_JSONjavax.ws.rs.core.Response
addBinary(VitamContext vitamContext, java.lang.String unitId, java.lang.Integer version, java.io.InputStream inputStreamUploaded, java.lang.String usage)
ADD Binary Consume and produce MediaType.OCTET_STREAMRequestResponse<com.fasterxml.jackson.databind.JsonNode>
addObjectGroup(VitamContext vitamContext, java.lang.String unitId, java.lang.Integer version, com.fasterxml.jackson.databind.JsonNode objectJsonNode, java.lang.String usage)
ADD Object Group Consume and produce MediaType.APPLICATION_JSONRequestResponse
closeTransaction(VitamContext vitamContext, java.lang.String transactionId)
Close Transaction Consume and produce MediaType.APPLICATION_JSONRequestResponse<com.fasterxml.jackson.databind.JsonNode>
deleteProjectById(VitamContext vitamContext, java.lang.String projectId)
delete a collect project produce MediaType.APPLICATION_JSONRequestResponse<com.fasterxml.jackson.databind.JsonNode>
deleteTransactionById(VitamContext vitamContext, java.lang.String transactionId)
delete a collect transaction produce MediaType.APPLICATION_JSONRequestResponse<com.fasterxml.jackson.databind.JsonNode>
getObjectById(VitamContext vitamContext, java.lang.String gotId)
get an object group by Id Consume and produce MediaType.APPLICATION_JSONjavax.ws.rs.core.Response
getObjectStreamByUnitId(VitamContext vitamContext, java.lang.String unitId, java.lang.String usage, int version)
Get all AU attached to transactions related to project Id paramRequestResponse<com.fasterxml.jackson.databind.JsonNode>
getProjectById(VitamContext vitamContext, java.lang.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, java.lang.String transactionId)
get a collect transaction by ID Consume and produce MediaType.APPLICATION_JSONRequestResponse<com.fasterxml.jackson.databind.JsonNode>
getTransactionByProjectId(VitamContext vitamContext, java.lang.String projectId)
get a collect transaction Consume and produce MediaType.APPLICATION_JSONRequestResponse<com.fasterxml.jackson.databind.JsonNode>
getUnitById(VitamContext vitamContext, java.lang.String unitId)
get an archive unit by Id Consume and produce MediaType.APPLICATION_JSONRequestResponse<com.fasterxml.jackson.databind.JsonNode>
getUnitsByTransaction(VitamContext vitamContext, java.lang.String transactionId, com.fasterxml.jackson.databind.JsonNode query)
get an archive unit by transaction Id Consume and produce MediaType.APPLICATION_JSONRequestResponse
ingest(VitamContext vitamContext, java.lang.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, java.lang.String projectId)
Initialize a collect transaction Consume and produce MediaType.APPLICATION_JSONRequestResponse
reopenTransaction(VitamContext vitamContext, java.lang.String transactionId)
Reopen Transaction Consume and produce MediaType.APPLICATION_JSONRequestResponse
searchProject(VitamContext vitamContext, CriteriaProjectDto criteria)
get all projects by criteria Consume and produce MediaType.APPLICATION_JSONRequestResponse<com.fasterxml.jackson.databind.JsonNode>
selectUnitsWithInheritedRules(VitamContext vitamContext, java.lang.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_JSONRequestResponse<com.fasterxml.jackson.databind.JsonNode>
updateUnits(VitamContext vitamContext, java.lang.String transactionId, java.io.InputStream is)
RequestResponse<com.fasterxml.jackson.databind.JsonNode>
uploadArchiveUnit(VitamContext vitamContext, com.fasterxml.jackson.databind.JsonNode unitJsonNode, java.lang.String transactionId)
ADD Archive Unit Consume and produce MediaType.APPLICATION_JSONRequestResponse<com.fasterxml.jackson.databind.JsonNode>
uploadProjectZip(VitamContext vitamContext, java.lang.String transactionId, java.io.InputStream inputStreamUploaded)
Upload zip and consume Consume CommonMediaType.ZIP-
Methods inherited from interface fr.gouv.vitam.common.client.MockOrRestClient
checkStatus, checkStatus, close, consumeAnyEntityAndClose, getResourcePath, getServiceUrl
-
-
-
-
Method Detail
-
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, java.lang.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, java.lang.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, java.lang.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, java.lang.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, java.lang.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, java.lang.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, java.lang.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, java.lang.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, java.lang.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, java.lang.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, java.lang.String unitId, java.lang.Integer version, com.fasterxml.jackson.databind.JsonNode objectJsonNode, java.lang.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, java.lang.String unitId, java.lang.Integer version, java.io.InputStream inputStreamUploaded, java.lang.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, java.lang.String transactionId) throws VitamClientException
Close Transaction Consume and produce MediaType.APPLICATION_JSON- Returns:
- Response
- Throws:
VitamClientException
- exception occurs when parse operation failed
-
ingest
RequestResponse ingest(VitamContext vitamContext, java.lang.String transactionId) throws VitamClientException
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, java.lang.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, java.lang.String transactionId) throws VitamClientException
Reopen Transaction Consume and produce MediaType.APPLICATION_JSON- Returns:
- RequestResponse
- Throws:
VitamClientException
- exception occurs when parse operation failed
-
uploadProjectZip
RequestResponse<com.fasterxml.jackson.databind.JsonNode> uploadProjectZip(VitamContext vitamContext, java.lang.String transactionId, java.io.InputStream inputStreamUploaded) throws VitamClientException
Upload zip and consume Consume CommonMediaType.ZIP- Returns:
- RequestResponse
- Throws:
VitamClientException
- exception occurs when parse operation failed
-
getObjectStreamByUnitId
javax.ws.rs.core.Response getObjectStreamByUnitId(VitamContext vitamContext, java.lang.String unitId, java.lang.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
RequestResponse<com.fasterxml.jackson.databind.JsonNode> updateUnits(VitamContext vitamContext, java.lang.String transactionId, java.io.InputStream is) throws VitamClientException
- Throws:
VitamClientException
-
selectUnitsWithInheritedRules
RequestResponse<com.fasterxml.jackson.databind.JsonNode> selectUnitsWithInheritedRules(VitamContext vitamContext, java.lang.String transactionId, com.fasterxml.jackson.databind.JsonNode selectQuery) throws VitamClientException
- Throws:
VitamClientException
-
-