Class LogbookOperationsDecorator
java.lang.Object
fr.gouv.vitam.logbook.operations.core.LogbookOperationsDecorator
- All Implemented Interfaces:
LogbookOperations
- Direct Known Subclasses:
AlertLogbookOperationsDecorator
Decorator for LogbookOperations
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleancheckNewEligibleLogbookOperationsSinceLastTraceabilityOperation(LocalDateTime traceabilityStartDate, LocalDateTime traceabilityEndDate) voidcreate(String operationId, LogbookOperationParameters... parameters) Create and insert logbook operation entriesfindLastTraceabilityOperationOKBeforeDate(LocalDateTime date, String securisationVersion) Find One logbook TraceabilityOperation after a given date for a specific securisation versionreindex(IndexParameters indexParameters) Reindex one or more collectionsselectOperationsByLastPersistenceDateInterval(LocalDateTime startDate, LocalDateTime endDate, int softLimit) Select all logbook operations entries persisted within provided intervalswitchIndex(String alias, String newIndexName) Switch indexes for one or more collectionsvoidupdate(String operationId, LogbookOperationParameters... parameters) Update and insert logbook operation entriesMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface fr.gouv.vitam.logbook.operations.api.LogbookOperations
findLastLifecycleTraceabilityOperation, findLastOperationByType, findLastTraceabilityOperationOK, getById, selectOperations, selectOperations, selectOperationsAsRequestResponse
-
Field Details
-
logbookOperations
-
-
Constructor Details
-
LogbookOperationsDecorator
Constructor- Parameters:
logbookOperations-
-
-
Method Details
-
create
public void create(String operationId, LogbookOperationParameters... parameters) throws LogbookAlreadyExistsException, LogbookDatabaseException Description copied from interface:LogbookOperationsCreate and insert logbook operation entries- Specified by:
createin interfaceLogbookOperations- Parameters:
parameters- the entry parameters- Throws:
LogbookAlreadyExistsException- if an operation with the same eventIdentifierProcess and outcome="Started" already existsLogbookDatabaseException- if errors occur while connecting or writing to the database
-
update
public void update(String operationId, LogbookOperationParameters... parameters) throws LogbookNotFoundException, LogbookDatabaseException Description copied from interface:LogbookOperationsUpdate and insert logbook operation entries- Specified by:
updatein interfaceLogbookOperations- Parameters:
parameters- the entry parameters- Throws:
LogbookNotFoundException- if no operation with the same eventIdentifierProcess existsLogbookDatabaseException- if errors occur while connecting or writing to the database
-
getById
public LogbookOperation getById(String IdProcess) throws LogbookDatabaseException, LogbookNotFoundException - Specified by:
getByIdin interfaceLogbookOperations- Throws:
LogbookDatabaseExceptionLogbookNotFoundException
-
selectOperationsByLastPersistenceDateInterval
public CloseableIterator<LogbookOperation> selectOperationsByLastPersistenceDateInterval(LocalDateTime startDate, LocalDateTime endDate, int softLimit) throws LogbookDatabaseException, LogbookNotFoundException, InvalidParseOperationException, InvalidCreateOperationException Description copied from interface:LogbookOperationsSelect all logbook operations entries persisted within provided interval- Specified by:
selectOperationsByLastPersistenceDateIntervalin interfaceLogbookOperations- Parameters:
startDate- the start dateendDate- the end date- Returns:
- the Closeable MongoCursor of LogbookOperation
- Throws:
LogbookDatabaseException- if errors occur while connecting or writing to the databaseLogbookNotFoundException- if no operation selected cannot be foundInvalidParseOperationException- if invalid parse for selecting the operationInvalidCreateOperationException- if the query could not be created
-
findLastTraceabilityOperationOKBeforeDate
public LogbookOperation findLastTraceabilityOperationOKBeforeDate(LocalDateTime date, String securisationVersion) throws InvalidCreateOperationException, LogbookNotFoundException, LogbookDatabaseException, InvalidParseOperationException Description copied from interface:LogbookOperationsFind One logbook TraceabilityOperation after a given date for a specific securisation version- Specified by:
findLastTraceabilityOperationOKBeforeDatein interfaceLogbookOperations- Parameters:
date- the date after which to searchsecurisationVersion- the securisation version to filter by- Returns:
- the LogbookOperation
- Throws:
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 invalid parse for selecting the operation
-
reindex
Description copied from interface:LogbookOperationsReindex one or more collections- Specified by:
reindexin interfaceLogbookOperations- Parameters:
indexParameters- the parameters specifying what to reindex- Returns:
- the reindexation result as a IndexationResult Object
-
switchIndex
Description copied from interface:LogbookOperationsSwitch indexes for one or more collections- Specified by:
switchIndexin interfaceLogbookOperations- Parameters:
alias- the alias namenewIndexName- the new index to be pointed on- Returns:
- Throws:
DatabaseException- in case error with database occurs
-
checkNewEligibleLogbookOperationsSinceLastTraceabilityOperation
public boolean checkNewEligibleLogbookOperationsSinceLastTraceabilityOperation(LocalDateTime traceabilityStartDate, LocalDateTime traceabilityEndDate) throws LogbookDatabaseException - Specified by:
checkNewEligibleLogbookOperationsSinceLastTraceabilityOperationin interfaceLogbookOperations- Throws:
LogbookDatabaseException
-