Class InternalAssetProperties.StorageProvider.Filesystem

java.lang.Object
com.broadleafcommerce.asset.autoconfigure.InternalAssetProperties.StorageProvider.Filesystem
Enclosing class:
InternalAssetProperties.StorageProvider

public static class InternalAssetProperties.StorageProvider.Filesystem extends Object

Properties related to the using the filesystem as the Asset digital content storage provider. This is the default storage provider.

If the filesystem is not being used as the storage provider, then these properties are ignored

  • Constructor Details

    • Filesystem

      public Filesystem()
  • Method Details

    • setFilesystemBaseDirectory

      public void setFilesystemBaseDirectory(String filesystemBaseDirectory)
    • setMaxGeneratedDirectoryDepth

      public void setMaxGeneratedDirectoryDepth(int maxGeneratedDirectoryDepth)

      Sets the maximum generated directory depth on the filesystem based on the MD5 hash of the filename. Note: values greater than 3 are not supported.

      Parameters:
      maxGeneratedDirectoryDepth - the maximum directory depth that should exist on the filesystem
      Throws:
      IllegalArgumentException - if a value greater than 3 is supplied
      See Also:
      • maxGeneratedDirectoryDepth
    • getFilesystemBaseDirectory

      @NonNull public String getFilesystemBaseDirectory()
      The base path where file system resources will be stored. Should begin but not end with a forward slash ("/"). If not set, the system will use "System.getProperty("java.io.tmpdir")".
    • getMaxGeneratedDirectoryDepth

      public int getMaxGeneratedDirectoryDepth()
      URLs for images and other content will be stored efficiently on the filesystem using a set of generated directories based on the MD5 hash of the filename. "maxGeneratedDirectoryDepth" will be used to determine the number of directories created.

      Assuming a conservative limit of about 200 files per directory:

      • a value of "2" supports a distribution of about 13 million files and is suitable for most purposes
      • a value of "3" would add support for over 3 billion files. However, for implementations of this size, distributed file system options should be used instead.
      Note: values greater than 3 are not supported.
    • toString

      public String toString()
      Overrides:
      toString in class Object