Class DefaultMediaLocationHashService
java.lang.Object
de.hybris.platform.media.services.impl.DefaultMediaLocationHashService
- All Implemented Interfaces:
MediaLocationHashService
-
Nested Class Summary
Nested classes/interfaces inherited from interface de.hybris.platform.media.services.MediaLocationHashService
MediaLocationHashService.HashType -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreateHash(String folderQualifier, String location, long size, String mime) Creates new hash for location, folderQualifier, size and mime.createHashForLocation(String folderQualifier, String location) Creates new hash for location and folderQualifier.getSalt()voidverifyHash(String hash, String folderQualifier, String location, long size, String mime) Verifies hash against provided parameters (folderQualifier,location,size,mime).voidverifyHashForLocation(String hash, String folderQualifier, String location) Verifies hash against providedfolderQualifierand Medialocation.
-
Constructor Details
-
DefaultMediaLocationHashService
public DefaultMediaLocationHashService()
-
-
Method Details
-
verifyHashForLocation
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(String hash, String folderQualifier, String location, long size, 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
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
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
-
getSalt
-