Package fr.gouv.vitam.metadata.client
Class MetaDataClientRest
java.lang.Object
fr.gouv.vitam.common.client.DefaultClient
fr.gouv.vitam.metadata.client.MetaDataClientRest
- All Implemented Interfaces:
BasicClient,MockOrRestClient,VitamAutoCloseable,MetaDataClient,AutoCloseable
-
Field Summary
FieldsFields inherited from interface fr.gouv.vitam.common.client.BasicClient
STATUS_URL -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionRequestResponse<com.fasterxml.jackson.databind.JsonNode>atomicUpdateBulk(List<com.fasterxml.jackson.databind.JsonNode> updateQueries) Bulk Update units by a list of update query (DSL)voidCheck the status from the servicevoidcheckStatus(javax.ws.rs.core.MultivaluedHashMap<String, Object> headers) Check the status from the service used to passe "X-SSL-CLIENT-CERT" header that contain a pem certificatejavax.ws.rs.core.ResponseclearESScrollFilter(String scrollId) voidclose()Close the underneath http clientcomputeGraph(com.fasterxml.jackson.databind.JsonNode queryDsl) Compute graph of all Units/Got that match the given query dsl The returned number of treated object group is an estimation, as object group can be computed several timescomputeGraph(GraphComputeResponse.GraphComputeAction action, Set<String> ids) Compute graph of all document match ids.final voidconsumeAnyEntityAndClose(javax.ws.rs.core.Response response) Helper when an error occurs on client usage side to consume response howevercom.fasterxml.jackson.databind.JsonNodeCreates the AccessionRegisterSymbolics from ElasticSearch aggregations and nested aggregation request.voiddeleteObjectGroupBulk(Collection<String> listIds) Delete Object Group BulkvoiddeleteUnitsBulk(Collection<String> listIds) delete UnitsBulkvoidexportReclassificationChildNodes(Set<String> ids, String unitsToUpdateJsonLineFileName, String objectGroupsToUpdateJsonLineFileName) Export all units and object groups that are a descendants of the provided units to workspace for graph update.javax.ws.rs.client.Clientjavax.ws.rs.client.ClientRequestResponse<com.fasterxml.jackson.databind.JsonNode>getObjectGroupByIdRaw(String objectGroupId) Search object group by path unit idRequestResponse<com.fasterxml.jackson.databind.JsonNode>getObjectGroupsByIdsRaw(Collection<String> objectGroupId) Select raw object group by idscom.fasterxml.jackson.databind.JsonNodegetPurgedPersistentIdentifiers(String persistentIdentifier, PurgedCollectionType type) Get the resource path of the server.Get the service URLRequestResponse<com.fasterxml.jackson.databind.JsonNode>getUnitByIdRaw(String unitId) Search units by path unit idRequestResponse<com.fasterxml.jackson.databind.JsonNode>getUnitsByIdsRaw(Collection<String> unitIds) Select raw unis by idscom.fasterxml.jackson.databind.JsonNodeinsertObjectGroup(com.fasterxml.jackson.databind.JsonNode insertQuery) com.fasterxml.jackson.databind.JsonNodeinsertObjectGroups(List<com.fasterxml.jackson.databind.JsonNode> insertQueries) com.fasterxml.jackson.databind.JsonNodeinsertUnitBulk(BulkUnitInsertRequest request) javax.ws.rs.core.Responsemake(VitamRequestBuilder request) javax.ws.rs.core.ResponsemakeSpecifyingUrl(VitamRequestBuilder request) javax.ws.rs.core.ResponseAPI to process obsolete compute inherited rules service for metadatas.javax.ws.rs.core.ResponseAPI to process purge expired DIP files service for metadatas.javax.ws.rs.core.ResponseAPI to process purge expired tranfering SIP files service for metadatas.reconstructCollection(List<ReconstructionRequestItem> reconstructionItems) API to access and launch the Vitam reconstruction service for metadatas.RequestResponse<com.fasterxml.jackson.databind.JsonNode>Reconstruct Persistent Identifiersbooleanbooleancom.fasterxml.jackson.databind.JsonNodereindex(IndexParameters indexParam) Reindex a collection with parametersjavax.ws.rs.core.ResponseAPI to process audit data consistency Mongo and ES service for metadatas.selectAccessionRegisterOnObjectByOperationId(String operationId) selectAccessionRegisterOnUnitByOperationId(String operationId) com.fasterxml.jackson.databind.JsonNodeselectObjectGroups(com.fasterxml.jackson.databind.JsonNode selectQuery) Search objectgroups by select query (DSL)com.fasterxml.jackson.databind.JsonNodeselectObjectGrouptbyId(com.fasterxml.jackson.databind.JsonNode selectQuery, String objectGroupId) Search Object Group by query (DSL) and path objectGroup idcom.fasterxml.jackson.databind.JsonNodeselectUnitbyId(com.fasterxml.jackson.databind.JsonNode selectQuery, String unitId) Search units by query (DSL) and path unit idcom.fasterxml.jackson.databind.JsonNodeselectUnits(com.fasterxml.jackson.databind.JsonNode selectQuery) Search units by select query (DSL)List<RequestResponseOK<com.fasterxml.jackson.databind.JsonNode>>selectUnitsBulk(List<com.fasterxml.jackson.databind.JsonNode> selectQueryBulk) Bulk Search units by a list of select query (DSL)com.fasterxml.jackson.databind.JsonNodeselectUnitsWithInheritedRules(com.fasterxml.jackson.databind.JsonNode selectQuery) Select units with inherited rules by select query (DSL)static voidstaticConsumeAnyEntityAndClose(javax.ws.rs.core.Response response) This method consume everything (in particular InputStream) and close the response.javax.ws.rs.core.ResponseAPI to access and launch the Vitam store graph service for metadatas.javax.ws.rs.core.ResponsestreamObjects(com.fasterxml.jackson.databind.JsonNode selectQuery) javax.ws.rs.core.ResponsestreamUnits(com.fasterxml.jackson.databind.JsonNode selectQuery) switchIndexes(SwitchIndexParameters switchIndexParam) Switch indexestoString()voidupdateObjectGroupById(com.fasterxml.jackson.databind.JsonNode queryUpdate, String objectGroupId) Update ObjectGroupRequestResponse<com.fasterxml.jackson.databind.JsonNode>updateUnitBulk(com.fasterxml.jackson.databind.JsonNode updateQuery) Update units Bulk.com.fasterxml.jackson.databind.JsonNodeupdateUnitById(com.fasterxml.jackson.databind.JsonNode updateQuery, String unitId) Update units by query (DSL) and path unit idRequestResponse<com.fasterxml.jackson.databind.JsonNode>updateUnitsRulesBulk(List<String> unitsIds, RuleActions actions, Map<String, DurationData> rulesToDurationData) Update units rules Bulk.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface fr.gouv.vitam.common.client.MockOrRestClient
checkStatus, checkStatus, close, consumeAnyEntityAndClose, getResourcePath, getServiceUrl
-
Field Details
-
CLEAR_SCROLL_FILTER_URI
- See Also:
-
-
Constructor Details
-
MetaDataClientRest
-
-
Method Details
-
insertUnitBulk
public com.fasterxml.jackson.databind.JsonNode insertUnitBulk(BulkUnitInsertRequest request) throws InvalidParseOperationException, MetaDataExecutionException, MetaDataNotFoundException, MetaDataDocumentSizeException, MetaDataClientServerException -
selectUnits
public com.fasterxml.jackson.databind.JsonNode selectUnits(com.fasterxml.jackson.databind.JsonNode selectQuery) throws MetaDataExecutionException, MetaDataDocumentSizeException, InvalidParseOperationException, MetaDataClientServerException Description copied from interface:MetaDataClientSearch units by select query (DSL)- Specified by:
selectUnitsin interfaceMetaDataClient- Parameters:
selectQuery- : select querySelectMultiQueryas String
Null is not allowed- Returns:
- Json object {$hint:{},$result:[{},{}]}
- Throws:
MetaDataExecutionException- thrown when internal Server Error (fatal technical exception thrown)MetaDataDocumentSizeException- thrown when Query document Size is Too LargeInvalidParseOperationExceptionMetaDataClientServerException
-
selectUnitsBulk
public List<RequestResponseOK<com.fasterxml.jackson.databind.JsonNode>> selectUnitsBulk(List<com.fasterxml.jackson.databind.JsonNode> selectQueryBulk) throws MetaDataExecutionException, MetaDataDocumentSizeException, InvalidParseOperationException, MetaDataClientServerException Description copied from interface:MetaDataClientBulk Search units by a list of select query (DSL)- Specified by:
selectUnitsBulkin interfaceMetaDataClient- Returns:
- RequestResponse object {$hint:{},$result:[{},{}]} containing a list of RequestResponse (RequestResponseOK or VitamError) as JsonNode linked to each selectQuery
- Throws:
MetaDataExecutionException- thrown when internal Server Error (fatal technical exception thrown)MetaDataDocumentSizeException- thrown when Query document Size is Too LargeInvalidParseOperationExceptionMetaDataClientServerException
-
selectObjectGroups
public com.fasterxml.jackson.databind.JsonNode selectObjectGroups(com.fasterxml.jackson.databind.JsonNode selectQuery) throws MetaDataExecutionException, MetaDataDocumentSizeException, InvalidParseOperationException, MetaDataClientServerException Description copied from interface:MetaDataClientSearch objectgroups by select query (DSL)- Specified by:
selectObjectGroupsin interfaceMetaDataClient- Parameters:
selectQuery- : select querySelectMultiQueryas String
Null is not allowed- Returns:
- Json object {$hint:{},$result:[{},{}]}
- Throws:
MetaDataExecutionException- thrown when internal Server Error (fatal technical exception thrown)MetaDataDocumentSizeException- thrown when Query document Size is Too LargeInvalidParseOperationExceptionMetaDataClientServerException
-
selectUnitbyId
public com.fasterxml.jackson.databind.JsonNode selectUnitbyId(com.fasterxml.jackson.databind.JsonNode selectQuery, String unitId) throws MetaDataExecutionException, MetaDataDocumentSizeException, InvalidParseOperationException, MetaDataClientServerException Description copied from interface:MetaDataClientSearch units by query (DSL) and path unit id- Specified by:
selectUnitbyIdin interfaceMetaDataClient- Parameters:
selectQuery- : select querySelectas JsonNode
Null is not allowedunitId- : unit id
null and blank is not allowed- Returns:
- Json object {$hint:{},$result:[{},{}]}
- Throws:
MetaDataExecutionException- thrown when internal Server Error (fatal technical exception thrown)MetaDataDocumentSizeException- thrown when Query document Size is Too LargeInvalidParseOperationExceptionMetaDataClientServerException
-
selectObjectGrouptbyId
public com.fasterxml.jackson.databind.JsonNode selectObjectGrouptbyId(com.fasterxml.jackson.databind.JsonNode selectQuery, String objectGroupId) throws MetaDataExecutionException, MetaDataNotFoundException, MetaDataDocumentSizeException, InvalidParseOperationException, MetaDataClientServerException Description copied from interface:MetaDataClientSearch Object Group by query (DSL) and path objectGroup id- Specified by:
selectObjectGrouptbyIdin interfaceMetaDataClient- Parameters:
selectQuery- : select querySelectas JsonNode
Null is not allowedobjectGroupId- : objectGroup id
null and blank is not allowed- Returns:
- Json object {$hint:{},$result:[{},{}]}
- Throws:
MetaDataExecutionException- thrown when internal Server Error (fatal technical exception thrown)MetaDataNotFoundExceptionMetaDataDocumentSizeException- thrown when Query document Size is Too LargeInvalidParseOperationException- thrown when the Query is badly formatted or objectGroupId is emptyMetaDataClientServerException
-
updateUnitById
public com.fasterxml.jackson.databind.JsonNode updateUnitById(com.fasterxml.jackson.databind.JsonNode updateQuery, String unitId) throws MetaDataExecutionException, MetaDataDocumentSizeException, InvalidParseOperationException, MetaDataClientServerException, MetaDataNotFoundException Description copied from interface:MetaDataClientUpdate units by query (DSL) and path unit id- Specified by:
updateUnitByIdin interfaceMetaDataClient- Parameters:
updateQuery- update querySelectas JsonNode
Null is not allowedunitId- unit id
null and blank is not allowed- Returns:
- Json object {$hint:{},$result:[{},{}]}
- Throws:
MetaDataExecutionException- thrown when internal Server Error (fatal technical exception thrown)MetaDataDocumentSizeException- thrown when Query document Size is Too LargeInvalidParseOperationExceptionMetaDataClientServerExceptionMetaDataNotFoundException
-
insertObjectGroup
public com.fasterxml.jackson.databind.JsonNode insertObjectGroup(com.fasterxml.jackson.databind.JsonNode insertQuery) throws InvalidParseOperationException, MetaDataExecutionException, MetaDataNotFoundException, MetaDataDocumentSizeException, MetaDataClientServerException - Specified by:
insertObjectGroupin interfaceMetaDataClient- Parameters:
insertQuery- as String- Returns:
- response as JsonNode contains the request result
- Throws:
InvalidParseOperationExceptionMetaDataExecutionExceptionMetaDataNotFoundExceptionMetaDataDocumentSizeExceptionMetaDataClientServerException
-
insertObjectGroups
public com.fasterxml.jackson.databind.JsonNode insertObjectGroups(List<com.fasterxml.jackson.databind.JsonNode> insertQueries) throws InvalidParseOperationException, MetaDataExecutionException, MetaDataNotFoundException, MetaDataDocumentSizeException, MetaDataClientServerException -
updateObjectGroupById
public void updateObjectGroupById(com.fasterxml.jackson.databind.JsonNode queryUpdate, String objectGroupId) throws InvalidParseOperationException, MetaDataClientServerException, MetaDataExecutionException Description copied from interface:MetaDataClientUpdate ObjectGroup- Specified by:
updateObjectGroupByIdin interfaceMetaDataClient- Throws:
InvalidParseOperationExceptionMetaDataClientServerExceptionMetaDataExecutionException
-
selectAccessionRegisterOnUnitByOperationId
public List<UnitPerOriginatingAgency> selectAccessionRegisterOnUnitByOperationId(String operationId) throws MetaDataClientServerException - Specified by:
selectAccessionRegisterOnUnitByOperationIdin interfaceMetaDataClient- Returns:
- the list of UnitsPerOriginatingAgency
- Throws:
MetaDataClientServerException
-
selectAccessionRegisterOnObjectByOperationId
public List<ObjectGroupPerOriginatingAgency> selectAccessionRegisterOnObjectByOperationId(String operationId) throws MetaDataClientServerException - Specified by:
selectAccessionRegisterOnObjectByOperationIdin interfaceMetaDataClient- Returns:
- the list of ObjectGroupPerOriginatingAgency
- Throws:
MetaDataClientServerException
-
refreshUnits
- Specified by:
refreshUnitsin interfaceMetaDataClient- Returns:
- True if the Units index is refreshed
- Throws:
MetaDataClientServerException
-
refreshObjectGroups
- Specified by:
refreshObjectGroupsin interfaceMetaDataClient- Returns:
- True if the ObjectGroups index is refreshed
- Throws:
MetaDataClientServerException
-
reindex
public com.fasterxml.jackson.databind.JsonNode reindex(IndexParameters indexParam) throws InvalidParseOperationException, MetaDataClientServerException, MetaDataNotFoundException Description copied from interface:MetaDataClientReindex a collection with parameters- Specified by:
reindexin interfaceMetaDataClient- Parameters:
indexParam- reindexation parameters- Returns:
- JsonObject containing information about the newly created index
- Throws:
InvalidParseOperationExceptionMetaDataClientServerExceptionMetaDataNotFoundException- in case the index does not exist
-
switchIndexes
public SwitchIndexResult switchIndexes(SwitchIndexParameters switchIndexParam) throws InvalidParseOperationException, MetaDataClientServerException, MetaDataNotFoundException Description copied from interface:MetaDataClientSwitch indexes- Specified by:
switchIndexesin interfaceMetaDataClient- Parameters:
switchIndexParam- switch index parameters- Returns:
- JsonObject containing information about the newly created index
- Throws:
InvalidParseOperationExceptionMetaDataClientServerExceptionMetaDataNotFoundException- in case the index does not exist
-
getUnitByIdRaw
public RequestResponse<com.fasterxml.jackson.databind.JsonNode> getUnitByIdRaw(String unitId) throws VitamClientException Description copied from interface:MetaDataClientSearch units by path unit id- Specified by:
getUnitByIdRawin interfaceMetaDataClient- Parameters:
unitId- : unit id
null and blank is not allowed- Returns:
- Json object {$hint:{},$result:[{}]} or vitam error
- Throws:
VitamClientException
-
getUnitsByIdsRaw
public RequestResponse<com.fasterxml.jackson.databind.JsonNode> getUnitsByIdsRaw(Collection<String> unitIds) throws VitamClientException Description copied from interface:MetaDataClientSelect raw unis by ids- Specified by:
getUnitsByIdsRawin interfaceMetaDataClient- Parameters:
unitIds- : unit ids
null and blank is not allowed- Returns:
- Json object {$hint:{},$result:[{}]} or vitam error
- Throws:
VitamClientException
-
getObjectGroupByIdRaw
public RequestResponse<com.fasterxml.jackson.databind.JsonNode> getObjectGroupByIdRaw(String objectGroupId) throws VitamClientException Description copied from interface:MetaDataClientSearch object group by path unit id- Specified by:
getObjectGroupByIdRawin interfaceMetaDataClient- Parameters:
objectGroupId- : objectGroup id
null and blank is not allowed- Returns:
- Json object {$hint:{},$result:[{}]} or vitam error
- Throws:
VitamClientException
-
getObjectGroupsByIdsRaw
public RequestResponse<com.fasterxml.jackson.databind.JsonNode> getObjectGroupsByIdsRaw(Collection<String> objectGroupId) throws VitamClientException Description copied from interface:MetaDataClientSelect raw object group by ids- Specified by:
getObjectGroupsByIdsRawin interfaceMetaDataClient- Parameters:
objectGroupId- : object group ids
null and blank is not allowed- Returns:
- Json object {$hint:{},$result:[{}]} or vitam error
- Throws:
VitamClientException
-
computeGraph
public GraphComputeResponse computeGraph(com.fasterxml.jackson.databind.JsonNode queryDsl) throws VitamClientException Description copied from interface:MetaDataClientCompute graph of all Units/Got that match the given query dsl The returned number of treated object group is an estimation, as object group can be computed several times- Specified by:
computeGraphin interfaceMetaDataClient- Returns:
- GraphComputeResponse
- Throws:
VitamClientException
-
computeGraph
public GraphComputeResponse computeGraph(GraphComputeResponse.GraphComputeAction action, Set<String> ids) throws VitamClientException Description copied from interface:MetaDataClientCompute graph of all document match ids. The document can be UNIT, OBJECTGROUP, or UNIT AND OBJECTGROUP In case of UNIT AND OBJECTGROUP, the ids set is id of UNITs- Specified by:
computeGraphin interfaceMetaDataClient- Returns:
- GraphComputeResponse
- Throws:
VitamClientException
-
exportReclassificationChildNodes
public void exportReclassificationChildNodes(Set<String> ids, String unitsToUpdateJsonLineFileName, String objectGroupsToUpdateJsonLineFileName) throws VitamClientException, MetaDataExecutionException Description copied from interface:MetaDataClientExport all units and object groups that are a descendants of the provided units to workspace for graph update.- Specified by:
exportReclassificationChildNodesin interfaceMetaDataClient- Parameters:
ids- the unit ids for which all descendant nodes (units and object groups) are to be updated.- Throws:
VitamClientExceptionMetaDataExecutionException
-
deleteUnitsBulk
public void deleteUnitsBulk(Collection<String> listIds) throws MetaDataExecutionException, MetaDataClientServerException Description copied from interface:MetaDataClientdelete UnitsBulk- Specified by:
deleteUnitsBulkin interfaceMetaDataClient- Parameters:
listIds- list of id to delete- Throws:
MetaDataExecutionException- MetaDataExecutionExceptionMetaDataClientServerException- MetaDataClientServerException
-
deleteObjectGroupBulk
public void deleteObjectGroupBulk(Collection<String> listIds) throws MetaDataExecutionException, MetaDataClientServerException Description copied from interface:MetaDataClientDelete Object Group Bulk- Specified by:
deleteObjectGroupBulkin interfaceMetaDataClient- Parameters:
listIds- list of id to delete- Throws:
MetaDataExecutionException- MetaDataExecutionExceptionMetaDataClientServerException- MetaDataClientServerException
-
storeGraph
public javax.ws.rs.core.Response storeGraph() throws MetaDataNotFoundException, MetaDataDocumentSizeException, MetaDataExecutionException, InvalidParseOperationException, MetaDataClientServerExceptionDescription copied from interface:MetaDataClientAPI to access and launch the Vitam store graph service for metadatas.- Specified by:
storeGraphin interfaceMetaDataClient- Returns:
- Throws:
MetaDataExecutionException- MetaDataExecutionExceptionMetaDataClientServerException- MetaDataClientServerExceptionMetaDataNotFoundExceptionMetaDataDocumentSizeExceptionInvalidParseOperationException
-
reconstructCollection
public List<ReconstructionResponseItem> reconstructCollection(List<ReconstructionRequestItem> reconstructionItems) throws MetaDataNotFoundException, InvalidParseOperationException, MetaDataClientServerException Description copied from interface:MetaDataClientAPI to access and launch the Vitam reconstruction service for metadatas.- Specified by:
reconstructCollectionin interfaceMetaDataClient- Parameters:
reconstructionItems- list of reconstruction request items- Returns:
- Throws:
MetaDataClientServerException- MetaDataClientServerExceptionMetaDataNotFoundExceptionInvalidParseOperationException
-
reconstructPersistentIdentifiers
public RequestResponse<com.fasterxml.jackson.databind.JsonNode> reconstructPersistentIdentifiers(PersistentIdentifierReconstructionRequest requestItem) throws MetaDataNotFoundException, InvalidParseOperationException, MetaDataClientServerException Description copied from interface:MetaDataClientReconstruct Persistent Identifiers- Specified by:
reconstructPersistentIdentifiersin interfaceMetaDataClient- Returns:
- Throws:
MetaDataNotFoundExceptionInvalidParseOperationExceptionMetaDataClientServerException
-
getPurgedPersistentIdentifiers
public com.fasterxml.jackson.databind.JsonNode getPurgedPersistentIdentifiers(String persistentIdentifier, @Nullable PurgedCollectionType type) throws MetaDataNotFoundException, InvalidParseOperationException, MetaDataClientServerException - Specified by:
getPurgedPersistentIdentifiersin interfaceMetaDataClient- Throws:
MetaDataNotFoundExceptionInvalidParseOperationExceptionMetaDataClientServerException
-
updateUnitBulk
public RequestResponse<com.fasterxml.jackson.databind.JsonNode> updateUnitBulk(com.fasterxml.jackson.databind.JsonNode updateQuery) throws InvalidParseOperationException, MetaDataExecutionException, MetaDataNotFoundException, MetaDataDocumentSizeException, MetaDataClientServerException Description copied from interface:MetaDataClientUpdate units Bulk.- Specified by:
updateUnitBulkin interfaceMetaDataClient- Returns:
- Throws:
InvalidParseOperationExceptionMetaDataExecutionExceptionMetaDataNotFoundExceptionMetaDataDocumentSizeExceptionMetaDataClientServerException
-
atomicUpdateBulk
public RequestResponse<com.fasterxml.jackson.databind.JsonNode> atomicUpdateBulk(List<com.fasterxml.jackson.databind.JsonNode> updateQueries) throws InvalidParseOperationException, MetaDataExecutionException, MetaDataNotFoundException, MetaDataDocumentSizeException, MetaDataClientServerException Description copied from interface:MetaDataClientBulk Update units by a list of update query (DSL)- Specified by:
atomicUpdateBulkin interfaceMetaDataClient- Parameters:
updateQueries- : update queryUpdateMultiQueryas String Null is not allowed List can be empty- Returns:
- RequestResponse object {$hint:{},$result:[{},{}]} containing a list of RequestResponse (RequestResponseOK or VitamError) as JsonNode linked to each updateQuery
- Throws:
InvalidParseOperationExceptionMetaDataExecutionExceptionMetaDataNotFoundExceptionMetaDataDocumentSizeExceptionMetaDataClientServerException
-
updateUnitsRulesBulk
public RequestResponse<com.fasterxml.jackson.databind.JsonNode> updateUnitsRulesBulk(List<String> unitsIds, RuleActions actions, Map<String, DurationData> rulesToDurationData) throws InvalidParseOperationException, MetaDataExecutionException, MetaDataNotFoundException, MetaDataDocumentSizeException, MetaDataClientServerExceptionDescription copied from interface:MetaDataClientUpdate units rules Bulk.- Specified by:
updateUnitsRulesBulkin interfaceMetaDataClient- Parameters:
unitsIds- the bulk unit ids to update- Returns:
- Throws:
InvalidParseOperationExceptionMetaDataExecutionExceptionMetaDataNotFoundExceptionMetaDataDocumentSizeExceptionMetaDataClientServerException
-
selectUnitsWithInheritedRules
public com.fasterxml.jackson.databind.JsonNode selectUnitsWithInheritedRules(com.fasterxml.jackson.databind.JsonNode selectQuery) throws MetaDataDocumentSizeException, InvalidParseOperationException, MetaDataClientServerException, MetaDataExecutionException Description copied from interface:MetaDataClientSelect units with inherited rules by select query (DSL)- Specified by:
selectUnitsWithInheritedRulesin interfaceMetaDataClient- Parameters:
selectQuery- : select query- Returns:
- Json object
- Throws:
MetaDataDocumentSizeException- thrown when Query document Size is Too LargeInvalidParseOperationExceptionMetaDataClientServerExceptionMetaDataExecutionException
-
createAccessionRegisterSymbolic
public com.fasterxml.jackson.databind.JsonNode createAccessionRegisterSymbolic() throws MetaDataClientServerException, MetaDataExecutionExceptionDescription copied from interface:MetaDataClientCreates the AccessionRegisterSymbolics from ElasticSearch aggregations and nested aggregation request. Because the AccessionRegisterSymbolic is not available from this package, it is a JsonNode which is returned.- Specified by:
createAccessionRegisterSymbolicin interfaceMetaDataClient- Returns:
- a list of AccessionRegisterSymbolic as JsonNode
- Throws:
MetaDataClientServerExceptionMetaDataExecutionException
-
streamUnits
public javax.ws.rs.core.Response streamUnits(com.fasterxml.jackson.databind.JsonNode selectQuery) throws MetaDataClientServerException, MetadataScrollThresholdExceededException, MetadataScrollLimitExceededException - Specified by:
streamUnitsin interfaceMetaDataClient- Throws:
MetaDataClientServerExceptionMetadataScrollThresholdExceededExceptionMetadataScrollLimitExceededException
-
streamObjects
public javax.ws.rs.core.Response streamObjects(com.fasterxml.jackson.databind.JsonNode selectQuery) throws MetaDataClientServerException, MetadataScrollThresholdExceededException, MetadataScrollLimitExceededException - Specified by:
streamObjectsin interfaceMetaDataClient- Throws:
MetaDataClientServerExceptionMetadataScrollThresholdExceededExceptionMetadataScrollLimitExceededException
-
processObsoleteComputedInheritedRules
public javax.ws.rs.core.Response processObsoleteComputedInheritedRules() throws MetaDataNotFoundException, InvalidParseOperationException, MetaDataClientServerExceptionDescription copied from interface:MetaDataClientAPI to process obsolete compute inherited rules service for metadatas.- Specified by:
processObsoleteComputedInheritedRulesin interfaceMetaDataClient- Returns:
- Throws:
MetaDataClientServerException- MetaDataClientServerException InvalidParseOperationExceptionMetaDataNotFoundExceptionInvalidParseOperationException
-
purgeExpiredDipFiles
public javax.ws.rs.core.Response purgeExpiredDipFiles() throws MetaDataNotFoundException, InvalidParseOperationException, MetaDataClientServerExceptionDescription copied from interface:MetaDataClientAPI to process purge expired DIP files service for metadatas.- Specified by:
purgeExpiredDipFilesin interfaceMetaDataClient- Returns:
- Throws:
MetaDataClientServerException- MetaDataClientServerException InvalidParseOperationExceptionMetaDataNotFoundExceptionInvalidParseOperationException
-
purgeExpiredTransfersSIPFiles
public javax.ws.rs.core.Response purgeExpiredTransfersSIPFiles() throws MetaDataNotFoundException, InvalidParseOperationException, MetaDataClientServerExceptionDescription copied from interface:MetaDataClientAPI to process purge expired tranfering SIP files service for metadatas.- Specified by:
purgeExpiredTransfersSIPFilesin interfaceMetaDataClient- Returns:
- Throws:
MetaDataClientServerException- MetaDataClientServerException InvalidParseOperationExceptionMetaDataNotFoundExceptionInvalidParseOperationException
-
runAuditDataConsistencyMongoEs
public javax.ws.rs.core.Response runAuditDataConsistencyMongoEs() throws MetaDataNotFoundException, InvalidParseOperationException, MetaDataClientServerExceptionDescription copied from interface:MetaDataClientAPI to process audit data consistency Mongo and ES service for metadatas.- Specified by:
runAuditDataConsistencyMongoEsin interfaceMetaDataClient- Returns:
- Throws:
MetaDataClientServerException- MetaDataClientServerException InvalidParseOperationExceptionMetaDataNotFoundExceptionInvalidParseOperationException
-
clearESScrollFilter
public javax.ws.rs.core.Response clearESScrollFilter(String scrollId) throws MetaDataClientServerException - Specified by:
clearESScrollFilterin interfaceMetaDataClient- Throws:
MetaDataClientServerException
-
staticConsumeAnyEntityAndClose
public static void staticConsumeAnyEntityAndClose(javax.ws.rs.core.Response response) This method consume everything (in particular InputStream) and close the response.- Parameters:
response-
-
consumeAnyEntityAndClose
public final void consumeAnyEntityAndClose(javax.ws.rs.core.Response response) Description copied from interface:MockOrRestClientHelper when an error occurs on client usage side to consume response however- Specified by:
consumeAnyEntityAndClosein interfaceMockOrRestClient
-
checkStatus
Description copied from interface:MockOrRestClientCheck the status from the service- Specified by:
checkStatusin interfaceMockOrRestClient- Throws:
VitamApplicationServerException- if the Server is unavailable
-
checkStatus
public void checkStatus(javax.ws.rs.core.MultivaluedHashMap<String, Object> headers) throws VitamApplicationServerExceptionDescription copied from interface:MockOrRestClientCheck the status from the service used to passe "X-SSL-CLIENT-CERT" header that contain a pem certificate- Specified by:
checkStatusin interfaceMockOrRestClient- Throws:
VitamApplicationServerException- if the Server is unavailable
-
getResourcePath
Description copied from interface:MockOrRestClientGet the resource path of the server.- Specified by:
getResourcePathin interfaceMockOrRestClient- Returns:
- the resource path as string
-
getServiceUrl
Description copied from interface:MockOrRestClientGet the service URL- Specified by:
getServiceUrlin interfaceMockOrRestClient- Returns:
- the service URL
-
close
public void close()Description copied from interface:MockOrRestClientClose the underneath http client- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceMockOrRestClient- Specified by:
closein interfaceVitamAutoCloseable
-
toString
-
makeSpecifyingUrl
public javax.ws.rs.core.Response makeSpecifyingUrl(VitamRequestBuilder request) throws VitamClientInternalException - Throws:
VitamClientInternalException
-
make
public javax.ws.rs.core.Response make(VitamRequestBuilder request) throws VitamClientInternalException - Throws:
VitamClientInternalException
-
getClientFactory
-
getClient
public javax.ws.rs.client.Client getClient() -
getChunkedClient
public javax.ws.rs.client.Client getChunkedClient()
-