Class HierarchicalPathHasher

  • All Implemented Interfaces:
    PathHasher
    Direct Known Subclasses:
    NumericPathHasher, StoredPathHasher

    public abstract class HierarchicalPathHasher
    extends java.lang.Object
    implements PathHasher
    Creates and looks up hashes of '/' paths defining strings.
    Paths are hashed using HashStore defined hashes.
    Store defined hashes are matched for the longest possible sub-path of a given path. The remaining path is encoded using a Base64 encoder. The two resulted strings.
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      org.alfresco.util.Pair<java.lang.String,​java.lang.String> hash​(java.lang.String path)  
      protected abstract java.lang.String hashSubpath​(java.lang.String subpath)  
      java.lang.String lookup​(org.alfresco.util.Pair<java.lang.String,​java.lang.String> hash)  
      protected abstract java.lang.String lookupSubpathHash​(java.lang.String hash)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • HierarchicalPathHasher

        public HierarchicalPathHasher()
    • Method Detail

      • hashSubpath

        protected abstract java.lang.String hashSubpath​(java.lang.String subpath)
      • lookupSubpathHash

        protected abstract java.lang.String lookupSubpathHash​(java.lang.String hash)
      • hash

        public org.alfresco.util.Pair<java.lang.String,​java.lang.String> hash​(java.lang.String path)
        Specified by:
        hash in interface PathHasher
      • lookup

        public java.lang.String lookup​(org.alfresco.util.Pair<java.lang.String,​java.lang.String> hash)
        Specified by:
        lookup in interface PathHasher