Package fr.gouv.vitam.metadata.core
Class MetaDataImpl
- java.lang.Object
-
- fr.gouv.vitam.metadata.core.MetaDataImpl
-
public class MetaDataImpl extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
BINARY_OBJECT_COUNT
static java.lang.String
BINARY_OBJECT_SIZE
static java.lang.String
FILTER
static java.lang.String
LIMIT
static int
MAX_PRECISION_THRESHOLD
static java.lang.String
NESTED_VERSIONS
static java.lang.String
OFFSET
static java.lang.String
ORIGINATING_AGENCIES
static java.lang.String
ORIGINATING_AGENCY
static java.lang.String
SNAPSHOT_COLLECTION
-
Constructor Summary
Constructors Constructor Description MetaDataImpl(MongoDbAccessMetadataImpl mongoDbAccess, int ontologyCacheMaxEntries, int ontologyCacheTimeoutInSeconds, int archiveUnitProfileCacheMaxEntries, int archiveUnitProfileCacheTimeoutInSeconds, int schemaValidatorCacheMaxEntries, int schemaValidatorCacheTimeoutInSeconds, ElasticsearchMetadataIndexManager indexManager)
MetaDataImpl(MongoDbAccessMetadataImpl mongoDbAccess, AdminManagementClientFactory adminManagementClientFactory, IndexationHelper indexationHelper, DbRequest dbRequest, int ontologyCacheMaxEntries, int ontologyCacheTimeoutInSeconds, int archiveUnitProfileCacheMaxEntries, int archiveUnitProfileCacheTimeoutInSeconds, int schemaValidatorCacheMaxEntries, int schemaValidatorCacheTimeoutInSeconds, ElasticsearchMetadataIndexManager indexManager)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
checkStreamObjects(int tenantId, short objectsStreamExecutionLimit)
void
checkStreamUnits(int tenantId, short unitsStreamExecutionLimit)
java.util.List<org.bson.Document>
createAccessionRegisterSymbolic(java.lang.Integer tenant)
void
deleteObjectGroups(java.util.List<java.lang.String> idList)
void
deleteUnits(java.util.List<java.lang.String> idList)
MongoDbAccessMetadataImpl
getMongoDbAccess()
void
insertObjectGroup(com.fasterxml.jackson.databind.JsonNode objectGroupRequest)
void
insertObjectGroups(java.util.List<com.fasterxml.jackson.databind.JsonNode> objectGroupRequest)
void
insertUnits(java.util.List<com.fasterxml.jackson.databind.JsonNode> unitRequest)
static MetaDataImpl
newMetadata(MongoDbAccessMetadataImpl mongoDbAccessMetadata, int ontologyCacheMaxEntries, int ontologyCacheTimeoutInSeconds, int archiveUnitProfileCacheMaxEntries, int archiveUnitProfileCacheTimeoutInSeconds, int schemaValidatorCacheMaxEntries, int schemaValidatorCacheTimeoutInSeconds, ElasticsearchMetadataIndexManager indexManager)
Get a new MetaDataImpl instancevoid
refreshObjectGroup()
void
refreshUnit()
ReindexationResult
reindex(IndexParameters indexParameters)
MetadataResult
selectObjectGroupById(com.fasterxml.jackson.databind.JsonNode selectQuery, java.lang.String objectGroupId)
MetadataResult
selectObjectGroupsByQuery(com.fasterxml.jackson.databind.JsonNode selectQuery)
java.util.List<ObjectGroupPerOriginatingAgency>
selectOwnAccessionRegisterOnObjectGroupByOperationId(java.lang.Integer tenant, java.lang.String operationId)
java.util.List<FacetBucket>
selectOwnAccessionRegisterOnUnitByOperationId(java.lang.String operationId)
MetadataResult
selectUnitsById(com.fasterxml.jackson.databind.JsonNode selectQuery, java.lang.String unitId)
MetadataResult
selectUnitsByQuery(com.fasterxml.jackson.databind.JsonNode selectQuery)
SwitchIndexResult
switchIndex(java.lang.String alias, java.lang.String newIndexName)
void
updateObjectGroupId(com.fasterxml.jackson.databind.JsonNode updateQuery, java.lang.String objectId, boolean forceUpdate)
void
updateParameterStreamObjects(int tenantId)
void
updateParameterStreamUnits(int tenantId)
UpdateUnit
updateUnitById(com.fasterxml.jackson.databind.JsonNode updateQuery, java.lang.String unitId, boolean forceUpdate)
RequestResponse<UpdateUnit>
updateUnits(com.fasterxml.jackson.databind.JsonNode updateQuery, boolean forceUpdate)
RequestResponse<UpdateUnit>
updateUnitsRules(java.util.List<java.lang.String> unitIds, RuleActions ruleActions, java.util.Map<java.lang.String,DurationData> bindRuleToDuration)
-
-
-
Field Detail
-
MAX_PRECISION_THRESHOLD
public static final int MAX_PRECISION_THRESHOLD
- See Also:
- Constant Field Values
-
SNAPSHOT_COLLECTION
public static final java.lang.String SNAPSHOT_COLLECTION
- See Also:
- Constant Field Values
-
FILTER
public static final java.lang.String FILTER
- See Also:
- Constant Field Values
-
OFFSET
public static final java.lang.String OFFSET
- See Also:
- Constant Field Values
-
LIMIT
public static final java.lang.String LIMIT
- See Also:
- Constant Field Values
-
ORIGINATING_AGENCY
public static final java.lang.String ORIGINATING_AGENCY
- See Also:
- Constant Field Values
-
ORIGINATING_AGENCIES
public static final java.lang.String ORIGINATING_AGENCIES
- See Also:
- Constant Field Values
-
NESTED_VERSIONS
public static final java.lang.String NESTED_VERSIONS
- See Also:
- Constant Field Values
-
BINARY_OBJECT_SIZE
public static final java.lang.String BINARY_OBJECT_SIZE
- See Also:
- Constant Field Values
-
BINARY_OBJECT_COUNT
public static final java.lang.String BINARY_OBJECT_COUNT
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
MetaDataImpl
public MetaDataImpl(MongoDbAccessMetadataImpl mongoDbAccess, int ontologyCacheMaxEntries, int ontologyCacheTimeoutInSeconds, int archiveUnitProfileCacheMaxEntries, int archiveUnitProfileCacheTimeoutInSeconds, int schemaValidatorCacheMaxEntries, int schemaValidatorCacheTimeoutInSeconds, ElasticsearchMetadataIndexManager indexManager)
-
MetaDataImpl
public MetaDataImpl(MongoDbAccessMetadataImpl mongoDbAccess, AdminManagementClientFactory adminManagementClientFactory, IndexationHelper indexationHelper, DbRequest dbRequest, int ontologyCacheMaxEntries, int ontologyCacheTimeoutInSeconds, int archiveUnitProfileCacheMaxEntries, int archiveUnitProfileCacheTimeoutInSeconds, int schemaValidatorCacheMaxEntries, int schemaValidatorCacheTimeoutInSeconds, ElasticsearchMetadataIndexManager indexManager)
-
-
Method Detail
-
newMetadata
public static MetaDataImpl newMetadata(MongoDbAccessMetadataImpl mongoDbAccessMetadata, int ontologyCacheMaxEntries, int ontologyCacheTimeoutInSeconds, int archiveUnitProfileCacheMaxEntries, int archiveUnitProfileCacheTimeoutInSeconds, int schemaValidatorCacheMaxEntries, int schemaValidatorCacheTimeoutInSeconds, ElasticsearchMetadataIndexManager indexManager)
Get a new MetaDataImpl instance- Parameters:
mongoDbAccessMetadata
-indexManager
-- Returns:
- a new instance of MetaDataImpl
-
getMongoDbAccess
public MongoDbAccessMetadataImpl getMongoDbAccess()
- Returns:
- the MongoDbAccessMetadataImpl
-
insertUnits
public void insertUnits(java.util.List<com.fasterxml.jackson.databind.JsonNode> unitRequest) throws InvalidParseOperationException, MetaDataExecutionException, MetaDataNotFoundException
-
deleteUnits
public void deleteUnits(java.util.List<java.lang.String> idList) throws java.lang.IllegalArgumentException, MetaDataExecutionException
- Throws:
java.lang.IllegalArgumentException
MetaDataExecutionException
-
deleteObjectGroups
public void deleteObjectGroups(java.util.List<java.lang.String> idList) throws java.lang.IllegalArgumentException, MetaDataExecutionException
- Throws:
java.lang.IllegalArgumentException
MetaDataExecutionException
-
insertObjectGroup
public void insertObjectGroup(com.fasterxml.jackson.databind.JsonNode objectGroupRequest) throws InvalidParseOperationException, MetaDataExecutionException
-
insertObjectGroups
public void insertObjectGroups(java.util.List<com.fasterxml.jackson.databind.JsonNode> objectGroupRequest) throws InvalidParseOperationException, MetaDataExecutionException
-
selectOwnAccessionRegisterOnUnitByOperationId
public java.util.List<FacetBucket> selectOwnAccessionRegisterOnUnitByOperationId(java.lang.String operationId) throws MetaDataExecutionException
- Parameters:
operationId
- operation id- Returns:
- List of FacetBucket
- Throws:
MetaDataExecutionException
-
createAccessionRegisterSymbolic
public java.util.List<org.bson.Document> createAccessionRegisterSymbolic(java.lang.Integer tenant) throws MetaDataExecutionException
- Throws:
MetaDataExecutionException
-
selectOwnAccessionRegisterOnObjectGroupByOperationId
public java.util.List<ObjectGroupPerOriginatingAgency> selectOwnAccessionRegisterOnObjectGroupByOperationId(java.lang.Integer tenant, java.lang.String operationId) throws MetaDataExecutionException
- Throws:
MetaDataExecutionException
-
selectUnitsByQuery
public MetadataResult selectUnitsByQuery(com.fasterxml.jackson.databind.JsonNode selectQuery) throws MetaDataExecutionException, InvalidParseOperationException, MetaDataDocumentSizeException, MetaDataNotFoundException, BadRequestException, VitamDBException
-
selectObjectGroupsByQuery
public MetadataResult selectObjectGroupsByQuery(com.fasterxml.jackson.databind.JsonNode selectQuery) throws MetaDataExecutionException, InvalidParseOperationException, MetaDataDocumentSizeException, MetaDataNotFoundException, BadRequestException, VitamDBException
-
selectUnitsById
public MetadataResult selectUnitsById(com.fasterxml.jackson.databind.JsonNode selectQuery, java.lang.String unitId) throws InvalidParseOperationException, MetaDataExecutionException, MetaDataDocumentSizeException, MetaDataNotFoundException, BadRequestException, VitamDBException
-
selectObjectGroupById
public MetadataResult selectObjectGroupById(com.fasterxml.jackson.databind.JsonNode selectQuery, java.lang.String objectGroupId) throws InvalidParseOperationException, MetaDataDocumentSizeException, MetaDataExecutionException, MetaDataNotFoundException, BadRequestException, VitamDBException
-
updateObjectGroupId
public void updateObjectGroupId(com.fasterxml.jackson.databind.JsonNode updateQuery, java.lang.String objectId, boolean forceUpdate) throws InvalidParseOperationException, MetaDataExecutionException, MetaDataNotFoundException, MetadataValidationException
-
updateUnits
public RequestResponse<UpdateUnit> updateUnits(com.fasterxml.jackson.databind.JsonNode updateQuery, boolean forceUpdate) throws InvalidParseOperationException
- Throws:
InvalidParseOperationException
-
updateUnitsRules
public RequestResponse<UpdateUnit> updateUnitsRules(java.util.List<java.lang.String> unitIds, RuleActions ruleActions, java.util.Map<java.lang.String,DurationData> bindRuleToDuration)
-
updateUnitById
public UpdateUnit updateUnitById(com.fasterxml.jackson.databind.JsonNode updateQuery, java.lang.String unitId, boolean forceUpdate) throws MetaDataNotFoundException, InvalidParseOperationException, MetaDataExecutionException, MetadataValidationException
-
refreshUnit
public void refreshUnit() throws java.lang.IllegalArgumentException, VitamThreadAccessException, MetaDataExecutionException
- Throws:
java.lang.IllegalArgumentException
VitamThreadAccessException
MetaDataExecutionException
-
refreshObjectGroup
public void refreshObjectGroup() throws java.lang.IllegalArgumentException, VitamThreadAccessException, MetaDataExecutionException
- Throws:
java.lang.IllegalArgumentException
VitamThreadAccessException
MetaDataExecutionException
-
reindex
public ReindexationResult reindex(IndexParameters indexParameters)
-
switchIndex
public SwitchIndexResult switchIndex(java.lang.String alias, java.lang.String newIndexName) throws DatabaseException
- Throws:
DatabaseException
-
checkStreamUnits
public void checkStreamUnits(int tenantId, short unitsStreamExecutionLimit) throws MetaDataException
- Throws:
MetaDataException
-
checkStreamObjects
public void checkStreamObjects(int tenantId, short objectsStreamExecutionLimit) throws MetaDataException
- Throws:
MetaDataException
-
updateParameterStreamUnits
public void updateParameterStreamUnits(int tenantId)
-
updateParameterStreamObjects
public void updateParameterStreamObjects(int tenantId)
-
-