public interface LogbookOperations
Modifier and Type | Method and Description |
---|---|
void |
create(LogbookOperationParameters parameters)
Create and insert logbook operation entries
|
void |
createBulkLogbookOperation(LogbookOperationParameters[] operationArray)
Create one Logbook Operation with already multiple sub-events
|
LogbookOperation |
findFirstTraceabilityOperationOKAfterDate(LocalDateTime date)
Find One logbook TraceabilityOperation after a given date
|
LogbookOperation |
findLastTraceabilityOperationOK()
Find last successful traceability operation
|
LogbookOperation |
getById(String IdProcess)
Select logbook operation by the operation's ID
|
IndexationResult |
reindex(IndexParameters indexParameters)
Reindex one or more collections
|
List<LogbookOperation> |
select(com.fasterxml.jackson.databind.JsonNode select)
Select logbook operation entries
|
List<LogbookOperation> |
select(com.fasterxml.jackson.databind.JsonNode select,
boolean sliced)
Select logbook operation entries
|
com.mongodb.client.MongoCursor<LogbookOperation> |
selectOperationsPersistedAfterDate(LocalDateTime date)
Select all logbook operations entries after a given date
|
void |
switchIndex(String alias,
String newIndexName)
Switch indexes for one or more collections
|
void |
update(LogbookOperationParameters parameters)
Update and insert logbook operation entries
|
void |
updateBulkLogbookOperation(LogbookOperationParameters[] operationArray)
Update one Logbook Operation with multiple sub-events
It adds this new entry within the very same Logbook Operaton entry in "events" array. |
void create(LogbookOperationParameters parameters) throws LogbookAlreadyExistsException, LogbookDatabaseException
parameters
- the entry parametersLogbookAlreadyExistsException
- if an operation with the same
eventIdentifierProcess and outcome="Started" already existsLogbookDatabaseException
- if errors occur while connecting
or writing to the databasevoid update(LogbookOperationParameters parameters) throws LogbookNotFoundException, LogbookDatabaseException
parameters
- the entry parametersLogbookNotFoundException
- if no operation with the same
eventIdentifierProcess existsLogbookDatabaseException
- if errors occur while connecting
or writing to the databaseList<LogbookOperation> select(com.fasterxml.jackson.databind.JsonNode select) throws LogbookDatabaseException, LogbookNotFoundException, InvalidParseOperationException, VitamDBException
select
- the select request in format of JsonNodeLogbookNotFoundException
- if no operation selected cannot be foundLogbookDatabaseException
- if errors occur while connecting or writing to the databaseInvalidParseOperationException
- if invalid parse for selecting the operationVitamDBException
- in case a desynchro is recorded between Mongo and ESList<LogbookOperation> select(com.fasterxml.jackson.databind.JsonNode select, boolean sliced) throws LogbookDatabaseException, LogbookNotFoundException, InvalidParseOperationException, VitamDBException
select
- the select request in format of JsonNodesliced
- the boolean sliced to filter events or notLogbookNotFoundException
- if no operation selected cannot be foundLogbookDatabaseException
- if errors occur while connecting or writing to the databaseInvalidParseOperationException
- if invalid parse for selecting the operationVitamDBException
- in case a desynchro is recorded between Mongo and ESLogbookOperation getById(String IdProcess) throws LogbookDatabaseException, LogbookNotFoundException
IdProcess
- the operation identifierLogbookDatabaseException
- if errors occur while connecting or writing to the databaseLogbookNotFoundException
- if no operation selected cannot be foundvoid createBulkLogbookOperation(LogbookOperationParameters[] operationArray) throws LogbookDatabaseException, LogbookAlreadyExistsException
operationArray
- 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 logbook already existsvoid updateBulkLogbookOperation(LogbookOperationParameters[] operationArray) throws LogbookDatabaseException, LogbookNotFoundException
operationArray
- containing all operations Logbook in orderIllegalArgumentException
- if parameter has null or empty mandatory valuesLogbookDatabaseException
- if errors occur while connecting or writing to the databaseLogbookNotFoundException
- if no operation selected cannot be foundcom.mongodb.client.MongoCursor<LogbookOperation> selectOperationsPersistedAfterDate(LocalDateTime date) throws LogbookDatabaseException, LogbookNotFoundException, InvalidParseOperationException, InvalidCreateOperationException
date
- the select request in format of JsonNodeLogbookNotFoundException
- if no operation selected cannot be foundLogbookDatabaseException
- if errors occur while connecting or writing to the databaseInvalidParseOperationException
- if invalid parse for selecting the operationInvalidCreateOperationException
- if the query could not be createdLogbookOperation findFirstTraceabilityOperationOKAfterDate(LocalDateTime date) throws InvalidCreateOperationException, LogbookNotFoundException, LogbookDatabaseException
date
- the select request in format of JsonNodeLogbookNotFoundException
- if no operation selected cannot be foundLogbookDatabaseException
- if errors occur while connecting or writing to the databaseInvalidParseOperationException
- if invalid parse for selecting the operationInvalidCreateOperationException
- if the query could not be createdLogbookOperation findLastTraceabilityOperationOK() throws InvalidCreateOperationException, LogbookNotFoundException, LogbookDatabaseException, InvalidParseOperationException
InvalidCreateOperationException
- if the query could not be createdLogbookNotFoundException
- if no operation selected cannot be foundLogbookDatabaseException
- if errors occur while connecting or writing to the databaseInvalidParseOperationException
- if the query could not be createdIndexationResult reindex(IndexParameters indexParameters)
indexParameters
- the parameters specifying what to reindexvoid switchIndex(String alias, String newIndexName) throws DatabaseException
alias
- the alias namenewIndexName
- the new index to be pointed onDatabaseException
- in case error with database occursCopyright © 2018 Vitam. All rights reserved.