public class MetaDataClientMock extends AbstractMockClient implements MetaDataClient
AbstractMockClient.FakeInboundResponseINTERNAL_SERVER_ERRORSTATUS_URL| Constructor and Description |
|---|
MetaDataClientMock() |
| Modifier and Type | Method and Description |
|---|---|
GraphComputeResponse |
computeGraph(GraphComputeResponse.GraphComputeAction action,
Set<String> ids)
Compute graph of all document match ids.
|
GraphComputeResponse |
computeGraph(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 times
|
com.fasterxml.jackson.databind.JsonNode |
createAccessionRegisterSymbolic()
Creates the AccessionRegisterSymbolics from ElasticSearch aggregations and nested aggregation request.
|
void |
deleteObjectGroupBulk(Collection<String> listIds)
Delete Object Group Bulk
|
void |
deleteUnitsBulk(Collection<String> listIds)
delete UnitsBulk
|
void |
exportReclassificationChildNodes(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.
|
RequestResponse<com.fasterxml.jackson.databind.JsonNode> |
getObjectGroupByIdRaw(String objectGroupId)
Search object group by path unit id
|
RequestResponse<com.fasterxml.jackson.databind.JsonNode> |
getObjectGroupsByIdsRaw(Collection<String> objectGroupIds)
Select raw object group by ids
|
RequestResponse<com.fasterxml.jackson.databind.JsonNode> |
getUnitByIdRaw(String unitId)
Search units by path unit id
|
RequestResponse<com.fasterxml.jackson.databind.JsonNode> |
getUnitsByIdsRaw(Collection<String> unitIds)
Select raw unis by ids
|
com.fasterxml.jackson.databind.JsonNode |
insertObjectGroup(com.fasterxml.jackson.databind.JsonNode insertQuery) |
com.fasterxml.jackson.databind.JsonNode |
insertObjectGroups(List<com.fasterxml.jackson.databind.JsonNode> insertQuery) |
com.fasterxml.jackson.databind.JsonNode |
insertUnitBulk(BulkUnitInsertRequest request) |
boolean |
refreshObjectGroups() |
boolean |
refreshUnits() |
com.fasterxml.jackson.databind.JsonNode |
reindex(IndexParameters indexParam)
Reindex a collection with parameters
|
List<ObjectGroupPerOriginatingAgency> |
selectAccessionRegisterOnObjectByOperationId(String operationId) |
List<UnitPerOriginatingAgency> |
selectAccessionRegisterOnUnitByOperationId(String operationId) |
com.fasterxml.jackson.databind.JsonNode |
selectObjectGroups(com.fasterxml.jackson.databind.JsonNode selectQuery)
Search objectgroups by select query (DSL)
|
com.fasterxml.jackson.databind.JsonNode |
selectObjectGrouptbyId(com.fasterxml.jackson.databind.JsonNode selectQuery,
String objectGroupId)
Search Object Group by query (DSL) and path objectGroup id
|
com.fasterxml.jackson.databind.JsonNode |
selectUnitbyId(com.fasterxml.jackson.databind.JsonNode selectQuery,
String unitId)
Search units by query (DSL) and path unit id
|
com.fasterxml.jackson.databind.JsonNode |
selectUnits(com.fasterxml.jackson.databind.JsonNode selectQuery)
Search units by select query (DSL)
|
com.fasterxml.jackson.databind.JsonNode |
selectUnitsWithInheritedRules(com.fasterxml.jackson.databind.JsonNode selectQuery)
Select units with inherited rules by select query (DSL)
|
javax.ws.rs.core.Response |
startComputeInheritedRules(com.fasterxml.jackson.databind.JsonNode dslQuery) |
com.fasterxml.jackson.databind.JsonNode |
switchIndexes(SwitchIndexParameters switchIndexParam)
Switch indexes
|
void |
updateObjectGroupById(com.fasterxml.jackson.databind.JsonNode objectGroup,
String objectGroupId)
Update ObjectGroup
|
RequestResponse<com.fasterxml.jackson.databind.JsonNode> |
updateUnitBulk(com.fasterxml.jackson.databind.JsonNode updateQuery)
Update units Bulk.
|
com.fasterxml.jackson.databind.JsonNode |
updateUnitById(com.fasterxml.jackson.databind.JsonNode updateQuery,
String unitId)
Update units by query (DSL) and path unit id
|
RequestResponse<com.fasterxml.jackson.databind.JsonNode> |
updateUnitsRulesBulk(List<String> unitsIds,
RuleActions actions,
Map<String,DurationData> rulesToDurationData)
Update units rules Bulk.
|
checkStatus, checkStatus, close, consumeAnyEntityAndClose, getResourcePath, getServiceUrlclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcheckStatus, checkStatus, close, consumeAnyEntityAndClose, getResourcePath, getServiceUrlpublic com.fasterxml.jackson.databind.JsonNode insertUnitBulk(BulkUnitInsertRequest request) throws InvalidParseOperationException, MetaDataExecutionException, MetaDataNotFoundException, MetaDataDocumentSizeException, MetaDataClientServerException
public com.fasterxml.jackson.databind.JsonNode selectUnits(com.fasterxml.jackson.databind.JsonNode selectQuery)
throws MetaDataExecutionException,
MetaDataDocumentSizeException,
InvalidParseOperationException,
MetaDataClientServerException
MetaDataClientselectUnits in interface MetaDataClientselectQuery - : select query SelectMultiQuery
as String MetaDataExecutionException - thrown when internal Server Error (fatal technical exception thrown)MetaDataDocumentSizeException - thrown when Query document Size is Too LargeInvalidParseOperationExceptionMetaDataClientServerExceptionpublic com.fasterxml.jackson.databind.JsonNode selectUnitbyId(com.fasterxml.jackson.databind.JsonNode selectQuery,
String unitId)
throws MetaDataExecutionException,
MetaDataDocumentSizeException,
InvalidParseOperationException,
MetaDataClientServerException
MetaDataClientselectUnitbyId in interface MetaDataClientselectQuery - : select query Select as JsonNode
unitId - : unit id MetaDataExecutionException - thrown when internal Server Error (fatal technical exception thrown)MetaDataDocumentSizeException - thrown when Query document Size is Too LargeInvalidParseOperationExceptionMetaDataClientServerExceptionpublic com.fasterxml.jackson.databind.JsonNode selectObjectGrouptbyId(com.fasterxml.jackson.databind.JsonNode selectQuery,
String objectGroupId)
throws MetaDataExecutionException,
MetaDataDocumentSizeException,
InvalidParseOperationException,
MetadataInvalidSelectException,
MetaDataClientServerException
MetaDataClientselectObjectGrouptbyId in interface MetaDataClientselectQuery - : select query Select as JsonNode
objectGroupId - : objectGroup id MetaDataExecutionException - thrown when internal Server Error (fatal technical exception thrown)MetaDataDocumentSizeException - thrown when Query document Size is Too LargeInvalidParseOperationException - thrown when the Query is badly formatted or objectGroupId is emptyMetadataInvalidSelectException - thrown when objectGroupId or selectQuery id is null or blankMetaDataClientServerExceptionpublic com.fasterxml.jackson.databind.JsonNode updateUnitById(com.fasterxml.jackson.databind.JsonNode updateQuery,
String unitId)
throws MetaDataExecutionException,
MetaDataDocumentSizeException,
InvalidParseOperationException,
MetaDataClientServerException
MetaDataClientupdateUnitById in interface MetaDataClientupdateQuery - update query Select as JsonNode
unitId - unit id MetaDataExecutionException - thrown when internal Server Error (fatal technical exception thrown)MetaDataDocumentSizeException - thrown when Query document Size is Too LargeInvalidParseOperationExceptionMetaDataClientServerExceptionpublic com.fasterxml.jackson.databind.JsonNode insertObjectGroup(com.fasterxml.jackson.databind.JsonNode insertQuery)
throws InvalidParseOperationException,
MetaDataExecutionException,
MetaDataNotFoundException,
MetaDataDocumentSizeException,
MetaDataClientServerException
insertObjectGroup in interface MetaDataClientinsertQuery - as StringInvalidParseOperationExceptionMetaDataExecutionExceptionMetaDataNotFoundExceptionMetaDataDocumentSizeExceptionMetaDataClientServerExceptionpublic com.fasterxml.jackson.databind.JsonNode insertObjectGroups(List<com.fasterxml.jackson.databind.JsonNode> insertQuery) throws InvalidParseOperationException, MetaDataExecutionException, MetaDataNotFoundException, MetaDataDocumentSizeException, MetaDataClientServerException
public List<UnitPerOriginatingAgency> selectAccessionRegisterOnUnitByOperationId(String operationId) throws MetaDataClientServerException
selectAccessionRegisterOnUnitByOperationId in interface MetaDataClientMetaDataClientServerExceptionpublic List<ObjectGroupPerOriginatingAgency> selectAccessionRegisterOnObjectByOperationId(String operationId) throws MetaDataClientServerException
selectAccessionRegisterOnObjectByOperationId in interface MetaDataClientMetaDataClientServerExceptionpublic com.fasterxml.jackson.databind.JsonNode selectObjectGroups(com.fasterxml.jackson.databind.JsonNode selectQuery)
throws MetaDataExecutionException,
MetaDataDocumentSizeException,
InvalidParseOperationException,
MetaDataClientServerException
MetaDataClientselectObjectGroups in interface MetaDataClientselectQuery - : select query SelectMultiQuery
as String MetaDataExecutionException - thrown when internal Server Error (fatal technical exception thrown)MetaDataDocumentSizeException - thrown when Query document Size is Too LargeInvalidParseOperationExceptionMetaDataClientServerExceptionpublic void updateObjectGroupById(com.fasterxml.jackson.databind.JsonNode objectGroup,
String objectGroupId)
MetaDataClientupdateObjectGroupById in interface MetaDataClientpublic boolean refreshUnits()
refreshUnits in interface MetaDataClientpublic boolean refreshObjectGroups()
refreshObjectGroups in interface MetaDataClientpublic com.fasterxml.jackson.databind.JsonNode reindex(IndexParameters indexParam) throws InvalidParseOperationException, MetaDataClientServerException, MetaDataNotFoundException
MetaDataClientreindex in interface MetaDataClientindexParam - reindexation parametersInvalidParseOperationExceptionMetaDataClientServerExceptionMetaDataNotFoundException - in case the index does not existpublic com.fasterxml.jackson.databind.JsonNode switchIndexes(SwitchIndexParameters switchIndexParam) throws InvalidParseOperationException, MetaDataClientServerException, MetaDataNotFoundException
MetaDataClientswitchIndexes in interface MetaDataClientswitchIndexParam - switch index parametersInvalidParseOperationExceptionMetaDataClientServerExceptionMetaDataNotFoundException - in case the index does not existpublic RequestResponse<com.fasterxml.jackson.databind.JsonNode> getUnitByIdRaw(String unitId) throws VitamClientException
MetaDataClientgetUnitByIdRaw in interface MetaDataClientunitId - : unit id VitamClientExceptionpublic RequestResponse<com.fasterxml.jackson.databind.JsonNode> getObjectGroupByIdRaw(String objectGroupId) throws VitamClientException
MetaDataClientgetObjectGroupByIdRaw in interface MetaDataClientobjectGroupId - : objectGroup id VitamClientExceptionpublic RequestResponse<com.fasterxml.jackson.databind.JsonNode> getUnitsByIdsRaw(Collection<String> unitIds)
MetaDataClientgetUnitsByIdsRaw in interface MetaDataClientunitIds - : unit ids public RequestResponse<com.fasterxml.jackson.databind.JsonNode> getObjectGroupsByIdsRaw(Collection<String> objectGroupIds)
MetaDataClientgetObjectGroupsByIdsRaw in interface MetaDataClientobjectGroupIds - : object group ids public GraphComputeResponse computeGraph(com.fasterxml.jackson.databind.JsonNode queryDsl) throws VitamClientException
MetaDataClientcomputeGraph in interface MetaDataClientVitamClientExceptionpublic GraphComputeResponse computeGraph(GraphComputeResponse.GraphComputeAction action, Set<String> ids) throws VitamClientException
MetaDataClientcomputeGraph in interface MetaDataClientVitamClientExceptionpublic RequestResponse<com.fasterxml.jackson.databind.JsonNode> updateUnitBulk(com.fasterxml.jackson.databind.JsonNode updateQuery) throws InvalidParseOperationException, MetaDataExecutionException, MetaDataNotFoundException, MetaDataDocumentSizeException, MetaDataClientServerException
MetaDataClientupdateUnitBulk in interface MetaDataClientInvalidParseOperationExceptionMetaDataExecutionExceptionMetaDataNotFoundExceptionMetaDataDocumentSizeExceptionMetaDataClientServerExceptionpublic RequestResponse<com.fasterxml.jackson.databind.JsonNode> updateUnitsRulesBulk(List<String> unitsIds, RuleActions actions, Map<String,DurationData> rulesToDurationData) throws InvalidParseOperationException, MetaDataExecutionException, MetaDataNotFoundException, MetaDataDocumentSizeException, MetaDataClientServerException
MetaDataClientupdateUnitsRulesBulk in interface MetaDataClientunitsIds - the bulk unit ids to updateInvalidParseOperationExceptionMetaDataExecutionExceptionMetaDataNotFoundExceptionMetaDataDocumentSizeExceptionMetaDataClientServerExceptionpublic void exportReclassificationChildNodes(Set<String> ids, String unitsToUpdateJsonLineFileName, String objectGroupsToUpdateJsonLineFileName)
MetaDataClientexportReclassificationChildNodes in interface MetaDataClientids - the unit ids for which all descendant nodes (units and object groups) are to be updated.public com.fasterxml.jackson.databind.JsonNode selectUnitsWithInheritedRules(com.fasterxml.jackson.databind.JsonNode selectQuery)
MetaDataClientselectUnitsWithInheritedRules in interface MetaDataClientselectQuery - : select querypublic com.fasterxml.jackson.databind.JsonNode createAccessionRegisterSymbolic()
MetaDataClientcreateAccessionRegisterSymbolic in interface MetaDataClientpublic void deleteUnitsBulk(Collection<String> listIds)
MetaDataClientdeleteUnitsBulk in interface MetaDataClientlistIds - list of id to deletepublic void deleteObjectGroupBulk(Collection<String> listIds)
MetaDataClientdeleteObjectGroupBulk in interface MetaDataClientlistIds - list of id to deletepublic javax.ws.rs.core.Response startComputeInheritedRules(com.fasterxml.jackson.databind.JsonNode dslQuery)
throws MetaDataClientServerException
startComputeInheritedRules in interface MetaDataClientMetaDataClientServerExceptionCopyright © 2019 Vitam. All rights reserved.