Class LogbookUnitLifeCycleTraceabilityHelper
- java.lang.Object
-
- fr.gouv.vitam.worker.core.plugin.lfc_traceability.LogbookLifeCycleTraceabilityHelper
-
- fr.gouv.vitam.worker.core.plugin.lfc_traceability.LogbookUnitLifeCycleTraceabilityHelper
-
- All Implemented Interfaces:
LogbookTraceabilityHelper
public class LogbookUnitLifeCycleTraceabilityHelper extends LogbookLifeCycleTraceabilityHelper
-
-
Field Summary
-
Fields inherited from interface fr.gouv.vitam.logbook.common.traceability.LogbookTraceabilityHelper
INITIAL_START_DATE
-
-
Constructor Summary
Constructors Constructor Description LogbookUnitLifeCycleTraceabilityHelper(HandlerIO handlerIO, LogbookOperationsClient logbookOperationsClient, ItemStatus itemStatus, java.lang.String operationID, WorkspaceClientFactory workspaceClientFactory, CloseableIterator<com.fasterxml.jackson.databind.JsonNode> traceabilityDataIterator, java.lang.String traceabilityEventFileName, java.lang.String traceabilityZipFileName)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected Select
generateSelectLogbookOperation(java.time.LocalDateTime date)
TraceabilityType
getTraceabilityType()
java.lang.String
getZipName()
void
saveDataInZip(MerkleTreeAlgo algo, TraceabilityFile file)
Search for entries to secure with the traceability process and store data in the given Traceability zip file.
Also, Merkle Algorithm should be updated by adding each wanted entry as a leaf of the tree.-
Methods inherited from class fr.gouv.vitam.worker.core.plugin.lfc_traceability.LogbookLifeCycleTraceabilityHelper
createLogbookOperationEvent, extractAppendToFinalFile, getDataSize, getMaxEntriesReached, getPreviousMonthStartDate, getPreviousMonthTimestampToken, getPreviousStartDate, getPreviousTimestampToken, getPreviousYearStartDate, getPreviousYearTimestampToken, getStepName, getTimestampStepName, getTraceabilityEndDate, getTraceabilityStartDate, getTraceabilityStatistics, saveEmpty, startTraceability, storeAndDeleteZip
-
-
-
-
Constructor Detail
-
LogbookUnitLifeCycleTraceabilityHelper
public LogbookUnitLifeCycleTraceabilityHelper(HandlerIO handlerIO, LogbookOperationsClient logbookOperationsClient, ItemStatus itemStatus, java.lang.String operationID, WorkspaceClientFactory workspaceClientFactory, CloseableIterator<com.fasterxml.jackson.databind.JsonNode> traceabilityDataIterator, java.lang.String traceabilityEventFileName, java.lang.String traceabilityZipFileName)
- Parameters:
handlerIO
- Workflow Input/Output of the traceability eventlogbookOperationsClient
- used to search the operation to secureitemStatus
- used by workflow, event must be updated hereoperationID
- of the current traceability processtraceabilityDataIterator
-traceabilityEventFileName
-traceabilityZipFileName
-
-
-
Method Detail
-
saveDataInZip
public void saveDataInZip(MerkleTreeAlgo algo, TraceabilityFile file) throws java.io.IOException, TraceabilityException
Description copied from interface:LogbookTraceabilityHelper
Search for entries to secure with the traceability process and store data in the given Traceability zip file.
Also, Merkle Algorithm should be updated by adding each wanted entry as a leaf of the tree.- Parameters:
algo
- algorithm used to generate MerkleTree with data.file
- output zip to store data (in some TYPE_COLLECTION.json)- Throws:
java.io.IOException
- if any error occurs while writing in traceabilityFileTraceabilityException
- for any other errors specifically in the search / data transformation
-
getZipName
public java.lang.String getZipName()
- Returns:
- the name of the tmp zip file
-
getTraceabilityType
public TraceabilityType getTraceabilityType()
- Returns:
- the traceabilityType of the implementation class
-
generateSelectLogbookOperation
protected Select generateSelectLogbookOperation(java.time.LocalDateTime date) throws InvalidCreateOperationException
- Specified by:
generateSelectLogbookOperation
in classLogbookLifeCycleTraceabilityHelper
- Throws:
InvalidCreateOperationException
-
-