Package org.saidone.service.notarization
Interface NotarizationService
- All Known Implementing Classes:
AbstractNotarizationService,EthereumService
public interface NotarizationService
Contract for components able to notarize documents.
Implementations are responsible for persisting hashes of a node's
content to an external store (for example a blockchain) and for
retrieving them afterwards. AbstractNotarizationService provides
a base implementation of the common logic.
-
Method Summary
Modifier and TypeMethodDescriptionvoidcheckNotarization(String nodeId) Verifies that the stored hash for the given node matches the hash of its current content.voidnotarizeNode(String nodeId) Computes and stores the hash for the given node.
-
Method Details
-
notarizeNode
Computes and stores the hash for the given node.- Parameters:
nodeId- the node whose content should be notarized
-
checkNotarization
Verifies that the stored hash for the given node matches the hash of its current content.- Parameters:
nodeId- the node whose notarization should be validated- Throws:
NotarizationException- if the node is not notarized or hashes do not match
-