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 Detail

      • 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 session
        path - the root path to generate checksums for
        Returns:
        the map of abs path ~> checksums
        Throws:
        javax.jcr.RepositoryException
        IOException
      • 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 the ChecksumGeneratorOptions. Generates map of checksum hashes in the format [ ABSOLUTE PATH ] : [ CHECKSUM OF NODE SYSTEM ]
        Parameters:
        session - the session
        path - the root path to generate checksums for
        options - the ChecksumGeneratorOptions that define the checksum generation
        Returns:
        the map of abs path ~> checksums
        Throws:
        javax.jcr.RepositoryException
        IOException