Interface MediaLocationHashService
- All Known Implementing Classes:
DefaultMediaLocationHashService
public interface MediaLocationHashService
This interface allows to generate hashes for folders and locations of media as well to verify them.
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptiondefault StringcreateHash(String folderQualifier, String location, long size, String mime) Creates new hash for location, folderQualifier, size and mime.createHashForLocation(String folderQualifier, String location) Deprecated, for removal: This API element is subject to removal in a future version.verifyHash(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) Deprecated, for removal: This API element is subject to removal in a future version.since 2011, useverifyHash(String, String, String, long, String)
-
Method Details
-
verifyHashForLocation
@Deprecated(since="2011", forRemoval=true) void verifyHashForLocation(String hash, String folderQualifier, String location) Deprecated, for removal: This API element is subject to removal in a future version.since 2011, useverifyHash(String, String, String, long, String)Verifies hash against providedfolderQualifierand Medialocation.- Parameters:
hash- hash to verify (possibly used in request)folderQualifier- the folder qualifierlocation- the location
-
verifyHash
default MediaLocationHashService.HashType verifyHash(String hash, String folderQualifier, String location, long size, String mime) Verifies hash against provided parameters (folderQualifier,location,size,mime).- 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
- Throws:
MediaInvalidLocationException- on invalid hash
-
createHashForLocation
@Deprecated(since="2011", forRemoval=true) String createHashForLocation(String folderQualifier, String location) Deprecated, for removal: This API element is subject to removal in a future version.since 2011, usecreateHash(String, String, long, String)insteadCreates new hash for location and folderQualifier.- Parameters:
folderQualifier- the folder qualifierlocation- the Media location- Returns:
- created hash string
-
createHash
Creates new hash for location, folderQualifier, size and mime.- Parameters:
folderQualifier- the folder qualifierlocation- the Media locationsize- the size of mediamime- the mime type of media- Returns:
- created hash string
-
createHash(String, String, long, String)instead