Class StorageUtils


  • public class StorageUtils
    extends java.lang.Object
    Utility class for attachment operations.
    • Constructor Summary

      Constructors 
      Constructor Description
      StorageUtils()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static StorageFieldValue createStorageFileDomain​(java.lang.String fileName, java.lang.String mimeType, java.io.InputStream inputStream)
      Creates a StorageFieldValue object representing a file in the system.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • StorageUtils

        public StorageUtils()
    • Method Detail

      • createStorageFileDomain

        public static StorageFieldValue createStorageFileDomain​(java.lang.String fileName,
                                                                java.lang.String mimeType,
                                                                java.io.InputStream inputStream)
        Creates a StorageFieldValue object representing a file in the system. The actual storage location of the file depends on the DynamicConfig setting with key "attachment.storageEngine". It can be either stored in an S3-compatible storage or in the local file system.
        Parameters:
        fileName - The name of the file to be stored
        mimeType - The MIME type of the file
        inputStream - An InputStream containing the file data
        Returns:
        A StorageFieldValue object representing the stored file
        Throws:
        java.lang.IllegalStateException - if the method is called without proper platform implementation