Class VerifyMerkleTreeActionHandler
java.lang.Object
fr.gouv.vitam.worker.core.handler.ActionHandler
fr.gouv.vitam.worker.core.plugin.traceability.VerifyMerkleTreeActionHandler
- All Implemented Interfaces:
VitamAutoCloseable,WorkerAction,AutoCloseable
Using Merkle trees to detect inconsistencies in data
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcheckMandatoryIOParameter(HandlerIO handler) Check mandatory parameterstatic MerkleTreeAlgocomputeMerkleTree(InputStream inputStream, DigestType digestType) Compute merkle treeexecute(WorkerParameters params, HandlerIO handler) Execute an actionstatic StringgetId()Methods inherited from class fr.gouv.vitam.worker.core.handler.ActionHandler
checkMandatoryParameters, close, updateDetailItemStatusMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface fr.gouv.vitam.worker.core.api.WorkerAction
executeList
-
Constructor Details
-
VerifyMerkleTreeActionHandler
public VerifyMerkleTreeActionHandler()
-
-
Method Details
-
getId
- Returns:
- HANDLER_ID
-
execute
Description copied from interface:WorkerActionExecute an action- Parameters:
params-WorkerParametershandler- the handlerIo- Returns:
- CompositeItemStatus:response contains a list of functional message and status code
- Throws:
ProcessingException- if an error is encountered when executing the action
-
computeMerkleTree
public static MerkleTreeAlgo computeMerkleTree(InputStream inputStream, DigestType digestType) throws ProcessingException Compute merkle tree- Parameters:
inputStream-digestType-- Returns:
- the computed Merkle tree
- Throws:
ProcessingException
-
checkMandatoryIOParameter
Description copied from interface:WorkerActionCheck mandatory parameter- Parameters:
handler- input output list- Throws:
ProcessingException- when handler io is not complete
-