Class DefaultMediaLocationHashService
- java.lang.Object
-
- de.hybris.platform.media.services.impl.DefaultMediaLocationHashService
-
- All Implemented Interfaces:
MediaLocationHashService
public class DefaultMediaLocationHashService extends java.lang.Object implements MediaLocationHashService
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface de.hybris.platform.media.services.MediaLocationHashService
MediaLocationHashService.HashType
-
-
Constructor Summary
Constructors Constructor Description DefaultMediaLocationHashService()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringcreateHash(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.StringcreateHashForLocation(java.lang.String folderQualifier, java.lang.String location)Creates new hash for location and folderQualifier.voidsetSalt(java.lang.String salt)MediaLocationHashService.HashTypeverifyHash(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).voidverifyHashForLocation(java.lang.String hash, java.lang.String folderQualifier, java.lang.String location)Verifies hash against providedfolderQualifierand Medialocation.
-
-
-
Method Detail
-
verifyHashForLocation
public void verifyHashForLocation(java.lang.String hash, java.lang.String folderQualifier, java.lang.String location)Description copied from interface:MediaLocationHashServiceVerifies hash against providedfolderQualifierand Medialocation.- Specified by:
verifyHashForLocationin interfaceMediaLocationHashService- Parameters:
hash- hash to verify (possibly used in request)folderQualifier- the folder qualifierlocation- the location
-
verifyHash
public MediaLocationHashService.HashType verifyHash(java.lang.String hash, java.lang.String folderQualifier, java.lang.String location, long size, java.lang.String mime)
Description copied from interface:MediaLocationHashServiceVerifies hash against provided parameters (folderQualifier,location,size,mime).- Specified by:
verifyHashin interfaceMediaLocationHashService- Parameters:
hash- hash to verify (possibly used in request)folderQualifier- the folder qualifierlocation- the locationsize- the size of mediamime- the mime type of media- Returns:
- the enum value indicating the type of hash that has been provided:
MediaLocationHashService.HashType.LOCATION_MIME_SIZE- the hash based on all passed parametersMediaLocationHashService.HashType.LOCATION- the hash based on onlylocationandfolderQualifier
-
createHashForLocation
public java.lang.String createHashForLocation(java.lang.String folderQualifier, java.lang.String location)Description copied from interface:MediaLocationHashServiceCreates new hash for location and folderQualifier.- Specified by:
createHashForLocationin interfaceMediaLocationHashService- Parameters:
folderQualifier- the folder qualifierlocation- 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:MediaLocationHashServiceCreates new hash for location, folderQualifier, size and mime.- Specified by:
createHashin interfaceMediaLocationHashService- Parameters:
folderQualifier- the folder qualifierlocation- the Media locationsize- the size of mediamime- the mime type of media- Returns:
- created hash string
-
setSalt
public void setSalt(java.lang.String salt)
-
-