public class MetaDataClientMock extends AbstractMockClient implements MetaDataClient
AbstractMockClient.FakeInboundResponse
INTERNAL_SERVER_ERROR
STATUS_URL
Constructor and Description |
---|
MetaDataClientMock() |
Modifier and Type | Method and Description |
---|---|
boolean |
flushObjectGroups() |
boolean |
flushUnits() |
RequestResponse<com.fasterxml.jackson.databind.JsonNode> |
getObjectGroupByIdRaw(String objectGroupId)
Search object group by path unit id
|
RequestResponse<com.fasterxml.jackson.databind.JsonNode> |
getUnitByIdRaw(String unitId)
Search units by path unit id
|
com.fasterxml.jackson.databind.JsonNode |
insertObjectGroup(com.fasterxml.jackson.databind.JsonNode insertQuery) |
com.fasterxml.jackson.databind.JsonNode |
insertUnit(com.fasterxml.jackson.databind.JsonNode insertQuery) |
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 |
switchIndexes(SwitchIndexParameters switchIndexParam)
Switch indexes
|
void |
updateObjectGroupById(com.fasterxml.jackson.databind.JsonNode objectGroup,
String objectGroupId)
Update ObjectGroup
|
com.fasterxml.jackson.databind.JsonNode |
updateUnitbyId(com.fasterxml.jackson.databind.JsonNode updateQuery,
String unitId)
Update units by query (DSL) and path unit id
|
checkStatus, checkStatus, close, consumeAnyEntityAndClose, getResourcePath, getServiceUrl
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
checkStatus, checkStatus, close, consumeAnyEntityAndClose, getResourcePath, getServiceUrl
public com.fasterxml.jackson.databind.JsonNode insertUnit(com.fasterxml.jackson.databind.JsonNode insertQuery) throws InvalidParseOperationException, MetaDataExecutionException, MetaDataNotFoundException, MetaDataAlreadyExistException, MetaDataDocumentSizeException, MetaDataClientServerException
insertUnit
in interface MetaDataClient
insertQuery
- as JsonNode InvalidParseOperationException
MetaDataExecutionException
MetaDataNotFoundException
MetaDataAlreadyExistException
MetaDataDocumentSizeException
MetaDataClientServerException
public com.fasterxml.jackson.databind.JsonNode selectUnits(com.fasterxml.jackson.databind.JsonNode selectQuery) throws MetaDataExecutionException, MetaDataDocumentSizeException, InvalidParseOperationException, MetaDataClientServerException
MetaDataClient
selectUnits
in interface MetaDataClient
selectQuery
- : select query SelectMultiQuery
as String MetaDataExecutionException
- thrown when internal Server Error (fatal technical exception thrown)MetaDataDocumentSizeException
- thrown when Query document Size is Too LargeInvalidParseOperationException
MetaDataClientServerException
public com.fasterxml.jackson.databind.JsonNode selectUnitbyId(com.fasterxml.jackson.databind.JsonNode selectQuery, String unitId) throws MetaDataExecutionException, MetaDataDocumentSizeException, InvalidParseOperationException, MetaDataClientServerException
MetaDataClient
selectUnitbyId
in interface MetaDataClient
selectQuery
- : 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 LargeInvalidParseOperationException
MetaDataClientServerException
public com.fasterxml.jackson.databind.JsonNode selectObjectGrouptbyId(com.fasterxml.jackson.databind.JsonNode selectQuery, String objectGroupId) throws MetaDataExecutionException, MetaDataDocumentSizeException, InvalidParseOperationException, MetadataInvalidSelectException, MetaDataClientServerException
MetaDataClient
selectObjectGrouptbyId
in interface MetaDataClient
selectQuery
- : 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 blankMetaDataClientServerException
public com.fasterxml.jackson.databind.JsonNode updateUnitbyId(com.fasterxml.jackson.databind.JsonNode updateQuery, String unitId) throws MetaDataExecutionException, MetaDataDocumentSizeException, InvalidParseOperationException, MetaDataClientServerException
MetaDataClient
updateUnitbyId
in interface MetaDataClient
updateQuery
- 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 LargeInvalidParseOperationException
MetaDataClientServerException
public com.fasterxml.jackson.databind.JsonNode insertObjectGroup(com.fasterxml.jackson.databind.JsonNode insertQuery) throws InvalidParseOperationException, MetaDataExecutionException, MetaDataNotFoundException, MetaDataAlreadyExistException, MetaDataDocumentSizeException, MetaDataClientServerException
insertObjectGroup
in interface MetaDataClient
insertQuery
- as StringInvalidParseOperationException
MetaDataExecutionException
MetaDataNotFoundException
MetaDataAlreadyExistException
MetaDataDocumentSizeException
MetaDataClientServerException
public List<UnitPerOriginatingAgency> selectAccessionRegisterOnUnitByOperationId(String operationId) throws MetaDataClientServerException
selectAccessionRegisterOnUnitByOperationId
in interface MetaDataClient
MetaDataClientServerException
public List<ObjectGroupPerOriginatingAgency> selectAccessionRegisterOnObjectByOperationId(String operationId) throws MetaDataClientServerException
selectAccessionRegisterOnObjectByOperationId
in interface MetaDataClient
MetaDataClientServerException
public com.fasterxml.jackson.databind.JsonNode selectObjectGroups(com.fasterxml.jackson.databind.JsonNode selectQuery) throws MetaDataExecutionException, MetaDataDocumentSizeException, InvalidParseOperationException, MetaDataClientServerException
MetaDataClient
selectObjectGroups
in interface MetaDataClient
selectQuery
- : select query SelectMultiQuery
as String MetaDataExecutionException
- thrown when internal Server Error (fatal technical exception thrown)MetaDataDocumentSizeException
- thrown when Query document Size is Too LargeInvalidParseOperationException
MetaDataClientServerException
public void updateObjectGroupById(com.fasterxml.jackson.databind.JsonNode objectGroup, String objectGroupId)
MetaDataClient
updateObjectGroupById
in interface MetaDataClient
public boolean flushUnits()
flushUnits
in interface MetaDataClient
public boolean flushObjectGroups()
flushObjectGroups
in interface MetaDataClient
public com.fasterxml.jackson.databind.JsonNode reindex(IndexParameters indexParam) throws InvalidParseOperationException, MetaDataClientServerException, MetaDataNotFoundException
MetaDataClient
reindex
in interface MetaDataClient
indexParam
- reindexation parametersInvalidParseOperationException
MetaDataClientServerException
MetaDataNotFoundException
- in case the index does not existpublic com.fasterxml.jackson.databind.JsonNode switchIndexes(SwitchIndexParameters switchIndexParam) throws InvalidParseOperationException, MetaDataClientServerException, MetaDataNotFoundException
MetaDataClient
switchIndexes
in interface MetaDataClient
switchIndexParam
- switch index parametersInvalidParseOperationException
MetaDataClientServerException
MetaDataNotFoundException
- in case the index does not existpublic RequestResponse<com.fasterxml.jackson.databind.JsonNode> getUnitByIdRaw(String unitId) throws VitamClientException
MetaDataClient
getUnitByIdRaw
in interface MetaDataClient
unitId
- : unit id VitamClientException
public RequestResponse<com.fasterxml.jackson.databind.JsonNode> getObjectGroupByIdRaw(String objectGroupId) throws VitamClientException
MetaDataClient
getObjectGroupByIdRaw
in interface MetaDataClient
objectGroupId
- : objectGroup id VitamClientException
Copyright © 2018 Vitam. All rights reserved.