Interface AccessInternalClient
-
- All Superinterfaces:
java.lang.AutoCloseable,MockOrRestClient,VitamAutoCloseable
public interface AccessInternalClient extends MockOrRestClient
Access client interface
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description RequestResponse<com.fasterxml.jackson.databind.JsonNode>bulkAtomicUpdateUnits(com.fasterxml.jackson.databind.JsonNode updateQueries)Bulk atomic update of archive units with dsl query.java.util.List<StatusByAccessRequest>checkAccessRequestStatuses(java.util.List<AccessRequestReference> accessRequestReferences)java.util.Optional<AccessRequestReference>createObjectAccessRequest(java.lang.String idObjectGroup, java.lang.String qualifier, int version)RequestResponse<com.fasterxml.jackson.databind.JsonNode>deleteComputeInheritedRules(com.fasterxml.jackson.databind.JsonNode dslQuery)Perform a deletecomputedInheritedRules workflowRequestResponse<com.fasterxml.jackson.databind.JsonNode>deleteGotVersions(DeleteGotVersionsRequest request)Perform deleteGotVersions workflowjavax.ws.rs.core.ResponsedownloadAccessLogFile(com.fasterxml.jackson.databind.JsonNode params)Get Zipped AccessLog files as Streamjavax.ws.rs.core.ResponsedownloadTraceabilityFile(java.lang.String operationId)RequestResponse<com.fasterxml.jackson.databind.JsonNode>exportByUsageFilter(ExportRequest dipExportRequest)launch a DIP operation by a DSL queryRequestResponse<com.fasterxml.jackson.databind.JsonNode>exportDIP(com.fasterxml.jackson.databind.JsonNode dslRequest)launch a DIP operation by a DSL queryjavax.ws.rs.core.ResponsefindExportByID(java.lang.String id)get a zip file containing a DIP/Transfer by an operation idjavax.ws.rs.core.ResponsefindTransferSIPByID(java.lang.String id)get a zip file containing a SIP/Transfer by an operation idjavax.ws.rs.core.ResponsegetObject(java.lang.String objectGroupId, java.lang.String usage, int version, java.lang.String unitId)Retrieve an Object data as an input streamRequestResponse<com.fasterxml.jackson.databind.JsonNode>linkedCheckTraceability(com.fasterxml.jackson.databind.JsonNode query)Linked check traceabilityRequestResponse<com.fasterxml.jackson.databind.JsonNode>reclassification(com.fasterxml.jackson.databind.JsonNode reclassificationRequest)Performs a reclassification workflow.voidremoveAccessRequest(AccessRequestReference accessRequestReference)RequestResponse<com.fasterxml.jackson.databind.JsonNode>revertUnits(RevertUpdateOptions revertUpdateOptions)RequestResponse<com.fasterxml.jackson.databind.JsonNode>selectObjectbyId(com.fasterxml.jackson.databind.JsonNode selectObjectQuery, java.lang.String objectId)Retrieve an ObjectGroup as Json data based on the provided ObjectGroup idRequestResponse<com.fasterxml.jackson.databind.JsonNode>selectObjectGroupLifeCycleById(java.lang.String idObject, com.fasterxml.jackson.databind.JsonNode queryDsl)selectObjectGroupLifeCycleByIdRequestResponse<com.fasterxml.jackson.databind.JsonNode>selectObjects(com.fasterxml.jackson.databind.JsonNode selectQuery)Select Objects group based on DSL queryRequestResponse<com.fasterxml.jackson.databind.JsonNode>selectOperation(com.fasterxml.jackson.databind.JsonNode select, boolean isSliced, boolean isCrossTenant)selectOperationRequestResponse<com.fasterxml.jackson.databind.JsonNode>selectOperationById(java.lang.String processId)selectOperationbyIdRequestResponse<com.fasterxml.jackson.databind.JsonNode>selectOperationById(java.lang.String processId, com.fasterxml.jackson.databind.JsonNode queryDsl, boolean isSliced, boolean isCrossTenant)selectOperationbyIdRequestResponse<com.fasterxml.jackson.databind.JsonNode>selectUnitbyId(com.fasterxml.jackson.databind.JsonNode sqlQuery, java.lang.String id)select Unit By IdRequestResponse<com.fasterxml.jackson.databind.JsonNode>selectUnitLifeCycleById(java.lang.String idUnit, com.fasterxml.jackson.databind.JsonNode queryDsl)selectUnitLifeCycleByIdRequestResponse<com.fasterxml.jackson.databind.JsonNode>selectUnits(com.fasterxml.jackson.databind.JsonNode selectQuery)Select UnitsRequestResponse<com.fasterxml.jackson.databind.JsonNode>selectUnitsWithInheritedRules(com.fasterxml.jackson.databind.JsonNode selectQuery)Select units with inherited rules by select query (DSL)RequestResponse<com.fasterxml.jackson.databind.JsonNode>startComputeInheritedRules(com.fasterxml.jackson.databind.JsonNode dslQuery)Perform a computedInheritedRules workflowRequestResponse<com.fasterxml.jackson.databind.JsonNode>startEliminationAction(EliminationRequestBody eliminationRequestBody)Performs an elimination action workflow.RequestResponse<com.fasterxml.jackson.databind.JsonNode>startEliminationAnalysis(EliminationRequestBody eliminationRequestBody)Performs an elimination analysis workflow.RequestResponse<com.fasterxml.jackson.databind.JsonNode>startPreservation(PreservationRequest request)Perform a preservation workflowRequestResponse<com.fasterxml.jackson.databind.JsonNode>startTransferReplyWorkflow(java.io.InputStream transferReply)javax.ws.rs.core.ResponsestreamObjects(com.fasterxml.jackson.databind.JsonNode selectQuery)javax.ws.rs.core.ResponsestreamUnits(com.fasterxml.jackson.databind.JsonNode selectQuery)RequestResponse<com.fasterxml.jackson.databind.JsonNode>updateUnitbyId(com.fasterxml.jackson.databind.JsonNode updateQuery, java.lang.String unitId)update Unit By IdRequestResponse<com.fasterxml.jackson.databind.JsonNode>updateUnits(com.fasterxml.jackson.databind.JsonNode updateQuery)Mass update of archive units with dsl query.RequestResponse<com.fasterxml.jackson.databind.JsonNode>updateUnitsRules(MassUpdateUnitRuleRequest massUpdateUnitRuleRequest)Mass update of archive units rules.-
Methods inherited from interface fr.gouv.vitam.common.client.MockOrRestClient
checkStatus, checkStatus, close, consumeAnyEntityAndClose, getResourcePath, getServiceUrl
-
-
-
-
Method Detail
-
selectUnits
RequestResponse<com.fasterxml.jackson.databind.JsonNode> selectUnits(com.fasterxml.jackson.databind.JsonNode selectQuery) throws InvalidParseOperationException, AccessInternalClientServerException, AccessInternalClientNotFoundException, AccessUnauthorizedException, BadRequestException
Select Units- Parameters:
selectQuery- the query used to select units- Returns:
- a response containing a json node object including DSL queries and results
- Throws:
InvalidParseOperationException- if the query is not well formattedAccessInternalClientServerException- if the server encountered an exceptionAccessInternalClientNotFoundException- if the requested unit does not existAccessUnauthorizedExceptionBadRequestException- if empty query is found
-
streamUnits
javax.ws.rs.core.Response streamUnits(com.fasterxml.jackson.databind.JsonNode selectQuery) throws AccessInternalClientServerException, ExpectationFailedClientException, AccessUnauthorizedException
-
streamObjects
javax.ws.rs.core.Response streamObjects(com.fasterxml.jackson.databind.JsonNode selectQuery) throws AccessInternalClientServerException, ExpectationFailedClientException, AccessUnauthorizedException
-
selectUnitbyId
RequestResponse<com.fasterxml.jackson.databind.JsonNode> selectUnitbyId(com.fasterxml.jackson.databind.JsonNode sqlQuery, java.lang.String id) throws InvalidParseOperationException, AccessInternalClientServerException, AccessInternalClientNotFoundException, AccessUnauthorizedException
select Unit By Id- Parameters:
sqlQuery- the query to be executedid- the id of the unit- Returns:
- a response containing a json node object including DSL queries, context and results
- Throws:
InvalidParseOperationException- if the query is not well formattedAccessInternalClientServerException- if the server encountered an exceptionAccessInternalClientNotFoundException- if the requested unit does not existAccessUnauthorizedException
-
updateUnitbyId
RequestResponse<com.fasterxml.jackson.databind.JsonNode> updateUnitbyId(com.fasterxml.jackson.databind.JsonNode updateQuery, java.lang.String unitId) throws InvalidParseOperationException, AccessInternalClientServerException, AccessInternalClientNotFoundException, NoWritingPermissionException, AccessUnauthorizedException
update Unit By Id- Parameters:
updateQuery- the query to be executed as an updateunitId- the id of the unit- Returns:
- a response containing a json node object including DSL queries, context and results
- Throws:
InvalidParseOperationException- if the query is not well formattedAccessInternalClientServerException- if the server encountered an exceptionAccessInternalClientNotFoundException- if the requested unit does not existAccessUnauthorizedExceptionAccessInternalRuleExecutionExceptionNoWritingPermissionException
-
updateUnits
RequestResponse<com.fasterxml.jackson.databind.JsonNode> updateUnits(com.fasterxml.jackson.databind.JsonNode updateQuery) throws InvalidParseOperationException, AccessInternalClientServerException, NoWritingPermissionException, AccessUnauthorizedException
Mass update of archive units with dsl query.- Parameters:
updateQuery- the query to be executed to update archive units- Returns:
- a response containing a json node object including DSL queries, context and results
- Throws:
InvalidParseOperationException- if the query is not well formattedAccessInternalClientServerException- if the server encountered an exceptionAccessInternalClientNotFoundException- if the requested unit does not existAccessUnauthorizedExceptionAccessInternalRuleExecutionExceptionNoWritingPermissionException
-
updateUnitsRules
RequestResponse<com.fasterxml.jackson.databind.JsonNode> updateUnitsRules(MassUpdateUnitRuleRequest massUpdateUnitRuleRequest) throws InvalidParseOperationException, AccessInternalClientServerException, NoWritingPermissionException, AccessUnauthorizedException
Mass update of archive units rules.- Parameters:
massUpdateUnitRuleRequest- the request to be used to update archive units rules- Returns:
- a response containing a json node object including queries, context and results
- Throws:
InvalidParseOperationException- if the query is not well formattedAccessInternalClientServerException- if the server encountered an exceptionAccessInternalClientNotFoundException- if the requested unit does not existAccessUnauthorizedExceptionAccessInternalRuleExecutionExceptionNoWritingPermissionException
-
bulkAtomicUpdateUnits
RequestResponse<com.fasterxml.jackson.databind.JsonNode> bulkAtomicUpdateUnits(com.fasterxml.jackson.databind.JsonNode updateQueries) throws InvalidParseOperationException, AccessInternalClientServerException, NoWritingPermissionException, AccessUnauthorizedException
Bulk atomic update of archive units with dsl query.- Parameters:
updateQueries- the request containing a list of update queries to be executed to update archive units and the threshold- Returns:
- a response containing a json node object including DSL queries, context and results
- Throws:
InvalidParseOperationException- if the query is not well formattedAccessInternalClientServerException- if the server encountered an exceptionAccessInternalClientNotFoundException- if the requested unit does not existAccessUnauthorizedExceptionAccessInternalRuleExecutionExceptionNoWritingPermissionException
-
selectObjectbyId
RequestResponse<com.fasterxml.jackson.databind.JsonNode> selectObjectbyId(com.fasterxml.jackson.databind.JsonNode selectObjectQuery, java.lang.String objectId) throws InvalidParseOperationException, AccessInternalClientServerException, AccessInternalClientNotFoundException, AccessUnauthorizedException
Retrieve an ObjectGroup as Json data based on the provided ObjectGroup id- Parameters:
selectObjectQuery- the query to be executedobjectId- the Id of the ObjectGroup- Returns:
- a response containing a json node object including DSL queries, context and results
- Throws:
InvalidParseOperationException- if the query is not well formattedAccessInternalClientServerException- if the server encountered an exceptionAccessInternalClientNotFoundException- if the requested object does not existAccessUnauthorizedException
-
getObject
javax.ws.rs.core.Response getObject(java.lang.String objectGroupId, java.lang.String usage, int version, java.lang.String unitId) throws InvalidParseOperationException, AccessInternalClientServerException, AccessInternalClientNotFoundException, AccessUnauthorizedException, AccessInternalClientUnavailableDataFromAsyncOfferExceptionRetrieve an Object data as an input stream- Parameters:
objectGroupId- the Id of the ObjectGroupusage- the requested usageversion- the requested version of the usageunitId- the id used by the user to have access to the object- Returns:
- Response containing InputStream for the object data
- Throws:
InvalidParseOperationException- if the query is not well formattedAccessInternalClientServerException- if the server encountered an exceptionAccessInternalClientNotFoundException- if the requested object does not existAccessUnauthorizedExceptionAccessInternalClientUnavailableDataFromAsyncOfferException- if access to the requested object requires an Access Request.
-
selectOperation
RequestResponse<com.fasterxml.jackson.databind.JsonNode> selectOperation(com.fasterxml.jackson.databind.JsonNode select, boolean isSliced, boolean isCrossTenant) throws LogbookClientException, InvalidParseOperationException, AccessUnauthorizedException
selectOperation- Parameters:
select-isSliced-isCrossTenant-- Returns:
- a response containing a json node
- Throws:
LogbookClientExceptionInvalidParseOperationExceptionAccessUnauthorizedException
-
selectOperationById
RequestResponse<com.fasterxml.jackson.databind.JsonNode> selectOperationById(java.lang.String processId, com.fasterxml.jackson.databind.JsonNode queryDsl, boolean isSliced, boolean isCrossTenant) throws LogbookClientException, InvalidParseOperationException, AccessUnauthorizedException
selectOperationbyId- Parameters:
processId- ID of the operationqueryDsl- query to be executedisSliced- true to slice responseisCrossTenant- true to include cross tenant collection operations- Returns:
- a response containing a json node
- Throws:
LogbookClientExceptionInvalidParseOperationExceptionAccessUnauthorizedException
-
selectOperationById
RequestResponse<com.fasterxml.jackson.databind.JsonNode> selectOperationById(java.lang.String processId) throws LogbookClientException, InvalidParseOperationException, AccessUnauthorizedException
selectOperationbyId- Parameters:
processId- ID of the operation- Returns:
- a response containing a json node
- Throws:
LogbookClientExceptionInvalidParseOperationExceptionAccessUnauthorizedException
-
selectUnitLifeCycleById
RequestResponse<com.fasterxml.jackson.databind.JsonNode> selectUnitLifeCycleById(java.lang.String idUnit, com.fasterxml.jackson.databind.JsonNode queryDsl) throws LogbookClientException, InvalidParseOperationException, AccessUnauthorizedException
selectUnitLifeCycleById- Parameters:
idUnit-queryDsl- query to be executed- Returns:
- a response containing a json node
- Throws:
LogbookClientExceptionInvalidParseOperationExceptionAccessUnauthorizedException
-
selectObjectGroupLifeCycleById
RequestResponse<com.fasterxml.jackson.databind.JsonNode> selectObjectGroupLifeCycleById(java.lang.String idObject, com.fasterxml.jackson.databind.JsonNode queryDsl) throws LogbookClientException, InvalidParseOperationException, AccessUnauthorizedException
selectObjectGroupLifeCycleById- Parameters:
idObject-queryDsl- query to be executed- Returns:
- a response containing a json node
- Throws:
LogbookClientExceptionInvalidParseOperationExceptionAccessUnauthorizedException
-
linkedCheckTraceability
RequestResponse<com.fasterxml.jackson.databind.JsonNode> linkedCheckTraceability(com.fasterxml.jackson.databind.JsonNode query) throws LogbookClientException, InvalidParseOperationException, AccessUnauthorizedException
Linked check traceability- Parameters:
query- to be executed- Returns:
- a response containing a json node
- Throws:
LogbookClientServerExceptionAccessUnauthorizedExceptionLogbookClientExceptionInvalidParseOperationException
-
downloadTraceabilityFile
javax.ws.rs.core.Response downloadTraceabilityFile(java.lang.String operationId) throws AccessInternalClientServerException, AccessInternalClientNotFoundException, InvalidParseOperationException, AccessUnauthorizedException- Parameters:
operationId-- Returns:
- a response containing the traceability file
- Throws:
AccessUnauthorizedExceptionAccessInternalClientServerExceptionAccessInternalClientNotFoundExceptionInvalidParseOperationException
-
exportDIP
RequestResponse<com.fasterxml.jackson.databind.JsonNode> exportDIP(com.fasterxml.jackson.databind.JsonNode dslRequest) throws AccessInternalClientServerException
launch a DIP operation by a DSL query- Parameters:
dslRequest- query for the DIP creation- Returns:
- Throws:
AccessInternalClientServerException
-
exportByUsageFilter
RequestResponse<com.fasterxml.jackson.databind.JsonNode> exportByUsageFilter(ExportRequest dipExportRequest) throws AccessInternalClientServerException
launch a DIP operation by a DSL query- Parameters:
dipExportRequest- query for the DIP/Tranfer creation- Returns:
- Throws:
AccessInternalClientServerException
-
findExportByID
javax.ws.rs.core.Response findExportByID(java.lang.String id) throws AccessInternalClientServerExceptionget a zip file containing a DIP/Transfer by an operation id- Parameters:
id- operationId- Returns:
- stream containing zip file
- Throws:
AccessInternalClientServerException
-
findTransferSIPByID
javax.ws.rs.core.Response findTransferSIPByID(java.lang.String id) throws AccessInternalClientServerExceptionget a zip file containing a SIP/Transfer by an operation id- Parameters:
id- operationId- Returns:
- stream containing zip file
- Throws:
AccessInternalClientServerException
-
reclassification
RequestResponse<com.fasterxml.jackson.databind.JsonNode> reclassification(com.fasterxml.jackson.databind.JsonNode reclassificationRequest) throws AccessInternalClientServerException
Performs a reclassification workflow.- Parameters:
reclassificationRequest- List of attachment and detachment operations in unit graph.- Returns:
- Response
- Throws:
AccessInternalClientServerException
-
selectObjects
RequestResponse<com.fasterxml.jackson.databind.JsonNode> selectObjects(com.fasterxml.jackson.databind.JsonNode selectQuery) throws InvalidParseOperationException, AccessInternalClientServerException, AccessInternalClientNotFoundException, AccessUnauthorizedException, BadRequestException
Select Objects group based on DSL query- Parameters:
selectQuery- the query used to select objects- Returns:
- a response containing a json node object including DSL queries and results
- Throws:
InvalidParseOperationException- if the query is not well formattedAccessInternalClientServerException- if the server encountered an exceptionAccessInternalClientNotFoundException- if the requested object does not existAccessUnauthorizedExceptionBadRequestException- if empty query is found
-
selectUnitsWithInheritedRules
RequestResponse<com.fasterxml.jackson.databind.JsonNode> selectUnitsWithInheritedRules(com.fasterxml.jackson.databind.JsonNode selectQuery) throws InvalidParseOperationException, AccessInternalClientServerException, AccessInternalClientNotFoundException, AccessUnauthorizedException, BadRequestException
Select units with inherited rules by select query (DSL)- Parameters:
selectQuery- : select query- Returns:
- a response containing a json node object including DSL queries and results
- Throws:
InvalidParseOperationException- if the query is not well formattedAccessInternalClientServerException- if the server encountered an exceptionAccessInternalClientNotFoundException- if the requested unit does not existAccessUnauthorizedExceptionBadRequestException- if empty query is found
-
downloadAccessLogFile
javax.ws.rs.core.Response downloadAccessLogFile(com.fasterxml.jackson.databind.JsonNode params) throws AccessInternalClientServerException, AccessInternalClientNotFoundException, InvalidParseOperationException, AccessUnauthorizedExceptionGet Zipped AccessLog files as Stream- Returns:
- a response containing zipped accessLog files as Stream
- Throws:
AccessInternalClientServerException- if the server encountered an exceptionAccessInternalClientNotFoundException- if the requested object does not existInvalidParseOperationException- if the query is not well formattedAccessUnauthorizedException
-
startEliminationAnalysis
RequestResponse<com.fasterxml.jackson.databind.JsonNode> startEliminationAnalysis(EliminationRequestBody eliminationRequestBody) throws AccessInternalClientServerException
Performs an elimination analysis workflow.- Parameters:
eliminationRequestBody- Dsl request for elimination.- Returns:
- Response given response
- Throws:
AccessInternalClientServerException
-
startEliminationAction
RequestResponse<com.fasterxml.jackson.databind.JsonNode> startEliminationAction(EliminationRequestBody eliminationRequestBody) throws AccessInternalClientServerException
Performs an elimination action workflow.- Parameters:
eliminationRequestBody- Dsl request for elimination.- Returns:
- Response given response
- Throws:
AccessInternalClientServerException- AccessInternalClientServerException
-
startPreservation
RequestResponse<com.fasterxml.jackson.databind.JsonNode> startPreservation(PreservationRequest request) throws AccessInternalClientServerException
Perform a preservation workflow- Parameters:
request- preservation request- Returns:
- the given RequestResponse
- Throws:
AccessInternalClientServerException- AccessInternalClientServerException
-
deleteGotVersions
RequestResponse<com.fasterxml.jackson.databind.JsonNode> deleteGotVersions(DeleteGotVersionsRequest request) throws AccessInternalClientServerException
Perform deleteGotVersions workflow- Parameters:
request-- Returns:
- Throws:
AccessInternalClientServerException
-
startComputeInheritedRules
RequestResponse<com.fasterxml.jackson.databind.JsonNode> startComputeInheritedRules(com.fasterxml.jackson.databind.JsonNode dslQuery) throws AccessInternalClientServerException
Perform a computedInheritedRules workflow- Parameters:
dslQuery- request to process- Returns:
- the given RequestResponse
- Throws:
AccessInternalClientServerException- AccessInternalClientServerException
-
deleteComputeInheritedRules
RequestResponse<com.fasterxml.jackson.databind.JsonNode> deleteComputeInheritedRules(com.fasterxml.jackson.databind.JsonNode dslQuery) throws AccessInternalClientServerException
Perform a deletecomputedInheritedRules workflow- Parameters:
dslQuery- request to process- Returns:
- the given RequestResponse
- Throws:
AccessInternalClientServerException- AccessInternalClientServerException
-
startTransferReplyWorkflow
RequestResponse<com.fasterxml.jackson.databind.JsonNode> startTransferReplyWorkflow(java.io.InputStream transferReply) throws AccessInternalClientServerException
-
revertUnits
RequestResponse<com.fasterxml.jackson.databind.JsonNode> revertUnits(RevertUpdateOptions revertUpdateOptions) throws AccessInternalClientServerException, InvalidParseOperationException, AccessUnauthorizedException, NoWritingPermissionException, com.fasterxml.jackson.databind.exc.InvalidFormatException
- Throws:
AccessInternalClientServerExceptionInvalidParseOperationExceptionAccessUnauthorizedExceptionNoWritingPermissionExceptioncom.fasterxml.jackson.databind.exc.InvalidFormatException
-
createObjectAccessRequest
java.util.Optional<AccessRequestReference> createObjectAccessRequest(java.lang.String idObjectGroup, java.lang.String qualifier, int version) throws AccessInternalClientServerException, AccessInternalClientNotFoundException, AccessUnauthorizedException
-
checkAccessRequestStatuses
java.util.List<StatusByAccessRequest> checkAccessRequestStatuses(java.util.List<AccessRequestReference> accessRequestReferences) throws AccessInternalClientServerException, AccessInternalClientIllegalOperationException
-
removeAccessRequest
void removeAccessRequest(AccessRequestReference accessRequestReference) throws AccessInternalClientServerException, AccessInternalClientIllegalOperationException
-
-