public interface LogbookDbAccess
Modifier and Type | Method and Description |
---|---|
void |
bulk(LogbookCollections lifecycleUnit,
List<? extends LogbookLifeCycleModel> logbookLifeCycleModels) |
void |
close()
Close database access
|
void |
createBulkLogbookLifeCycleObjectGroup(LogbookLifeCycleObjectGroupParameters... lifecycleItems)
Create one Logbook LifeCycle with already multiple sub-events
|
void |
createBulkLogbookLifeCycleUnit(LogbookLifeCycleUnitParameters... lifecycleItems)
Create one Logbook LifeCycle with already multiple sub-events
|
void |
createBulkLogbookOperation(LogbookOperationParameters... operationItems)
Create one Logbook Operation with already multiple sub-events
|
void |
createLogbookLifeCycleObjectGroup(LogbookLifeCycleObjectGroupInProcess logbookLifeCycleObjectGrouptInProcess)
Creates ObjectGroup lifeCycle from a LogbookLifeCycleObjectGroupInProcess instance
|
void |
createLogbookLifeCycleObjectGroup(String idOperation,
LogbookLifeCycleObjectGroupParameters lifecycleItem)
Create one Logbook LifeCycle object group
|
void |
createLogbookLifeCycleUnit(LogbookLifeCycleUnitInProcess logbookLifeCycleUnitInProcess)
Creates Unit lifeCycle from a LogbookLifeCycleUnitInProcess instance
|
void |
createLogbookLifeCycleUnit(String idOperation,
LogbookLifeCycleUnitParameters lifecycleItem)
Create one Logbook LifeCycle unit
|
void |
createLogbookOperation(LogbookOperationParameters operationItem)
Create one Logbook Operation
|
void |
deleteCollection(LogbookCollections collection)
Delete logbook collection
|
boolean |
existsLogbookLifeCycleObjectGroup(String lifecycleItem)
Check if one eventIdentifier for Lifecycle exists already
|
boolean |
existsLogbookLifeCycleObjectGroupInProcess(String lifecycleItem)
Check if one eventIdentifier for Lifecycle exists already
|
boolean |
existsLogbookLifeCycleUnit(String lifecycleItem)
Check if one eventIdentifier for Lifecycle exists already
|
boolean |
existsLogbookLifeCycleUnitInProcess(String lifecycleItem)
Check if one eventIdentifier for Lifecycle exists already
|
boolean |
existsLogbookOperation(String operationItem)
Check if one eventIdentifier for Operation exists already
|
String |
getInfo()
Get information on a Database
|
LogbookLifeCycleObjectGroup |
getLogbookLifeCycleObjectGroup(String objectIdentifier)
Get one Lifecycle
|
LogbookLifeCycleObjectGroup |
getLogbookLifeCycleObjectGroup(String idOperation,
String idLc)
Get one Lifecycle
|
LogbookLifeCycleObjectGroupInProcess |
getLogbookLifeCycleObjectGroupInProcess(String objectGroupId)
Gets ObjectGroup LifeCycle In process
|
com.mongodb.client.MongoCursor<LogbookLifeCycle> |
getLogbookLifeCycleObjectGroups(com.fasterxml.jackson.databind.JsonNode select,
boolean sliced,
LogbookCollections collection)
Get a list of Logbook LifeCycle through Closeable MongoCursor
|
com.mongodb.client.MongoCursor<LogbookLifeCycleObjectGroup> |
getLogbookLifeCycleObjectGroupsFull(LogbookCollections collection,
Select select)
Get a list of Logbook LifeCycle through Closeable MongoCursor
|
LogbookLifeCycle |
getLogbookLifeCycleUnit(com.fasterxml.jackson.databind.JsonNode queryDsl,
LogbookCollections collection)
Get one Lifecycle
|
LogbookLifeCycleUnit |
getLogbookLifeCycleUnit(String objectIdentifier)
Get one Lifecycle
|
LogbookLifeCycleUnit |
getLogbookLifeCycleUnit(String idOperation,
String idLc)
Get one Lifecycle
|
LogbookLifeCycleUnitInProcess |
getLogbookLifeCycleUnitInProcess(String unitId)
Get Unit LifeCycle In process
|
com.mongodb.client.MongoCursor<LogbookLifeCycle> |
getLogbookLifeCycleUnits(com.fasterxml.jackson.databind.JsonNode select,
boolean sliced,
LogbookCollections collection)
Get a list of Logbook LifeCycle through Closeable MongoCursor
|
com.mongodb.client.MongoCursor<LogbookLifeCycleUnit> |
getLogbookLifeCycleUnitsFull(LogbookCollections collection,
Select select)
Get a list of Logbook LifeCycle through Closeable MongoCursor
|
long |
getLogbookLifeCyleObjectGroupInProcessSize() |
long |
getLogbookLifeCyleObjectGroupSize() |
long |
getLogbookLifeCyleUnitInProcessSize() |
long |
getLogbookLifeCyleUnitSize() |
LogbookOperation |
getLogbookOperation(String eventIdentifierProcess)
Get one Operation
|
com.mongodb.client.MongoCursor<LogbookOperation> |
getLogbookOperations(com.fasterxml.jackson.databind.JsonNode select,
boolean sliced)
Get a list of Logbook Operation through Closeable MongoCursor
|
long |
getLogbookOperationSize() |
void |
rollbackLogbookLifeCycleObjectGroup(String idOperation,
String lifecycleItem)
Rollback one Logbook LifeCycle
It adds this new entry within the very same Logbook LifeCycle entry in "events" array. |
void |
rollbackLogbookLifeCycleUnit(String idOperation,
String lifecycleItem)
Rollback one Logbook LifeCycle
It adds this new entry within the very same Logbook LifeCycle entry in "events" array. |
void |
rollBackObjectGroupLifeCyclesByOperation(String operationId)
Rolls back all the created objectGroups lifeCycles during a given operation
|
void |
rollBackUnitLifeCyclesByOperation(String operationId)
Rolls back all the created unit lifeCycles during a given operation
|
void |
updateBulkLogbookLifeCycleObjectGroup(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. |
void |
updateBulkLogbookLifeCycleUnit(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. |
void |
updateBulkLogbookOperation(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. |
void |
updateLogbookLifeCycleObjectGroup(LogbookLifeCycleObjectGroupInProcess logbookLifeCycleObjectGrouptInProcess)
Updates ObjectGroup lifeCycle from a LogbookLifeCycleObjectGroupInProcess instance
|
void |
updateLogbookLifeCycleObjectGroup(String idOperation,
String idLfc,
LogbookLifeCycleObjectGroupParameters lifecycleItem)
Update one Logbook LifeCycle
It adds this new entry within the very same Logbook LifeCycle entry in "events" array. |
void |
updateLogbookLifeCycleObjectGroup(String idOperation,
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. |
void |
updateLogbookLifeCycleUnit(LogbookLifeCycleUnitInProcess logbookLifeCycleUnitInProcess)
Updates Unit lifeCycle from a LogbookLifeCycleUnitInProcess instance
|
void |
updateLogbookLifeCycleUnit(String idOperation,
String idLfc,
LogbookLifeCycleUnitParameters lifecycleItem)
Update one Logbook LifeCycle
It adds this new entry within the very same Logbook LifeCycle entry in "events" array. |
void |
updateLogbookLifeCycleUnit(String idOperation,
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. |
void |
updateLogbookOperation(LogbookOperationParameters operationItem)
Update one Logbook Operation
It adds this new entry within the very same Logbook Operaton entry in "events" array. |
void close()
long getLogbookOperationSize() throws LogbookDatabaseException, LogbookNotFoundException
LogbookDatabaseException
LogbookNotFoundException
long getLogbookLifeCyleUnitSize() throws LogbookDatabaseException, LogbookNotFoundException
LogbookDatabaseException
LogbookNotFoundException
long getLogbookLifeCyleObjectGroupSize() throws LogbookDatabaseException, LogbookNotFoundException
LogbookDatabaseException
LogbookNotFoundException
boolean existsLogbookOperation(String operationItem) throws LogbookDatabaseException
operationItem
- LogbookDatabaseException
IllegalArgumentException
- if parameter has null or empty mandatory valuesboolean existsLogbookLifeCycleUnit(String lifecycleItem) throws LogbookDatabaseException, LogbookNotFoundException
lifecycleItem
- LogbookDatabaseException
LogbookNotFoundException
IllegalArgumentException
- if parameter has null or empty mandatory valuesboolean existsLogbookLifeCycleObjectGroup(String lifecycleItem) throws LogbookDatabaseException, LogbookNotFoundException
lifecycleItem
- LogbookDatabaseException
LogbookNotFoundException
IllegalArgumentException
- if parameter has null or empty mandatory valuesLogbookOperation getLogbookOperation(String eventIdentifierProcess) throws LogbookDatabaseException, LogbookNotFoundException
eventIdentifierProcess
- LogbookDatabaseException
LogbookNotFoundException
IllegalArgumentException
- if parameter has null or empty mandatory valuesLogbookLifeCycleUnit getLogbookLifeCycleUnit(String objectIdentifier) throws LogbookDatabaseException, LogbookNotFoundException
objectIdentifier
- LogbookDatabaseException
LogbookNotFoundException
IllegalArgumentException
- if parameter has null or empty mandatory valuesLogbookLifeCycle getLogbookLifeCycleUnit(com.fasterxml.jackson.databind.JsonNode queryDsl, LogbookCollections collection) throws LogbookDatabaseException, LogbookNotFoundException
queryDsl
- the DSL querycollection
- the collection on which the select operation will be done : Production collection
(LIFECYCLE_UNIT) or Working collection (LIFECYCLE_UNIT_IN_PROCESS)LogbookDatabaseException
LogbookNotFoundException
IllegalArgumentException
- if parameter has null or empty mandatory valuesLogbookLifeCycleObjectGroup getLogbookLifeCycleObjectGroup(String objectIdentifier) throws LogbookDatabaseException, LogbookNotFoundException
objectIdentifier
- LogbookDatabaseException
LogbookNotFoundException
IllegalArgumentException
- if parameter has null or empty mandatory valuesLogbookLifeCycleUnit getLogbookLifeCycleUnit(String idOperation, String idLc) throws LogbookDatabaseException, LogbookNotFoundException
idOperation
- idLc
- LogbookDatabaseException
LogbookNotFoundException
IllegalArgumentException
- if parameter has null or empty mandatory valuesLogbookLifeCycleObjectGroup getLogbookLifeCycleObjectGroup(String idOperation, String idLc) throws LogbookDatabaseException, LogbookNotFoundException
idOperation
- idLc
- LogbookDatabaseException
LogbookNotFoundException
IllegalArgumentException
- if parameter has null or empty mandatory valuesvoid createLogbookOperation(LogbookOperationParameters operationItem) throws LogbookDatabaseException, LogbookAlreadyExistsException
operationItem
- LogbookDatabaseException
LogbookAlreadyExistsException
IllegalArgumentException
- if parameter has null or empty mandatory valuesvoid createLogbookLifeCycleUnit(String idOperation, LogbookLifeCycleUnitParameters lifecycleItem) throws LogbookDatabaseException, LogbookAlreadyExistsException
idOperation
- lifecycleItem
- LogbookDatabaseException
LogbookAlreadyExistsException
IllegalArgumentException
- if parameter has null or empty mandatory valuesvoid createLogbookLifeCycleObjectGroup(String idOperation, LogbookLifeCycleObjectGroupParameters lifecycleItem) throws LogbookDatabaseException, LogbookAlreadyExistsException
idOperation
- lifecycleItem
- LogbookDatabaseException
LogbookAlreadyExistsException
IllegalArgumentException
- if parameter has null or empty mandatory valuesvoid updateLogbookOperation(LogbookOperationParameters operationItem) throws LogbookDatabaseException, LogbookNotFoundException
operationItem
- LogbookDatabaseException
LogbookNotFoundException
IllegalArgumentException
- if parameter has null or empty mandatory valuesvoid updateLogbookLifeCycleUnit(String idOperation, String idLfc, LogbookLifeCycleUnitParameters lifecycleItem) throws LogbookDatabaseException, LogbookNotFoundException, LogbookAlreadyExistsException
idOperation
- idLfc
- lifecycleItem
- LogbookDatabaseException
LogbookNotFoundException
LogbookAlreadyExistsException
IllegalArgumentException
- if parameter has null or empty mandatory valuesvoid updateLogbookLifeCycleUnit(String idOperation, String idLfc, LogbookLifeCycleUnitParameters lifecycleItem, boolean commit) throws LogbookDatabaseException, LogbookNotFoundException, LogbookAlreadyExistsException
idOperation
- idLfc
- lifecycleItem
- commit
- if true update committed LFC else update in progress LFCLogbookDatabaseException
LogbookNotFoundException
LogbookAlreadyExistsException
IllegalArgumentException
- if parameter has null or empty mandatory valuesvoid updateLogbookLifeCycleObjectGroup(String idOperation, String idLfc, LogbookLifeCycleObjectGroupParameters lifecycleItem) throws LogbookDatabaseException, LogbookNotFoundException, LogbookAlreadyExistsException
idOperation
- idLfc
- lifecycleItem
- LogbookDatabaseException
LogbookNotFoundException
LogbookAlreadyExistsException
IllegalArgumentException
- if parameter has null or empty mandatory valuesvoid updateLogbookLifeCycleObjectGroup(String idOperation, String idLfc, LogbookLifeCycleObjectGroupParameters lifecycleItem, boolean commit) throws LogbookDatabaseException, LogbookNotFoundException, LogbookAlreadyExistsException
idOperation
- idLfc
- lifecycleItem
- commit
- if true update is done on committed collection otherwise on inProcess oneLogbookDatabaseException
LogbookNotFoundException
LogbookAlreadyExistsException
IllegalArgumentException
- if parameter has null or empty mandatory valuesvoid rollbackLogbookLifeCycleUnit(String idOperation, String lifecycleItem) throws LogbookDatabaseException, LogbookNotFoundException
idOperation
- lifecycleItem
- LogbookDatabaseException
LogbookNotFoundException
IllegalArgumentException
- if parameter has null or empty mandatory valuesvoid rollbackLogbookLifeCycleObjectGroup(String idOperation, String lifecycleItem) throws LogbookDatabaseException, LogbookNotFoundException
idOperation
- lifecycleItem
- LogbookDatabaseException
LogbookNotFoundException
IllegalArgumentException
- if parameter has null or empty mandatory valuesvoid createBulkLogbookOperation(LogbookOperationParameters... operationItems) throws LogbookDatabaseException, LogbookAlreadyExistsException
operationItems
- with first and next events to add/updateIllegalArgumentException
- if first argument is null or null mandatory parameters for allLogbookDatabaseException
LogbookAlreadyExistsException
void createBulkLogbookLifeCycleUnit(LogbookLifeCycleUnitParameters... lifecycleItems) throws LogbookDatabaseException, LogbookAlreadyExistsException
lifecycleItems
- with first and next events to add/updateIllegalArgumentException
- if first argument is null or null mandatory parameters for allLogbookDatabaseException
LogbookAlreadyExistsException
void createBulkLogbookLifeCycleObjectGroup(LogbookLifeCycleObjectGroupParameters... lifecycleItems) throws LogbookDatabaseException, LogbookAlreadyExistsException
lifecycleItems
- with first and next events to add/updateIllegalArgumentException
- if first argument is null or null mandatory parameters for allLogbookDatabaseException
LogbookAlreadyExistsException
void updateBulkLogbookOperation(LogbookOperationParameters... operationItems) throws LogbookDatabaseException, LogbookNotFoundException
operationItems
- IllegalArgumentException
- if parameter has null or empty mandatory valuesLogbookDatabaseException
LogbookNotFoundException
void updateBulkLogbookLifeCycleUnit(LogbookLifeCycleUnitParameters... lifecycleItems) throws LogbookDatabaseException, LogbookNotFoundException, LogbookAlreadyExistsException
lifecycleItems
- IllegalArgumentException
- if parameter has null or empty mandatory valuesLogbookDatabaseException
LogbookNotFoundException
LogbookAlreadyExistsException
void updateBulkLogbookLifeCycleObjectGroup(LogbookLifeCycleObjectGroupParameters... lifecycleItems) throws LogbookDatabaseException, LogbookNotFoundException, LogbookAlreadyExistsException
lifecycleItems
- IllegalArgumentException
- if parameter has null or empty mandatory valuesLogbookDatabaseException
LogbookNotFoundException
LogbookAlreadyExistsException
com.mongodb.client.MongoCursor<LogbookOperation> getLogbookOperations(com.fasterxml.jackson.databind.JsonNode select, boolean sliced) throws LogbookDatabaseException, LogbookNotFoundException, VitamDBException
select
- sliced
- If true will return the first and last events onlyIllegalArgumentException
- if argument is null or emptyLogbookDatabaseException
LogbookNotFoundException
VitamDBException
com.mongodb.client.MongoCursor<LogbookLifeCycle> getLogbookLifeCycleUnits(com.fasterxml.jackson.databind.JsonNode select, boolean sliced, LogbookCollections collection) throws LogbookDatabaseException, LogbookNotFoundException, VitamDBException
select
- sliced
- collection
- the collection on which the select operation will be done : Production collection
(LIFECYCLE_UNIT) or Working collection (LIFECYCLE_UNIT_IN_PROCESS)IllegalArgumentException
- if argument is null or emptyLogbookDatabaseException
LogbookNotFoundException
VitamDBException
com.mongodb.client.MongoCursor<LogbookLifeCycleUnit> getLogbookLifeCycleUnitsFull(LogbookCollections collection, Select select) throws LogbookDatabaseException
collection
- the collection on which the select operation will be done : Production collection
(LIFECYCLE_UNIT) or Working collection (LIFECYCLE_UNIT_IN_PROCESS)select
- IllegalArgumentException
- if argument is null or emptyLogbookDatabaseException
com.mongodb.client.MongoCursor<LogbookLifeCycle> getLogbookLifeCycleObjectGroups(com.fasterxml.jackson.databind.JsonNode select, boolean sliced, LogbookCollections collection) throws LogbookDatabaseException, LogbookNotFoundException, VitamDBException
select
- sliced
- collection
- the collection on which the select operation will be done : Production collection
(LIFECYCLE_OBJECT_GROUP) or Working collection (LIFECYCLE_OBJECT_GROUP_IN_PROCESS)IllegalArgumentException
- if argument is null or emptyLogbookDatabaseException
LogbookNotFoundException
VitamDBException
com.mongodb.client.MongoCursor<LogbookLifeCycleObjectGroup> getLogbookLifeCycleObjectGroupsFull(LogbookCollections collection, Select select) throws LogbookDatabaseException
collection
- the collection on which the select operation will be done : Production collection
(LIFECYCLE_OBJECT_GROUP) or Working collection (LIFECYCLE_OBJECT_GROUP_IN_PROCESS)select
- IllegalArgumentException
- if argument is null or emptyLogbookDatabaseException
void deleteCollection(LogbookCollections collection) throws DatabaseException
collection
- the logbook collection to deleteDatabaseException
- thrown when error on deleteLogbookLifeCycleUnitInProcess getLogbookLifeCycleUnitInProcess(String unitId) throws LogbookDatabaseException, LogbookNotFoundException
unitId
- the unit idLogbookDatabaseException
LogbookNotFoundException
IllegalArgumentException
- if parameter has null or empty mandatory valuesLogbookLifeCycleObjectGroupInProcess getLogbookLifeCycleObjectGroupInProcess(String objectGroupId) throws LogbookDatabaseException, LogbookNotFoundException
objectGroupId
- the object group idLogbookDatabaseException
LogbookNotFoundException
IllegalArgumentException
- if parameter has null or empty mandatory valuesvoid createLogbookLifeCycleUnit(LogbookLifeCycleUnitInProcess logbookLifeCycleUnitInProcess) throws LogbookDatabaseException, LogbookAlreadyExistsException
logbookLifeCycleUnitInProcess
- a LogbookLifeCycleUnitInProcess instanceLogbookAlreadyExistsException
LogbookDatabaseException
void createLogbookLifeCycleObjectGroup(LogbookLifeCycleObjectGroupInProcess logbookLifeCycleObjectGrouptInProcess) throws LogbookDatabaseException, LogbookAlreadyExistsException
logbookLifeCycleObjectGrouptInProcess
- LogbookAlreadyExistsException
LogbookDatabaseException
void updateLogbookLifeCycleUnit(LogbookLifeCycleUnitInProcess logbookLifeCycleUnitInProcess) throws LogbookDatabaseException, LogbookNotFoundException
logbookLifeCycleUnitInProcess
- a LogbookLifeCycleUnitInProcess instanceLogbookDatabaseException
LogbookNotFoundException
void updateLogbookLifeCycleObjectGroup(LogbookLifeCycleObjectGroupInProcess logbookLifeCycleObjectGrouptInProcess) throws LogbookDatabaseException, LogbookNotFoundException
logbookLifeCycleObjectGrouptInProcess
- a LogbookLifeCycleObjectGroupInProcess instanceLogbookDatabaseException
LogbookNotFoundException
void rollBackUnitLifeCyclesByOperation(String operationId) throws LogbookNotFoundException, LogbookDatabaseException
operationId
- an operation idLogbookNotFoundException
LogbookDatabaseException
void rollBackObjectGroupLifeCyclesByOperation(String operationId) throws LogbookNotFoundException, LogbookDatabaseException
operationId
- an operation IdLogbookNotFoundException
LogbookDatabaseException
long getLogbookLifeCyleUnitInProcessSize() throws LogbookDatabaseException, LogbookNotFoundException
LogbookDatabaseException
LogbookNotFoundException
long getLogbookLifeCyleObjectGroupInProcessSize() throws LogbookDatabaseException, LogbookNotFoundException
LogbookDatabaseException
LogbookNotFoundException
boolean existsLogbookLifeCycleUnitInProcess(String lifecycleItem) throws LogbookDatabaseException, LogbookNotFoundException
lifecycleItem
- LogbookDatabaseException
LogbookNotFoundException
IllegalArgumentException
- if parameter has null or empty mandatory valuesboolean existsLogbookLifeCycleObjectGroupInProcess(String lifecycleItem) throws LogbookDatabaseException, LogbookNotFoundException
lifecycleItem
- LogbookDatabaseException
LogbookNotFoundException
IllegalArgumentException
- if parameter has null or empty mandatory valuesString getInfo()
void bulk(LogbookCollections lifecycleUnit, List<? extends LogbookLifeCycleModel> logbookLifeCycleModels) throws DatabaseException
DatabaseException
Copyright © 2018 Vitam. All rights reserved.