Package org.opencms.db.storage
Class CmsStorageManager.StorageResult
java.lang.Object
org.opencms.db.storage.CmsStorageManager.StorageResult
- Enclosing class:
CmsStorageManager
Container for storage evaluation results, used by VFS drivers to determine
which database columns to update.
Note: This result follows a "mutual exclusivity" principle:
- If the content is stored locally,
getFileContent()contains the data, whilegetHash()andgetStorage()arenull. - If the content is offloaded,
getFileContent()is empty (zero-length array), whilegetHash()andgetStorage()contain the reference details.
-
Constructor Summary
ConstructorsConstructorDescriptionStorageResult(byte[] fileContent) Constructor for local storage.StorageResult(String storage, String hash) Constructor for external storage. -
Method Summary
Modifier and TypeMethodDescriptionbyte[]Returns the content for the local FILE_CONTENT column.getHash()Returns the hash for the HASH column.Returns the stable storage identifier for the STORAGE column.
-
Constructor Details
-
StorageResult
Constructor for local storage.- Parameters:
fileContent- the raw bytes to be stored in the content table
-
StorageResult
Constructor for external storage.- Parameters:
storage- the stable storage identifier stored in the STORAGE columnhash- the SHA-512 content hash stored in the HASH column
-
-
Method Details
-
getFileContent
Returns the content for the local FILE_CONTENT column.- Returns:
- the bytes
-
getHash
Returns the hash for the HASH column.- Returns:
- the hash string
-
getStorage
Returns the stable storage identifier for the STORAGE column.- Returns:
- the storage identifier
-