Class LogbookMongoDbAccessImpl
- java.lang.Object
-
- fr.gouv.vitam.common.database.server.mongodb.MongoDbAccess
-
- fr.gouv.vitam.logbook.common.server.database.collections.LogbookMongoDbAccessImpl
-
- All Implemented Interfaces:
DatabaseConnection,LogbookDbAccess
public final class LogbookMongoDbAccessImpl extends MongoDbAccess implements LogbookDbAccess
MongoDb Access implementation base class
-
-
Constructor Summary
Constructors Constructor Description LogbookMongoDbAccessImpl(com.mongodb.MongoClient mongoClient, java.lang.String dbname, boolean recreate, LogbookElasticsearchAccess esClient, LogbookTransformData logbookTransformData, OntologyLoader ontologyLoader)Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidbulkInsert(LogbookCollections lifecycleUnit, java.util.List<? extends LogbookLifeCycleModel> logbookLifeCycleModels)voidclose()Close database accessvoidcreateBulkLogbookLifeCycleObjectGroup(LogbookLifeCycleObjectGroupParameters... lifecycleItems)Create one Logbook LifeCycle with already multiple sub-eventsvoidcreateBulkLogbookLifeCycleUnit(LogbookLifeCycleUnitParameters... lifecycleItems)Create one Logbook LifeCycle with already multiple sub-eventsvoidcreateBulkLogbookOperation(LogbookOperationParameters... operationItems)Create one Logbook Operation with already multiple sub-eventsvoidcreateLogbookLifeCycleForUpdate(LogbookCollections inProccessCollection, LogbookLifeCycle<?> logbookLifeCycleInProd)voidcreateLogbookLifeCycleObjectGroup(LogbookLifeCycleObjectGroupInProcess logbookLifeCycleObjectGroupInProcess)Creates ObjectGroup lifeCycle from a LogbookLifeCycleObjectGroupInProcess instancevoidcreateLogbookLifeCycleObjectGroup(java.lang.String idOperation, LogbookLifeCycleObjectGroupParameters lifecycleItem)Create one Logbook LifeCycle object groupvoidcreateLogbookLifeCycleUnit(LogbookLifeCycleUnitInProcess logbookLifeCycleUnitInProcess)Creates Unit lifeCycle from a LogbookLifeCycleUnitInProcess instancevoidcreateLogbookLifeCycleUnit(java.lang.String idOperation, LogbookLifeCycleUnitParameters lifecycleItem)Create one Logbook LifeCycle unitvoidcreateLogbookOperation(LogbookOperationParameters operationItem)Create one Logbook OperationvoiddeleteCollectionForTesting(LogbookCollections collection)Delete logbook collectionbooleanexistsLogbookLifeCycleObjectGroup(java.lang.String objectGroupId)Check if one eventIdentifier for Lifecycle exists alreadybooleanexistsLogbookLifeCycleObjectGroupInProcess(java.lang.String objectGroupId)Check if one eventIdentifier for Lifecycle exists alreadybooleanexistsLogbookLifeCycleUnit(java.lang.String unitId)Check if one eventIdentifier for Lifecycle exists alreadybooleanexistsLogbookLifeCycleUnitInProcess(java.lang.String unitId)Check if one eventIdentifier for Lifecycle exists alreadybooleanexistsLogbookOperation(java.lang.String operationItem)Check if one eventIdentifier for Operation exists alreadyLogbookElasticsearchAccessgetEsClient()java.lang.StringgetInfo()Get information on a DatabaseLogbookLifeCycleObjectGroupInProcessgetLogbookLifeCycleObjectGroupInProcess(java.lang.String objectGroupId)Gets ObjectGroup LifeCycle In processVitamMongoCursor<LogbookLifeCycleObjectGroup>getLogbookLifeCycleObjectGroupsFull(LogbookCollections collection, Select select)Get a list of Logbook LifeCycle through Closeable MongoCursorcom.mongodb.client.MongoCursor<LogbookLifeCycle<?>>getLogbookLifeCycles(com.fasterxml.jackson.databind.JsonNode select, boolean sliced, LogbookCollections collection)Get a list of Logbook LifeCycles through Closeable MongoCursorLogbookLifeCycleUnitInProcessgetLogbookLifeCycleUnitInProcess(java.lang.String unitId)Get Unit LifeCycle In processVitamMongoCursor<LogbookLifeCycleUnit>getLogbookLifeCycleUnitsFull(LogbookCollections collection, Select select)Get a list of Logbook LifeCycle through Closeable MongoCursorlonggetLogbookLifeCyleObjectGroupInProcessSize()longgetLogbookLifeCyleObjectGroupSize()longgetLogbookLifeCyleUnitInProcessSize()longgetLogbookLifeCyleUnitSize()LogbookOperationgetLogbookOperationById(java.lang.String eventIdentifierProcess)Get one OperationLogbookOperationgetLogbookOperationById(java.lang.String eventIdentifierProcess, com.fasterxml.jackson.databind.JsonNode query, boolean sliced, boolean crossTenant)Get one OperationVitamMongoCursor<LogbookOperation>getLogbookOperations(com.fasterxml.jackson.databind.JsonNode select, boolean sliced)VitamMongoCursor<LogbookOperation>getLogbookOperations(com.fasterxml.jackson.databind.JsonNode select, boolean sliced, boolean crossTenant)Get a list of Logbook Operation through Closeable MongoCursorlonggetLogbookOperationSize()LogbookLifeCycle<?>getOneLogbookLifeCycle(com.fasterxml.jackson.databind.JsonNode select, boolean sliced, LogbookCollections collection)Get a list of Logbook LifeCycles through Closeable MongoCursorvoidrollbackLogbookLifeCycleObjectGroup(java.lang.String idOperation, java.lang.String lifecycleItem)Rollback one Logbook LifeCycle
It adds this new entry within the very same Logbook LifeCycle entry in "events" array.voidrollbackLogbookLifeCycleUnit(java.lang.String idOperation, java.lang.String lifecycleItem)Rollback one Logbook LifeCycle
It adds this new entry within the very same Logbook LifeCycle entry in "events" array.voidrollBackObjectGroupLifeCyclesByOperation(java.lang.String operationId)Rolls back all the created objectGroups lifeCycles during a given operationvoidrollBackUnitLifeCyclesByOperation(java.lang.String operationId)Rolls back all the created unit lifeCycles during a given operationvoidupdateBulkLogbookLifeCycleObjectGroup(LogbookLifeCycleObjectGroupParameters... lifecycleItems)Update one Logbook LifeCycle with multiple sub-events
It adds this new entry within the very same Logbook LifeCycle entry in "events" array.voidupdateBulkLogbookLifeCycleUnit(LogbookLifeCycleUnitParameters... lifecycleItems)Update one Logbook LifeCycle with multiple sub-events
It adds this new entry within the very same Logbook LifeCycle entry in "events" array.voidupdateBulkLogbookOperation(LogbookOperationParameters... operationItems)Update one Logbook Operation with multiple sub-events
It adds this new entry within the very same Logbook Operaton entry in "events" array.voidupdateLogbookLifeCycle(LogbookCollections collection, java.util.List<LogbookLifeCycleParametersBulk> logbookLifeCycleParametersBulk)voidupdateLogbookLifeCycleObjectGroup(LogbookLifeCycleObjectGroupInProcess logbookLifeCycleObjectGrouptInProcess)Updates ObjectGroup lifeCycle from a LogbookLifeCycleObjectGroupInProcess instancevoidupdateLogbookLifeCycleObjectGroup(java.lang.String idOperation, java.lang.String idLfc, LogbookLifeCycleObjectGroupParameters lifecycleItem)Update one Logbook LifeCycle
It adds this new entry within the very same Logbook LifeCycle entry in "events" array.voidupdateLogbookLifeCycleObjectGroup(java.lang.String idOperation, java.lang.String idLfc, LogbookLifeCycleObjectGroupParameters lifecycleItem, boolean commit)Update one Logbook LifeCycle
It adds this new entry within the very same Logbook LifeCycle entry in "events" array.voidupdateLogbookLifeCycleUnit(LogbookLifeCycleUnitInProcess logbookLifeCycleUnitInProcess)Updates Unit lifeCycle from a LogbookLifeCycleUnitInProcess instancevoidupdateLogbookLifeCycleUnit(java.lang.String idOperation, java.lang.String idLfc, LogbookLifeCycleUnitParameters lifecycleItem)Update one Logbook LifeCycle
It adds this new entry within the very same Logbook LifeCycle entry in "events" array.voidupdateLogbookLifeCycleUnit(java.lang.String idOperation, java.lang.String idLfc, LogbookLifeCycleUnitParameters lifecycleItem, boolean commit)Update one Logbook LifeCycle (in progress or committed
It adds this new entry within the very same Logbook LifeCycle entry in "events" array.voidupdateLogbookOperation(LogbookOperationParameters item)Update one Logbook Operation
It adds this new entry within the very same Logbook Operaton entry in "events" array.-
Methods inherited from class fr.gouv.vitam.common.database.server.mongodb.MongoDbAccess
checkConnection, createMongoClient, getMongoAdmin, getMongoClient, getMongoDatabase, setDatabase, setMongoAdmin, setMongoClient, setMongoDatabase
-
-
-
-
Constructor Detail
-
LogbookMongoDbAccessImpl
public LogbookMongoDbAccessImpl(com.mongodb.MongoClient mongoClient, java.lang.String dbname, boolean recreate, LogbookElasticsearchAccess esClient, LogbookTransformData logbookTransformData, OntologyLoader ontologyLoader)Constructor- Parameters:
mongoClient- MongoClientdbname- MongoDB database namerecreate- True to recreate the indexesClient- elastic search clientontologyLoader-- Throws:
java.lang.IllegalArgumentException- if mongoClient or dbname is null
-
-
Method Detail
-
close
public final void close()
Close database access- Specified by:
closein interfaceLogbookDbAccess- Overrides:
closein classMongoDbAccess
-
getInfo
public java.lang.String getInfo()
Description copied from interface:DatabaseConnectionGet information on a Database- Specified by:
getInfoin interfaceDatabaseConnection- Specified by:
getInfoin interfaceLogbookDbAccess- Overrides:
getInfoin classMongoDbAccess- Returns:
- information on the database
-
getEsClient
public LogbookElasticsearchAccess getEsClient()
- Returns:
- the Elasticsearch Acess Logbook client
-
getLogbookOperationSize
public final long getLogbookOperationSize()
- Specified by:
getLogbookOperationSizein interfaceLogbookDbAccess- Returns:
- the current number of Logbook Operation
-
getLogbookLifeCyleUnitSize
public final long getLogbookLifeCyleUnitSize()
- Specified by:
getLogbookLifeCyleUnitSizein interfaceLogbookDbAccess- Returns:
- the current number of Logbook LifeCyle
-
getLogbookLifeCyleObjectGroupSize
public final long getLogbookLifeCyleObjectGroupSize()
- Specified by:
getLogbookLifeCyleObjectGroupSizein interfaceLogbookDbAccess- Returns:
- the current number of Logbook LifeCyle
-
getLogbookLifeCyleUnitInProcessSize
public long getLogbookLifeCyleUnitInProcessSize()
- Specified by:
getLogbookLifeCyleUnitInProcessSizein interfaceLogbookDbAccess- Returns:
- the current number of LogbookLifeCyle created in working unit collection
-
getLogbookLifeCyleObjectGroupInProcessSize
public long getLogbookLifeCyleObjectGroupInProcessSize()
- Specified by:
getLogbookLifeCyleObjectGroupInProcessSizein interfaceLogbookDbAccess- Returns:
- the current number of LogbookLifeCyle created in working objectGroup collection
-
getLogbookOperations
public VitamMongoCursor<LogbookOperation> getLogbookOperations(com.fasterxml.jackson.databind.JsonNode select, boolean sliced) throws LogbookDatabaseException, VitamDBException
- Specified by:
getLogbookOperationsin interfaceLogbookDbAccess- Throws:
LogbookDatabaseExceptionVitamDBException
-
getLogbookOperations
public VitamMongoCursor<LogbookOperation> getLogbookOperations(com.fasterxml.jackson.databind.JsonNode select, boolean sliced, boolean crossTenant) throws LogbookDatabaseException, VitamDBException
Description copied from interface:LogbookDbAccessGet a list of Logbook Operation through Closeable MongoCursor- Specified by:
getLogbookOperationsin interfaceLogbookDbAccesssliced- If true will return the first and last events only- Returns:
- the Closeable MongoCursor of LogbookOperation
- Throws:
LogbookDatabaseExceptionVitamDBException
-
getOneLogbookLifeCycle
public LogbookLifeCycle<?> getOneLogbookLifeCycle(com.fasterxml.jackson.databind.JsonNode select, boolean sliced, LogbookCollections collection) throws LogbookDatabaseException, LogbookNotFoundException, VitamDBException
Description copied from interface:LogbookDbAccessGet a list of Logbook LifeCycles through Closeable MongoCursor- Specified by:
getOneLogbookLifeCyclein interfaceLogbookDbAccesscollection- the collection on which the select operation will be done : Production collection (LIFECYCLE_UNIT/LIFECYCLE_OBJECT_GROUP) or Working collection (LIFECYCLE_UNIT_IN_PROCESS/LIFECYCLE_OBJECT_GROUP_IN_PROCESS)- Returns:
- the Closeable MongoCursor of LogbookLifeCycle
- Throws:
LogbookDatabaseException- if more than one resultLogbookNotFoundException- if no resultVitamDBException
-
getLogbookLifeCycles
public com.mongodb.client.MongoCursor<LogbookLifeCycle<?>> getLogbookLifeCycles(com.fasterxml.jackson.databind.JsonNode select, boolean sliced, LogbookCollections collection) throws LogbookDatabaseException, VitamDBException
Description copied from interface:LogbookDbAccessGet a list of Logbook LifeCycles through Closeable MongoCursor- Specified by:
getLogbookLifeCyclesin interfaceLogbookDbAccesscollection- the collection on which the select operation will be done : Production collection (LIFECYCLE_UNIT/LIFECYCLE_OBJECT_GROUP) or Working collection (LIFECYCLE_UNIT_IN_PROCESS/LIFECYCLE_OBJECT_GROUP_IN_PROCESS)- Returns:
- the Closeable MongoCursor of LogbookLifeCycle
- Throws:
LogbookDatabaseExceptionVitamDBException
-
getLogbookLifeCycleUnitsFull
public VitamMongoCursor<LogbookLifeCycleUnit> getLogbookLifeCycleUnitsFull(LogbookCollections collection, Select select) throws LogbookDatabaseException
Description copied from interface:LogbookDbAccessGet a list of Logbook LifeCycle through Closeable MongoCursor- Specified by:
getLogbookLifeCycleUnitsFullin interfaceLogbookDbAccess- Parameters:
collection- the collection on which the select operation will be done : Production collection (LIFECYCLE_UNIT) or Working collection (LIFECYCLE_UNIT_IN_PROCESS)- Returns:
- the Closeable MongoCursor of LogbookLifeCycle
- Throws:
LogbookDatabaseException
-
getLogbookLifeCycleObjectGroupsFull
public VitamMongoCursor<LogbookLifeCycleObjectGroup> getLogbookLifeCycleObjectGroupsFull(LogbookCollections collection, Select select) throws LogbookDatabaseException
Description copied from interface:LogbookDbAccessGet a list of Logbook LifeCycle through Closeable MongoCursor- Specified by:
getLogbookLifeCycleObjectGroupsFullin interfaceLogbookDbAccess- Parameters:
collection- the collection on which the select operation will be done : Production collection (LIFECYCLE_OBJECT_GROUP) or Working collection (LIFECYCLE_OBJECT_GROUP_IN_PROCESS)- Returns:
- the Closeable MongoCursor of LogbookLifeCycle
- Throws:
LogbookDatabaseException
-
existsLogbookOperation
public final boolean existsLogbookOperation(java.lang.String operationItem) throws LogbookDatabaseExceptionDescription copied from interface:LogbookDbAccessCheck if one eventIdentifier for Operation exists already- Specified by:
existsLogbookOperationin interfaceLogbookDbAccess- Returns:
- True if one LogbookOperation exists with this id
- Throws:
LogbookDatabaseException
-
existsLogbookLifeCycleUnit
public boolean existsLogbookLifeCycleUnit(java.lang.String unitId) throws LogbookDatabaseExceptionDescription copied from interface:LogbookDbAccessCheck if one eventIdentifier for Lifecycle exists already- Specified by:
existsLogbookLifeCycleUnitin interfaceLogbookDbAccess- Returns:
- True if one LogbookLibeCycle exists with this id
- Throws:
LogbookDatabaseException
-
existsLogbookLifeCycleObjectGroup
public boolean existsLogbookLifeCycleObjectGroup(java.lang.String objectGroupId) throws LogbookDatabaseExceptionDescription copied from interface:LogbookDbAccessCheck if one eventIdentifier for Lifecycle exists already- Specified by:
existsLogbookLifeCycleObjectGroupin interfaceLogbookDbAccess- Returns:
- True if one LogbookLibeCycle exists with this id
- Throws:
LogbookDatabaseException
-
getLogbookOperationById
public LogbookOperation getLogbookOperationById(java.lang.String eventIdentifierProcess) throws LogbookDatabaseException, LogbookNotFoundException
Description copied from interface:LogbookDbAccessGet one Operation- Specified by:
getLogbookOperationByIdin interfaceLogbookDbAccess- Returns:
- the corresponding LogbookOperation if it exists
- Throws:
LogbookDatabaseExceptionLogbookNotFoundException
-
getLogbookOperationById
public LogbookOperation getLogbookOperationById(@Nonnull java.lang.String eventIdentifierProcess, @Nonnull com.fasterxml.jackson.databind.JsonNode query, boolean sliced, boolean crossTenant) throws LogbookDatabaseException, LogbookNotFoundException
Description copied from interface:LogbookDbAccessGet one Operation- Specified by:
getLogbookOperationByIdin interfaceLogbookDbAccess- Returns:
- the corresponding LogbookOperation if it exists
- Throws:
LogbookDatabaseExceptionLogbookNotFoundException
-
createLogbookOperation
public void createLogbookOperation(LogbookOperationParameters operationItem) throws LogbookDatabaseException, LogbookAlreadyExistsException
Description copied from interface:LogbookDbAccessCreate one Logbook Operation- Specified by:
createLogbookOperationin interfaceLogbookDbAccess- Throws:
LogbookDatabaseExceptionLogbookAlreadyExistsException
-
createLogbookLifeCycleUnit
public void createLogbookLifeCycleUnit(java.lang.String idOperation, LogbookLifeCycleUnitParameters lifecycleItem) throws LogbookDatabaseException, LogbookAlreadyExistsExceptionDescription copied from interface:LogbookDbAccessCreate one Logbook LifeCycle unit- Specified by:
createLogbookLifeCycleUnitin interfaceLogbookDbAccess- Throws:
LogbookDatabaseExceptionLogbookAlreadyExistsException
-
createLogbookLifeCycleObjectGroup
public void createLogbookLifeCycleObjectGroup(java.lang.String idOperation, LogbookLifeCycleObjectGroupParameters lifecycleItem) throws LogbookDatabaseException, LogbookAlreadyExistsExceptionDescription copied from interface:LogbookDbAccessCreate one Logbook LifeCycle object group- Specified by:
createLogbookLifeCycleObjectGroupin interfaceLogbookDbAccess- Throws:
LogbookDatabaseExceptionLogbookAlreadyExistsException
-
updateLogbookOperation
public void updateLogbookOperation(LogbookOperationParameters item) throws LogbookDatabaseException, LogbookNotFoundException
Description copied from interface:LogbookDbAccessUpdate one Logbook Operation
It adds this new entry within the very same Logbook Operaton entry in "events" array.- Specified by:
updateLogbookOperationin interfaceLogbookDbAccess- Throws:
LogbookDatabaseExceptionLogbookNotFoundException
-
updateLogbookLifeCycle
public void updateLogbookLifeCycle(LogbookCollections collection, java.util.List<LogbookLifeCycleParametersBulk> logbookLifeCycleParametersBulk)
- Specified by:
updateLogbookLifeCyclein interfaceLogbookDbAccess
-
updateLogbookLifeCycleUnit
public void updateLogbookLifeCycleUnit(java.lang.String idOperation, java.lang.String idLfc, LogbookLifeCycleUnitParameters lifecycleItem) throws LogbookDatabaseException, LogbookNotFoundException, LogbookAlreadyExistsExceptionDescription copied from interface:LogbookDbAccessUpdate one Logbook LifeCycle
It adds this new entry within the very same Logbook LifeCycle entry in "events" array.- Specified by:
updateLogbookLifeCycleUnitin interfaceLogbookDbAccess- Throws:
LogbookDatabaseExceptionLogbookNotFoundExceptionLogbookAlreadyExistsException
-
updateLogbookLifeCycleUnit
public void updateLogbookLifeCycleUnit(java.lang.String idOperation, java.lang.String idLfc, LogbookLifeCycleUnitParameters lifecycleItem, boolean commit) throws LogbookDatabaseException, LogbookNotFoundException, LogbookAlreadyExistsExceptionDescription copied from interface:LogbookDbAccessUpdate one Logbook LifeCycle (in progress or committed
It adds this new entry within the very same Logbook LifeCycle entry in "events" array.- Specified by:
updateLogbookLifeCycleUnitin interfaceLogbookDbAccesscommit- if true update committed LFC else update in progress LFC- Throws:
LogbookDatabaseExceptionLogbookNotFoundExceptionLogbookAlreadyExistsException
-
updateLogbookLifeCycleObjectGroup
public void updateLogbookLifeCycleObjectGroup(java.lang.String idOperation, java.lang.String idLfc, LogbookLifeCycleObjectGroupParameters lifecycleItem) throws LogbookDatabaseException, LogbookNotFoundException, LogbookAlreadyExistsExceptionDescription copied from interface:LogbookDbAccessUpdate one Logbook LifeCycle
It adds this new entry within the very same Logbook LifeCycle entry in "events" array.- Specified by:
updateLogbookLifeCycleObjectGroupin interfaceLogbookDbAccess- Throws:
LogbookDatabaseExceptionLogbookNotFoundExceptionLogbookAlreadyExistsException
-
updateLogbookLifeCycleObjectGroup
public void updateLogbookLifeCycleObjectGroup(java.lang.String idOperation, java.lang.String idLfc, LogbookLifeCycleObjectGroupParameters lifecycleItem, boolean commit) throws LogbookDatabaseException, LogbookNotFoundException, LogbookAlreadyExistsExceptionDescription copied from interface:LogbookDbAccessUpdate one Logbook LifeCycle
It adds this new entry within the very same Logbook LifeCycle entry in "events" array.- Specified by:
updateLogbookLifeCycleObjectGroupin interfaceLogbookDbAccesscommit- if true update is done on committed collection otherwise on inProcess one- Throws:
LogbookDatabaseExceptionLogbookNotFoundExceptionLogbookAlreadyExistsException
-
rollbackLogbookLifeCycleUnit
public void rollbackLogbookLifeCycleUnit(java.lang.String idOperation, java.lang.String lifecycleItem) throws LogbookDatabaseException, LogbookNotFoundExceptionDescription copied from interface:LogbookDbAccessRollback one Logbook LifeCycle
It adds this new entry within the very same Logbook LifeCycle entry in "events" array.- Specified by:
rollbackLogbookLifeCycleUnitin interfaceLogbookDbAccess- Throws:
LogbookDatabaseExceptionLogbookNotFoundException
-
rollbackLogbookLifeCycleObjectGroup
public void rollbackLogbookLifeCycleObjectGroup(java.lang.String idOperation, java.lang.String lifecycleItem) throws LogbookDatabaseException, LogbookNotFoundExceptionDescription copied from interface:LogbookDbAccessRollback one Logbook LifeCycle
It adds this new entry within the very same Logbook LifeCycle entry in "events" array.- Specified by:
rollbackLogbookLifeCycleObjectGroupin interfaceLogbookDbAccess- Throws:
LogbookDatabaseExceptionLogbookNotFoundException
-
createBulkLogbookOperation
public final void createBulkLogbookOperation(LogbookOperationParameters... operationItems) throws LogbookDatabaseException, LogbookAlreadyExistsException
Description copied from interface:LogbookDbAccessCreate one Logbook Operation with already multiple sub-events- Specified by:
createBulkLogbookOperationin interfaceLogbookDbAccess- Parameters:
operationItems- with first and next events to add/update- Throws:
LogbookDatabaseExceptionLogbookAlreadyExistsException
-
createBulkLogbookLifeCycleUnit
public final void createBulkLogbookLifeCycleUnit(LogbookLifeCycleUnitParameters... lifecycleItems) throws LogbookDatabaseException, LogbookAlreadyExistsException
Description copied from interface:LogbookDbAccessCreate one Logbook LifeCycle with already multiple sub-events- Specified by:
createBulkLogbookLifeCycleUnitin interfaceLogbookDbAccess- Parameters:
lifecycleItems- with first and next events to add/update- Throws:
LogbookDatabaseExceptionLogbookAlreadyExistsException
-
createBulkLogbookLifeCycleObjectGroup
public final void createBulkLogbookLifeCycleObjectGroup(LogbookLifeCycleObjectGroupParameters... lifecycleItems) throws LogbookDatabaseException, LogbookAlreadyExistsException
Description copied from interface:LogbookDbAccessCreate one Logbook LifeCycle with already multiple sub-events- Specified by:
createBulkLogbookLifeCycleObjectGroupin interfaceLogbookDbAccess- Parameters:
lifecycleItems- with first and next events to add/update- Throws:
LogbookDatabaseExceptionLogbookAlreadyExistsException
-
updateBulkLogbookOperation
public final void updateBulkLogbookOperation(LogbookOperationParameters... operationItems) throws LogbookDatabaseException, LogbookNotFoundException
Description copied from interface:LogbookDbAccessUpdate one Logbook Operation with multiple sub-events
It adds this new entry within the very same Logbook Operaton entry in "events" array.- Specified by:
updateBulkLogbookOperationin interfaceLogbookDbAccess- Throws:
LogbookDatabaseExceptionLogbookNotFoundException
-
updateBulkLogbookLifeCycleUnit
public void updateBulkLogbookLifeCycleUnit(LogbookLifeCycleUnitParameters... lifecycleItems) throws LogbookDatabaseException, LogbookNotFoundException, LogbookAlreadyExistsException
Description copied from interface:LogbookDbAccessUpdate one Logbook LifeCycle with multiple sub-events
It adds this new entry within the very same Logbook LifeCycle entry in "events" array.- Specified by:
updateBulkLogbookLifeCycleUnitin interfaceLogbookDbAccess- Throws:
LogbookDatabaseExceptionLogbookNotFoundExceptionLogbookAlreadyExistsException
-
updateBulkLogbookLifeCycleObjectGroup
public void updateBulkLogbookLifeCycleObjectGroup(LogbookLifeCycleObjectGroupParameters... lifecycleItems) throws LogbookDatabaseException, LogbookNotFoundException, LogbookAlreadyExistsException
Description copied from interface:LogbookDbAccessUpdate one Logbook LifeCycle with multiple sub-events
It adds this new entry within the very same Logbook LifeCycle entry in "events" array.- Specified by:
updateBulkLogbookLifeCycleObjectGroupin interfaceLogbookDbAccess- Throws:
LogbookDatabaseExceptionLogbookNotFoundExceptionLogbookAlreadyExistsException
-
deleteCollectionForTesting
public void deleteCollectionForTesting(LogbookCollections collection) throws DatabaseException, LogbookExecutionException
Description copied from interface:LogbookDbAccessDelete logbook collection- Specified by:
deleteCollectionForTestingin interfaceLogbookDbAccess- Parameters:
collection- the logbook collection to delete- Throws:
DatabaseException- thrown when error on deleteLogbookExecutionException
-
getLogbookLifeCycleUnitInProcess
public LogbookLifeCycleUnitInProcess getLogbookLifeCycleUnitInProcess(java.lang.String unitId) throws LogbookDatabaseException, LogbookNotFoundException
Description copied from interface:LogbookDbAccessGet Unit LifeCycle In process- Specified by:
getLogbookLifeCycleUnitInProcessin interfaceLogbookDbAccess- Parameters:
unitId- the unit id- Returns:
- the corresponding LogbookLifeCycleUnitInProcess if it exists
- Throws:
LogbookDatabaseExceptionLogbookNotFoundException
-
getLogbookLifeCycleObjectGroupInProcess
public LogbookLifeCycleObjectGroupInProcess getLogbookLifeCycleObjectGroupInProcess(java.lang.String objectGroupId) throws LogbookDatabaseException, LogbookNotFoundException
Description copied from interface:LogbookDbAccessGets ObjectGroup LifeCycle In process- Specified by:
getLogbookLifeCycleObjectGroupInProcessin interfaceLogbookDbAccess- Parameters:
objectGroupId- the object group id- Returns:
- the corresponding LogbookLifeCycleObjectGroupInProcess if it exists
- Throws:
LogbookDatabaseExceptionLogbookNotFoundException
-
createLogbookLifeCycleUnit
public void createLogbookLifeCycleUnit(LogbookLifeCycleUnitInProcess logbookLifeCycleUnitInProcess) throws LogbookDatabaseException, LogbookAlreadyExistsException
Description copied from interface:LogbookDbAccessCreates Unit lifeCycle from a LogbookLifeCycleUnitInProcess instance- Specified by:
createLogbookLifeCycleUnitin interfaceLogbookDbAccess- Parameters:
logbookLifeCycleUnitInProcess- a LogbookLifeCycleUnitInProcess instance- Throws:
LogbookDatabaseExceptionLogbookAlreadyExistsException
-
createLogbookLifeCycleObjectGroup
public void createLogbookLifeCycleObjectGroup(LogbookLifeCycleObjectGroupInProcess logbookLifeCycleObjectGroupInProcess) throws LogbookDatabaseException, LogbookAlreadyExistsException
Description copied from interface:LogbookDbAccessCreates ObjectGroup lifeCycle from a LogbookLifeCycleObjectGroupInProcess instance- Specified by:
createLogbookLifeCycleObjectGroupin interfaceLogbookDbAccess- Throws:
LogbookDatabaseExceptionLogbookAlreadyExistsException
-
createLogbookLifeCycleForUpdate
public void createLogbookLifeCycleForUpdate(LogbookCollections inProccessCollection, LogbookLifeCycle<?> logbookLifeCycleInProd) throws LogbookDatabaseException, LogbookAlreadyExistsException
- Parameters:
inProccessCollection- collection of logbook in processlogbookLifeCycleInProd- to create logbook lfc Unit/GroupObject- Throws:
LogbookDatabaseException- if mongo execution errorLogbookAlreadyExistsException- if duplicated key in mongo
-
updateLogbookLifeCycleUnit
public void updateLogbookLifeCycleUnit(LogbookLifeCycleUnitInProcess logbookLifeCycleUnitInProcess) throws LogbookDatabaseException, LogbookNotFoundException
Description copied from interface:LogbookDbAccessUpdates Unit lifeCycle from a LogbookLifeCycleUnitInProcess instance- Specified by:
updateLogbookLifeCycleUnitin interfaceLogbookDbAccess- Parameters:
logbookLifeCycleUnitInProcess- a LogbookLifeCycleUnitInProcess instance- Throws:
LogbookDatabaseExceptionLogbookNotFoundException
-
updateLogbookLifeCycleObjectGroup
public void updateLogbookLifeCycleObjectGroup(LogbookLifeCycleObjectGroupInProcess logbookLifeCycleObjectGrouptInProcess) throws LogbookDatabaseException, LogbookNotFoundException
Description copied from interface:LogbookDbAccessUpdates ObjectGroup lifeCycle from a LogbookLifeCycleObjectGroupInProcess instance- Specified by:
updateLogbookLifeCycleObjectGroupin interfaceLogbookDbAccess- Parameters:
logbookLifeCycleObjectGrouptInProcess- a LogbookLifeCycleObjectGroupInProcess instance- Throws:
LogbookDatabaseExceptionLogbookNotFoundException
-
rollBackUnitLifeCyclesByOperation
public void rollBackUnitLifeCyclesByOperation(java.lang.String operationId) throws LogbookNotFoundException, LogbookDatabaseExceptionDescription copied from interface:LogbookDbAccessRolls back all the created unit lifeCycles during a given operation- Specified by:
rollBackUnitLifeCyclesByOperationin interfaceLogbookDbAccess- Parameters:
operationId- an operation id- Throws:
LogbookNotFoundExceptionLogbookDatabaseException
-
rollBackObjectGroupLifeCyclesByOperation
public void rollBackObjectGroupLifeCyclesByOperation(java.lang.String operationId) throws LogbookNotFoundException, LogbookDatabaseExceptionDescription copied from interface:LogbookDbAccessRolls back all the created objectGroups lifeCycles during a given operation- Specified by:
rollBackObjectGroupLifeCyclesByOperationin interfaceLogbookDbAccess- Parameters:
operationId- an operation Id- Throws:
LogbookNotFoundExceptionLogbookDatabaseException
-
existsLogbookLifeCycleUnitInProcess
public boolean existsLogbookLifeCycleUnitInProcess(java.lang.String unitId) throws LogbookDatabaseExceptionDescription copied from interface:LogbookDbAccessCheck if one eventIdentifier for Lifecycle exists already- Specified by:
existsLogbookLifeCycleUnitInProcessin interfaceLogbookDbAccess- Returns:
- True if one LogbookLibeCycle exists with this id
- Throws:
LogbookDatabaseException
-
existsLogbookLifeCycleObjectGroupInProcess
public boolean existsLogbookLifeCycleObjectGroupInProcess(java.lang.String objectGroupId) throws LogbookDatabaseExceptionDescription copied from interface:LogbookDbAccessCheck if one eventIdentifier for Lifecycle exists already- Specified by:
existsLogbookLifeCycleObjectGroupInProcessin interfaceLogbookDbAccess- Returns:
- True if one LogbookLibeCycle exists with this id
- Throws:
LogbookDatabaseException
-
bulkInsert
public void bulkInsert(LogbookCollections lifecycleUnit, java.util.List<? extends LogbookLifeCycleModel> logbookLifeCycleModels) throws DatabaseException
- Specified by:
bulkInsertin interfaceLogbookDbAccess- Throws:
DatabaseException
-
-