| Constructor and Description |
|---|
MetaDataImpl(MongoDbAccessMetadataImpl mongoDbAccess) |
| Modifier and Type | Method and Description |
|---|---|
void |
flushObjectGroup()
Flush ObjectGroup Index
|
void |
flushUnit()
Flush Unit Index
|
MongoDbAccessMetadataImpl |
getMongoDbAccess() |
void |
insertObjectGroup(com.fasterxml.jackson.databind.JsonNode objectGroupRequest)
Insert an objectGroup
|
void |
insertUnit(com.fasterxml.jackson.databind.JsonNode insertRequest)
insert Unit
|
static MetaData |
newMetadata(MongoDbAccessMetadataImpl mongoDbAccessMetadata)
Get a new MetaDataImpl instance
|
IndexationResult |
reindex(IndexParameters indexParam)
Reindex one or more collections
|
List<org.bson.Document> |
selectAccessionRegisterOnObjectGroupByOperationId(String operationId)
Select an Accession Register linked to an Operation
|
List<org.bson.Document> |
selectAccessionRegisterOnUnitByOperationId(String operationId)
find the number of archive unit per originating agency for a operationId
|
RequestResponse<com.fasterxml.jackson.databind.JsonNode> |
selectObjectGroupById(com.fasterxml.jackson.databind.JsonNode selectQuery,
String objectGroupId)
Search ObjectGroups by its Id and a Select Query
for this method, the roots will be filled for example request :{ |
RequestResponse<com.fasterxml.jackson.databind.JsonNode> |
selectObjectGroupsByQuery(com.fasterxml.jackson.databind.JsonNode selectQuery)
Search ObjectGroups by Select
SelectQuery |
RequestResponse<com.fasterxml.jackson.databind.JsonNode> |
selectUnitsById(com.fasterxml.jackson.databind.JsonNode selectQuery,
String unitId)
|
RequestResponse<com.fasterxml.jackson.databind.JsonNode> |
selectUnitsByQuery(com.fasterxml.jackson.databind.JsonNode selectQuery)
Search UNITs by Select
SelectQuery |
void |
switchIndex(String alias,
String newIndexName)
Switch indexes for one or more collections
|
void |
updateObjectGroupId(com.fasterxml.jackson.databind.JsonNode updateQuery,
String objectId)
Update an object group
|
RequestResponse<com.fasterxml.jackson.databind.JsonNode> |
updateUnitbyId(com.fasterxml.jackson.databind.JsonNode updateQuery,
String unitId)
Update UNITs by Id
UpdateMultiQueryQuery for this method, the roots will be filled for example request :{ |
public MetaDataImpl(MongoDbAccessMetadataImpl mongoDbAccess)
mongoDbAccess - public MongoDbAccessMetadataImpl getMongoDbAccess()
public static MetaData newMetadata(MongoDbAccessMetadataImpl mongoDbAccessMetadata)
mongoDbAccessMetadata - public void insertUnit(com.fasterxml.jackson.databind.JsonNode insertRequest)
throws InvalidParseOperationException,
MetaDataDocumentSizeException,
MetaDataExecutionException,
MetaDataAlreadyExistException,
MetaDataNotFoundException,
VitamDBException
MetaDatainsertUnit in interface MetaDatainsertRequest - as String { $roots: roots, $query : query, $filter : multi, $data : data}InvalidParseOperationException - Throw if json format is not correctMetaDataDocumentSizeException - Throw if Unit size is too bigMetaDataExecutionException - Throw if error occurs when send Unit to databaseMetaDataAlreadyExistException - Throw if Unit id already existsMetaDataNotFoundException - Throw if parent of this unit is not foundVitamDBException - in case a desynchro is recorded between Mongo and ESpublic void insertObjectGroup(com.fasterxml.jackson.databind.JsonNode objectGroupRequest)
throws InvalidParseOperationException,
MetaDataDocumentSizeException,
MetaDataExecutionException,
MetaDataAlreadyExistException,
MetaDataNotFoundException
MetaDatainsertObjectGroup in interface MetaDataobjectGroupRequest - as JsonNode { $roots: roots, $query : query, $filter : multi, $data : data}InvalidParseOperationException - Throw if json format is not correctMetaDataDocumentSizeException - Throw if Unit size is too bigMetaDataExecutionException - Throw if error occurs when send Unit to databaseMetaDataAlreadyExistException - Throw if Unit id already existsMetaDataNotFoundException - Throw if parent of this unit is not foundpublic List<org.bson.Document> selectAccessionRegisterOnUnitByOperationId(String operationId)
MetaDataselectAccessionRegisterOnUnitByOperationId in interface MetaDataoperationId - operation idpublic List<org.bson.Document> selectAccessionRegisterOnObjectGroupByOperationId(String operationId)
MetaDataselectAccessionRegisterOnObjectGroupByOperationId in interface MetaDataoperationId - the operation identifierpublic RequestResponse<com.fasterxml.jackson.databind.JsonNode> selectUnitsByQuery(com.fasterxml.jackson.databind.JsonNode selectQuery) throws MetaDataExecutionException, InvalidParseOperationException, MetaDataDocumentSizeException, MetaDataNotFoundException, BadRequestException, VitamDBException
MetaDataSelectQueryselectUnitsByQuery in interface MetaDataselectQuery - the query of type JsonNodeMetaDataExecutionException - Throw if error occurs when send Unit to databaseInvalidParseOperationException - Thrown when json format is not correctMetaDataDocumentSizeException - Throw if Unit size is too bigMetaDataNotFoundException - Throw if unit by id not foundBadRequestException - if a bad request is being usedVitamDBException - in case a desynchro is recorded between Mongo and ESpublic RequestResponse<com.fasterxml.jackson.databind.JsonNode> selectObjectGroupsByQuery(com.fasterxml.jackson.databind.JsonNode selectQuery) throws MetaDataExecutionException, InvalidParseOperationException, MetaDataDocumentSizeException, MetaDataNotFoundException, BadRequestException, VitamDBException
MetaDataSelectQueryselectObjectGroupsByQuery in interface MetaDataselectQuery - the query of type JsonNodeMetaDataExecutionException - Throw if error occurs when send Unit to databaseInvalidParseOperationException - Thrown when json format is not correctMetaDataDocumentSizeException - Throw if Unit size is too bigMetaDataNotFoundException - Throw if unit by id not foundBadRequestException - if a bad request is being usedVitamDBException - in case a desynchro is recorded between Mongo and ESpublic RequestResponse<com.fasterxml.jackson.databind.JsonNode> selectUnitsById(com.fasterxml.jackson.databind.JsonNode selectQuery, String unitId) throws InvalidParseOperationException, MetaDataExecutionException, MetaDataDocumentSizeException, MetaDataNotFoundException, BadRequestException, VitamDBException
MetaDataSelectQuery selectUnitsById in interface MetaDataselectQuery - the select query of type JsonNodeunitId - the unit id for queryInvalidParseOperationException - Thrown when json format is not correctMetaDataExecutionException - Throw if error occurs when send Unit to databaseMetaDataDocumentSizeException - Throw if Unit size is too bigMetaDataNotFoundException - Throw if unit by id not foundBadRequestException - if a bad request is being usedVitamDBException - in case a desynchro is recorded between Mongo and ESpublic RequestResponse<com.fasterxml.jackson.databind.JsonNode> selectObjectGroupById(com.fasterxml.jackson.databind.JsonNode selectQuery, String objectGroupId) throws InvalidParseOperationException, MetaDataDocumentSizeException, MetaDataExecutionException, MetaDataNotFoundException, BadRequestException, VitamDBException
MetaDataselectObjectGroupById in interface MetaDataselectQuery - the query to filter results and make projectionsobjectGroupId - the objectgroup idInvalidParseOperationException - Thrown when json format is not correctMetaDataDocumentSizeException - Throw if Unit size is too bigMetaDataExecutionException - Throw if error occurs when send Unit to databaseMetaDataNotFoundException - Thrown if no objectGroup is foundBadRequestException - if a bad request is being usedVitamDBException - in case a desynchro is recorded between Mongo and ESpublic void updateObjectGroupId(com.fasterxml.jackson.databind.JsonNode updateQuery,
String objectId)
throws InvalidParseOperationException,
MetaDataExecutionException,
VitamDBException
MetaDataupdateObjectGroupId in interface MetaDataupdateQuery - the request as a jsonobjectId - the id of the object to be updatedInvalidParseOperationException - Thrown when json format is not correctMetaDataExecutionException - Thrown if error occurs when send Unit to databaseVitamDBException - in case a desynchro is recorded between Mongo and ESpublic RequestResponse<com.fasterxml.jackson.databind.JsonNode> updateUnitbyId(com.fasterxml.jackson.databind.JsonNode updateQuery, String unitId) throws MetaDataNotFoundException, InvalidParseOperationException, MetaDataExecutionException, MetaDataDocumentSizeException, VitamDBException
MetaDataUpdateMultiQueryQuery updateUnitbyId in interface MetaDataupdateQuery - the update query as JsonNodeunitId - the id of Unit for queryMetaDataNotFoundException - Throw if unit does not existInvalidParseOperationException - Thrown when json format is not correctMetaDataExecutionException - Throw if error occurs when send Unit to databaseMetaDataDocumentSizeException - Throw if Unit size is too bigVitamDBException - in case a desynchro is recorded between Mongo and ESpublic void flushUnit()
throws IllegalArgumentException,
VitamThreadAccessException
MetaDataflushUnit in interface MetaDataIllegalArgumentException - if tenant is wrongVitamThreadAccessException - if tenant is wrongpublic void flushObjectGroup()
throws IllegalArgumentException,
VitamThreadAccessException
MetaDataflushObjectGroup in interface MetaDataIllegalArgumentException - if tenant is wrongVitamThreadAccessException - if tenant is wrongpublic IndexationResult reindex(IndexParameters indexParam)
MetaDatapublic void switchIndex(String alias, String newIndexName) throws DatabaseException
MetaDataswitchIndex in interface MetaDataalias - the alias namenewIndexName - the new index to be pointed onDatabaseException - in case error with database occursCopyright © 2018 Vitam. All rights reserved.