Class DefaultMediaLocationHashService

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String createHash​(java.lang.String folderQualifier, java.lang.String location, long size, java.lang.String mime)
      Creates new hash for location, folderQualifier, size and mime.
      java.lang.String createHashForLocation​(java.lang.String folderQualifier, java.lang.String location)
      Creates new hash for location and folderQualifier.
      void setSalt​(java.lang.String salt)  
      MediaLocationHashService.HashType verifyHash​(java.lang.String hash, java.lang.String folderQualifier, java.lang.String location, long size, java.lang.String mime)
      Verifies hash against provided parameters (folderQualifier, location, size, mime).
      void verifyHashForLocation​(java.lang.String hash, java.lang.String folderQualifier, java.lang.String location)
      Verifies hash against provided folderQualifier and Media location.
      • Methods inherited from class java.lang.Object

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

      • DefaultMediaLocationHashService

        public DefaultMediaLocationHashService()
    • Method Detail

      • verifyHashForLocation

        public void verifyHashForLocation​(java.lang.String hash,
                                          java.lang.String folderQualifier,
                                          java.lang.String location)
        Description copied from interface: MediaLocationHashService
        Verifies hash against provided folderQualifier and Media location.
        Specified by:
        verifyHashForLocation in interface MediaLocationHashService
        Parameters:
        hash - hash to verify (possibly used in request)
        folderQualifier - the folder qualifier
        location - the location
      • createHashForLocation

        public java.lang.String createHashForLocation​(java.lang.String folderQualifier,
                                                      java.lang.String location)
        Description copied from interface: MediaLocationHashService
        Creates new hash for location and folderQualifier.
        Specified by:
        createHashForLocation in interface MediaLocationHashService
        Parameters:
        folderQualifier - the folder qualifier
        location - the Media location
        Returns:
        created hash string
      • createHash

        public java.lang.String createHash​(java.lang.String folderQualifier,
                                           java.lang.String location,
                                           long size,
                                           java.lang.String mime)
        Description copied from interface: MediaLocationHashService
        Creates new hash for location, folderQualifier, size and mime.
        Specified by:
        createHash in interface MediaLocationHashService
        Parameters:
        folderQualifier - the folder qualifier
        location - the Media location
        size - the size of media
        mime - the mime type of media
        Returns:
        created hash string
      • setSalt

        public void setSalt​(java.lang.String salt)