Interface ChecksumGenerator
@ProviderType
public interface ChecksumGenerator
Utility that generates checksums for JCR paths. The checksum is calculated using a depth first traversal
and calculates an aggregate checksum on the nodes with the specified node types
(via
ChecksumGeneratorOptions).-
Method Summary
Modifier and TypeMethodDescriptiongenerateChecksums(javax.jcr.Session session, String path) Convenience method for generateChecksums(session, path, new DefaultChecksumGeneratorOptions()).generateChecksums(javax.jcr.Session session, String path, ChecksumGeneratorOptions options) Traverses the content tree whose root is defined by the path param, respecting theChecksumGeneratorOptions.
-
Method Details
-
generateChecksums
Map<String,String> generateChecksums(javax.jcr.Session session, String path) throws javax.jcr.RepositoryException, IOException Convenience method for generateChecksums(session, path, new DefaultChecksumGeneratorOptions()).- Parameters:
session- the sessionpath- the root path to generate checksums for- Returns:
- the map of abs path ~> checksums
- Throws:
javax.jcr.RepositoryExceptionIOException
-
generateChecksums
Map<String,String> generateChecksums(javax.jcr.Session session, String path, ChecksumGeneratorOptions options) throws javax.jcr.RepositoryException, IOException Traverses the content tree whose root is defined by the path param, respecting theChecksumGeneratorOptions. Generates map of checksum hashes in the format [ ABSOLUTE PATH ] : [ CHECKSUM OF NODE SYSTEM ]- Parameters:
session- the sessionpath- the root path to generate checksums foroptions- theChecksumGeneratorOptionsthat define the checksum generation- Returns:
- the map of abs path ~> checksums
- Throws:
javax.jcr.RepositoryExceptionIOException
-