Package fr.gouv.vitam.metadata.core
Class MetaDataImpl
java.lang.Object
fr.gouv.vitam.metadata.core.MetaDataImpl
-
Field Summary
-
Constructor Summary
ConstructorDescriptionMetaDataImpl
(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
Modifier and TypeMethodDescriptionvoid
checkStreamObjects
(int tenantId, short objectsStreamExecutionLimit) void
checkStreamUnits
(int tenantId, short unitsStreamExecutionLimit) void
clearESScrollFilter
(String scrollId) List<org.bson.Document>
void
deleteObjectGroups
(List<String> idList) void
deleteUnits
(List<String> idList) void
insertObjectGroup
(com.fasterxml.jackson.databind.JsonNode objectGroupRequest) void
insertObjectGroups
(List<com.fasterxml.jackson.databind.JsonNode> objectGroupRequest) void
insertUnits
(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
void
reindex
(IndexParameters indexParameters) selectObjectGroupById
(com.fasterxml.jackson.databind.JsonNode selectQuery, String objectGroupId) selectObjectGroupsByQuery
(com.fasterxml.jackson.databind.JsonNode selectQuery) selectOwnAccessionRegisterOnObjectGroupByOperationId
(Integer tenant, String operationId) selectOwnAccessionRegisterOnUnitByOperationId
(String operationId) selectUnitsById
(com.fasterxml.jackson.databind.JsonNode selectQuery, String unitId) selectUnitsByQuery
(com.fasterxml.jackson.databind.JsonNode selectQuery) switchIndex
(String alias, String newIndexName) void
updateObjectGroupId
(com.fasterxml.jackson.databind.JsonNode updateQuery, String objectId, boolean forceUpdate, boolean withRefreshIndex) void
updateParameterStreamObjects
(int tenantId) void
updateParameterStreamUnits
(int tenantId) updateUnitById
(com.fasterxml.jackson.databind.JsonNode updateQuery, String unitId, boolean forceUpdate, boolean withRefreshIndex) updateUnits
(List<RequestById> bulkRequests, boolean forceUpdate, boolean withRefreshIndex) updateUnitsRules
(List<String> unitIds, RuleActions ruleActions, Map<String, DurationData> bindRuleToDuration)
-
Field Details
-
MAX_PRECISION_THRESHOLD
public static final int MAX_PRECISION_THRESHOLD- See Also:
-
SNAPSHOT_COLLECTION
- See Also:
-
FILTER
- See Also:
-
OFFSET
- See Also:
-
LIMIT
- See Also:
-
ORIGINATING_AGENCY
- See Also:
-
ORIGINATING_AGENCIES
- See Also:
-
NESTED_VERSIONS
- See Also:
-
BINARY_OBJECT_SIZE
- See Also:
-
BINARY_OBJECT_COUNT
- See Also:
-
-
Constructor Details
-
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 Details
-
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
- Returns:
- the MongoDbAccessMetadataImpl
-
insertUnits
public void insertUnits(List<com.fasterxml.jackson.databind.JsonNode> unitRequest) throws InvalidParseOperationException, MetaDataExecutionException, MetaDataNotFoundException -
deleteUnits
public void deleteUnits(List<String> idList) throws IllegalArgumentException, MetaDataExecutionException -
deleteObjectGroups
public void deleteObjectGroups(List<String> idList) throws IllegalArgumentException, MetaDataExecutionException -
insertObjectGroup
public void insertObjectGroup(com.fasterxml.jackson.databind.JsonNode objectGroupRequest) throws InvalidParseOperationException, MetaDataExecutionException -
insertObjectGroups
public void insertObjectGroups(List<com.fasterxml.jackson.databind.JsonNode> objectGroupRequest) throws InvalidParseOperationException, MetaDataExecutionException -
selectOwnAccessionRegisterOnUnitByOperationId
public List<FacetBucket> selectOwnAccessionRegisterOnUnitByOperationId(String operationId) throws MetaDataExecutionException - Parameters:
operationId
- operation id- Returns:
- List of FacetBucket
- Throws:
MetaDataExecutionException
-
createAccessionRegisterSymbolic
public List<org.bson.Document> createAccessionRegisterSymbolic(Integer tenant) throws MetaDataExecutionException - Throws:
MetaDataExecutionException
-
selectOwnAccessionRegisterOnObjectGroupByOperationId
public List<ObjectGroupPerOriginatingAgency> selectOwnAccessionRegisterOnObjectGroupByOperationId(Integer tenant, 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, String unitId) throws InvalidParseOperationException, MetaDataExecutionException, MetaDataDocumentSizeException, MetaDataNotFoundException, BadRequestException, VitamDBException -
selectObjectGroupById
public MetadataResult selectObjectGroupById(com.fasterxml.jackson.databind.JsonNode selectQuery, String objectGroupId) throws InvalidParseOperationException, MetaDataDocumentSizeException, MetaDataExecutionException, MetaDataNotFoundException, BadRequestException, VitamDBException -
updateObjectGroupId
public void updateObjectGroupId(com.fasterxml.jackson.databind.JsonNode updateQuery, String objectId, boolean forceUpdate, boolean withRefreshIndex) throws InvalidParseOperationException, MetaDataExecutionException, MetaDataNotFoundException, MetadataValidationException -
updateUnits
public List<UpdateUnit> updateUnits(List<RequestById> bulkRequests, boolean forceUpdate, boolean withRefreshIndex) throws InvalidParseOperationException - Throws:
InvalidParseOperationException
-
updateUnitsRules
public RequestResponse<UpdateUnit> updateUnitsRules(List<String> unitIds, RuleActions ruleActions, Map<String, DurationData> bindRuleToDuration) -
updateUnitById
public UpdateUnit updateUnitById(com.fasterxml.jackson.databind.JsonNode updateQuery, String unitId, boolean forceUpdate, boolean withRefreshIndex) throws MetaDataNotFoundException, InvalidParseOperationException, MetaDataExecutionException, MetadataValidationException -
refreshUnit
public void refreshUnit() throws IllegalArgumentException, VitamThreadAccessException, MetaDataExecutionException -
refreshObjectGroup
public void refreshObjectGroup() throws IllegalArgumentException, VitamThreadAccessException, MetaDataExecutionException -
reindex
-
switchIndex
- 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) -
clearESScrollFilter
-