public interface LogbookLifeCycles
Modifier and Type | Method and Description |
---|---|
void |
bulk(LogbookCollections collections,
String idOp,
List<? extends LogbookLifeCycleModel> logbookLifeCycleModels)
Bulk method
|
void |
commitObjectGroup(String idOperation,
String idLc)
Commits ObjectGroup lifeCycle
|
void |
commitUnit(String idOperation,
String idLc)
Commits Unit lifeCycle
|
void |
createBulkLogbookLifecycle(String idOp,
LogbookLifeCycleParameters[] lifecycleArray)
Create one Logbook Lifecycle with already multiple sub-events
|
void |
createObjectGroup(String idOperation,
String idLc,
LogbookLifeCycleObjectGroupParameters parameters)
Create and insert logbook LifeCycle entries
|
void |
createUnit(String idOperation,
String idLc,
LogbookLifeCycleUnitParameters parameters)
Create and insert logbook LifeCycle entries
|
LogbookLifeCycleObjectGroup |
getObjectGroupById(String idObject)
Select logbook life cycle by the lifecycle's ID
|
LogbookLifeCycleObjectGroup |
getObjectGroupByOperationIdAndByObjectGroupId(String idOperation,
String idLc)
Select logbook LifeCycle entry by operation
|
LifeCycleStatusCode |
getObjectGroupLifeCycleStatus(String objectGroupId)
Returns the LifeCycle Status for a given objectGroup Id
|
LogbookLifeCycle |
getUnitById(com.fasterxml.jackson.databind.JsonNode queryDsl,
LogbookCollections collection)
Selects logbook life cycle by lifecycle ID (using a queryDsl)
|
LogbookLifeCycleUnit |
getUnitById(String idUnit)
Select logbook life cycle by the lifecycle's ID
|
LogbookLifeCycleUnit |
getUnitByOperationIdAndByUnitId(String idOperation,
String idLc)
Select logbook LifeCycle entry by operation
|
LifeCycleStatusCode |
getUnitLifeCycleStatus(String unitId)
Returns the LifeCycle Status for a given unit Id
|
void |
rollbackObjectGroup(String idOperation,
String idLc)
Rollback logbook LifeCycle entries
|
void |
rollBackObjectGroupsByOperation(String idOperation)
Removes the created object groups lifeCycles during a given operation
|
void |
rollbackUnit(String idOperation,
String idLc)
Rollback logbook LifeCycle entries
|
void |
rollBackUnitsByOperation(String idOperation)
Removes the created unit lifeCycles during a given operation
|
List<LogbookLifeCycle> |
selectObjectGroup(com.fasterxml.jackson.databind.JsonNode select,
boolean sliced,
LogbookCollections collection)
Selects object group life cycle entries
|
List<LogbookLifeCycle> |
selectObjectGroup(com.fasterxml.jackson.databind.JsonNode select,
LogbookCollections collection)
Selects object group life cycle entries
|
List<LogbookLifeCycle> |
selectUnit(com.fasterxml.jackson.databind.JsonNode select,
boolean sliced,
LogbookCollections collection)
Select logbook LifeCycle entries
|
void |
updateBulkLogbookLifecycle(String idOp,
LogbookLifeCycleParameters[] lifecycleArray)
Update one Logbook Lifecycle with multiple sub-events
It adds this new entry within the very same Logbook Lifecycle entry in "events" array. |
void |
updateObjectGroup(String idOperation,
String idLc,
LogbookLifeCycleObjectGroupParameters parameters)
Update logbook LifeCycle entries
|
void |
updateObjectGroup(String idOperation,
String idLc,
LogbookLifeCycleObjectGroupParameters parameters,
boolean commit)
Update logbook LifeCycle entries
|
void |
updateUnit(String idOperation,
String idLc,
LogbookLifeCycleUnitParameters parameters)
Update logbook LifeCycle entries
|
void |
updateUnit(String idOperation,
String idLc,
LogbookLifeCycleUnitParameters parameters,
boolean commit)
Update logbook LifeCycle entries committed or in progress
|
void createUnit(String idOperation, String idLc, LogbookLifeCycleUnitParameters parameters) throws LogbookAlreadyExistsException, LogbookDatabaseException
idOperation
- the operation identifieridLc
- the lifecycle unit identifierparameters
- the logbook lifecycle parametersLogbookAlreadyExistsException
- if an LifeCycle with the same eventIdentifierProcess and outcome="Started"
already existsLogbookDatabaseException
- if errors occur while connecting or writing to the databasevoid createObjectGroup(String idOperation, String idLc, LogbookLifeCycleObjectGroupParameters parameters) throws LogbookAlreadyExistsException, LogbookDatabaseException
idOperation
- the operation identifieridLc
- the lifecycle identifierparameters
- the logbook lifecycle parametersLogbookAlreadyExistsException
- if an LifeCycle with the same eventIdentifierProcess and outcome="Started"
already existsLogbookDatabaseException
- if errors occur while connecting or writing to the databasevoid updateUnit(String idOperation, String idLc, LogbookLifeCycleUnitParameters parameters) throws LogbookNotFoundException, LogbookDatabaseException, LogbookAlreadyExistsException
idOperation
- the operation identifieridLc
- the lifecycle identifierparameters
- the logbook lifecycle parametersLogbookNotFoundException
- if no LifeCycle with the same eventIdentifierProcess existsLogbookDatabaseException
- if errors occur while connecting or writing to the databaseLogbookAlreadyExistsException
- if the entry already existsvoid updateUnit(String idOperation, String idLc, LogbookLifeCycleUnitParameters parameters, boolean commit) throws LogbookNotFoundException, LogbookDatabaseException, LogbookAlreadyExistsException
idOperation
- the operation identifieridLc
- the lifecycle identifierparameters
- the logbook lifecycle parameterscommit
- if false update in progress collection else update committed LFCLogbookNotFoundException
- if no LifeCycle with the same eventIdentifierProcess existsLogbookDatabaseException
- if errors occur while connecting or writing to the databaseLogbookAlreadyExistsException
- if the entry already existsvoid updateObjectGroup(String idOperation, String idLc, LogbookLifeCycleObjectGroupParameters parameters) throws LogbookNotFoundException, LogbookDatabaseException, LogbookAlreadyExistsException
idOperation
- the operation identifieridLc
- the lifecycle identifierparameters
- the logbook lifecycle parametersLogbookNotFoundException
- if no LifeCycle with the same eventIdentifierProcess existsLogbookDatabaseException
- if errors occur while connecting or writing to the databaseLogbookAlreadyExistsException
- if the entry already existsvoid updateObjectGroup(String idOperation, String idLc, LogbookLifeCycleObjectGroupParameters parameters, boolean commit) throws LogbookNotFoundException, LogbookDatabaseException, LogbookAlreadyExistsException
idOperation
- the operation identifieridLc
- the lifecycle identifierparameters
- the logbook lifecycle parameterscommit
- if true update is done on committed collection otherwise on inProcess oneLogbookNotFoundException
- if no LifeCycle with the same eventIdentifierProcess existsLogbookDatabaseException
- if errors occur while connecting or writing to the databaseLogbookAlreadyExistsException
- if the entry already existsList<LogbookLifeCycle> selectUnit(com.fasterxml.jackson.databind.JsonNode select, boolean sliced, LogbookCollections collection) throws LogbookDatabaseException, LogbookNotFoundException, InvalidParseOperationException, VitamDBException
select
- the select request in format of JsonNodesliced
- the boolean sliced filtering events or notcollection
- the collection on which the select operation will be done : Production collection
(LIFECYCLE_UNIT) or Working collection (LIFECYCLE_UNIT_IN_PROCESS)LogbookNotFoundException
- if no LifeCycle selected cannot be foundLogbookDatabaseException
- if errors occur while connecting or writing to the databaseInvalidParseOperationException
- if invalid parse for selecting the LifeCycleVitamDBException
- in case a desynchro is recorded between Mongo and ESList<LogbookLifeCycle> selectObjectGroup(com.fasterxml.jackson.databind.JsonNode select, LogbookCollections collection) throws LogbookDatabaseException, LogbookNotFoundException, InvalidParseOperationException, VitamDBException
select
- the select request in format of JsonNodecollection
- the collection on which the select operation will be done : Production collection
(LIFECYCLE_OBJECT_GROUP) or Working collection (LIFECYCLE_OBJECT_GROUP_IN_PROCESS)LogbookNotFoundException
- if no LifeCycle selected cannot be foundLogbookDatabaseException
- if errors occur while connecting or writing to the databaseInvalidParseOperationException
- if invalid parse for selecting the LifeCycleVitamDBException
- in case a desynchro is recorded between Mongo and ESList<LogbookLifeCycle> selectObjectGroup(com.fasterxml.jackson.databind.JsonNode select, boolean sliced, LogbookCollections collection) throws LogbookDatabaseException, LogbookNotFoundException, InvalidParseOperationException, VitamDBException
select
- the select request in format of JsonNodesliced
- the boolean sliced filtering events or notcollection
- the collection on which the select operation will be done : Production collection
(LIFECYCLE_OBJECT_GROUP) or Working collection (LIFECYCLE_OBJECT_GROUP_IN_PROCESS)LogbookNotFoundException
- if no LifeCycle selected cannot be foundLogbookDatabaseException
- if errors occur while connecting or writing to the databaseInvalidParseOperationException
- if invalid parse for selecting the LifeCycleVitamDBException
- in case a desynchro is recorded between Mongo and ESLogbookLifeCycleUnit getUnitByOperationIdAndByUnitId(String idOperation, String idLc) throws LogbookDatabaseException, LogbookNotFoundException, InvalidParseOperationException
idOperation
- the operation ididLc
- the logbook identifierLogbookDatabaseException
- if errors occur while connecting or writing to the databaseLogbookNotFoundException
- if no LifeCycle selected cannot be foundInvalidParseOperationException
- if invalid parse for selecting the LifeCycleLogbookLifeCycleObjectGroup getObjectGroupByOperationIdAndByObjectGroupId(String idOperation, String idLc) throws LogbookDatabaseException, LogbookNotFoundException, InvalidParseOperationException
idOperation
- the operation identifieridLc
- the logbook identifierLogbookDatabaseException
- if errors occur while connecting or writing to the databaseLogbookNotFoundException
- if no LifeCycle selected cannot be foundInvalidParseOperationException
- if invalid parse for selecting the LifeCyclevoid rollbackUnit(String idOperation, String idLc) throws LogbookNotFoundException, LogbookDatabaseException
idOperation
- the operation identifieridLc
- the lifecycle identifierLogbookNotFoundException
- if no LifeCycle with the same eventIdentifierProcess existsLogbookDatabaseException
- if errors occur while connecting or writing to the databasevoid rollbackObjectGroup(String idOperation, String idLc) throws LogbookNotFoundException, LogbookDatabaseException
idOperation
- the operation identifieridLc
- the lifecycle identifierLogbookNotFoundException
- if no LifeCycle with the same eventIdentifierProcess existsLogbookDatabaseException
- if errors occur while connecting or writing to the databaseLogbookLifeCycleUnit getUnitById(String idUnit) throws LogbookDatabaseException, LogbookNotFoundException
idUnit
- the unit identifierLogbookDatabaseException
- if errors occur while connecting or writing to the databaseLogbookNotFoundException
- if no LifeCycle selected cannot be foundLogbookLifeCycle getUnitById(com.fasterxml.jackson.databind.JsonNode queryDsl, LogbookCollections collection) throws LogbookDatabaseException, LogbookNotFoundException
queryDsl
- the query as a jsoncollection
- the collection on which the select operation will be done : Production collection
(LIFECYCLE_UNIT) or Working collection (LIFECYCLE_UNIT_IN_PROCESS)LogbookDatabaseException
- if errors occur while connecting or writing to the databaseLogbookNotFoundException
- if no LifeCycle selected cannot be foundLogbookLifeCycleObjectGroup getObjectGroupById(String idObject) throws LogbookDatabaseException, LogbookNotFoundException
idObject
- the object group identifierLogbookDatabaseException
- if errors occur while connecting or writing to the databaseLogbookNotFoundException
- if no LifeCycle selected cannot be foundvoid createBulkLogbookLifecycle(String idOp, LogbookLifeCycleParameters[] lifecycleArray) throws LogbookDatabaseException, LogbookAlreadyExistsException
idOp
- Operation IdlifecycleArray
- with first and next events to add/updateIllegalArgumentException
- if first argument is null or null mandatory parameters for allLogbookDatabaseException
- if errors occur while connecting or writing to the databaseLogbookAlreadyExistsException
- if LifeCycle already existsvoid updateBulkLogbookLifecycle(String idOp, LogbookLifeCycleParameters[] lifecycleArray) throws LogbookDatabaseException, LogbookNotFoundException, LogbookAlreadyExistsException
idOp
- Operation IdlifecycleArray
- containing all Lifecycle Logbook in orderIllegalArgumentException
- if parameter has null or empty mandatory valuesLogbookDatabaseException
- if errors occur while connecting or writing to the databaseLogbookNotFoundException
- if LifeCycle cannot be foundLogbookAlreadyExistsException
- if LifeCycle already existsvoid commitUnit(String idOperation, String idLc) throws LogbookDatabaseException, LogbookNotFoundException, LogbookAlreadyExistsException
idOperation
- the operation identifieridLc
- the lifecycle identifierLogbookDatabaseException
- if errors occur while connecting or writing to the databaseLogbookNotFoundException
- if LifeCycle cannot be foundLogbookAlreadyExistsException
- if LifeCycle already existsvoid commitObjectGroup(String idOperation, String idLc) throws LogbookDatabaseException, LogbookNotFoundException, LogbookAlreadyExistsException
idOperation
- the operation identifieridLc
- the lifecycle identifierLogbookDatabaseException
- if errors occur while connecting or writing to the databaseLogbookNotFoundException
- if LifeCycle cannot be foundLogbookAlreadyExistsException
- if LifeCycle already existsvoid rollBackUnitsByOperation(String idOperation) throws LogbookNotFoundException, LogbookDatabaseException
idOperation
- the operation idLogbookDatabaseException
- if errors occur while connecting or writing to the databaseLogbookNotFoundException
- if LifeCycle cannot be foundvoid rollBackObjectGroupsByOperation(String idOperation) throws LogbookNotFoundException, LogbookDatabaseException
idOperation
- the operation idLogbookDatabaseException
- if errors occur while connecting or writing to the databaseLogbookNotFoundException
- if LifeCycle cannot be foundLifeCycleStatusCode getUnitLifeCycleStatus(String unitId) throws LogbookDatabaseException, LogbookNotFoundException
unitId
- the unit IdLogbookDatabaseException
- if errors occur while connecting or writing to the databaseLogbookNotFoundException
- if LifeCycle cannot be foundLifeCycleStatusCode getObjectGroupLifeCycleStatus(String objectGroupId) throws LogbookDatabaseException, LogbookNotFoundException
objectGroupId
- the objectGroup IdLogbookDatabaseException
- if errors occur while connecting or writing to the databaseLogbookNotFoundException
- if LifeCycle cannot be foundvoid bulk(LogbookCollections collections, String idOp, List<? extends LogbookLifeCycleModel> logbookLifeCycleModels) throws DatabaseException
collections
- the logbook collectionsidOp
- operation identifierlogbookLifeCycleModels
- lifecycles to be createdDatabaseException
- if database could not be reachedCopyright © 2018 Vitam. All rights reserved.