Package org.nuxeo.ecm.core.blob
Class PathStrategyShortened
java.lang.Object
org.nuxeo.ecm.core.blob.PathStrategy
org.nuxeo.ecm.core.blob.PathStrategyShortened
Extends the default
PathStrategy.safePath(String) method to ensure resulting path and file name is not too
long.- Since:
- 2021.14
-
Field Summary
Fields inherited from class org.nuxeo.ecm.core.blob.PathStrategy
dir, HEX, SAFE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetPathForKey(String key) Gets the storage path for a given key.protected StringConverts a key to a safe path.protected StringsafePathInverse(String path) Inverse ofPathStrategy.safePath(java.lang.String).Methods inherited from class org.nuxeo.ecm.core.blob.PathStrategy
atomicCopy, atomicMove, createTempFile, getKeyForPath, isTempFile
-
Constructor Details
-
PathStrategyShortened
-
-
Method Details
-
safePath
Description copied from class:PathStrategyConverts a key to a safe path.Different keys always map to different safe paths (no collision).
- Overrides:
safePathin classPathStrategy- Parameters:
key- the key- Returns:
- the safe path
-
safePathInverse
Description copied from class:PathStrategyInverse ofPathStrategy.safePath(java.lang.String).- Overrides:
safePathInversein classPathStrategy- Parameters:
path- the safe path- Returns:
- the key, or
nullif the safe path is invalid
-
getPathForKey
Description copied from class:PathStrategyGets the storage path for a given key.- Specified by:
getPathForKeyin classPathStrategy- Parameters:
key- the key- Returns:
- the file for this key
-