Class CmsStorageManager.StorageResult

java.lang.Object
org.opencms.db.storage.CmsStorageManager.StorageResult
Enclosing class:
CmsStorageManager

public static class CmsStorageManager.StorageResult extends Object
Container for storage evaluation results, used by VFS drivers to determine which database columns to update.

Note: This result follows a "mutual exclusivity" principle:

  • Constructor Details

    • StorageResult

      public StorageResult(byte[] fileContent)
      Constructor for local storage.

      Parameters:
      fileContent - the raw bytes to be stored in the content table
    • StorageResult

      public StorageResult(String storage, String hash)
      Constructor for external storage.

      Parameters:
      storage - the stable storage identifier stored in the STORAGE column
      hash - the SHA-512 content hash stored in the HASH column
  • Method Details

    • getFileContent

      public byte[] getFileContent()
      Returns the content for the local FILE_CONTENT column.

      Returns:
      the bytes
    • getHash

      public String getHash()
      Returns the hash for the HASH column.

      Returns:
      the hash string
    • getStorage

      public String getStorage()
      Returns the stable storage identifier for the STORAGE column.

      Returns:
      the storage identifier