Class InternalAssetProperties.StorageProvider.GoogleCloudStorage

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

public static class InternalAssetProperties.StorageProvider.GoogleCloudStorage extends Object
  • Constructor Details

    • GoogleCloudStorage

      public GoogleCloudStorage()
  • Method Details

    • 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
    • getBucketName

      public String getBucketName()
      The bucket name.
    • getProjectId

      public String getProjectId()
      The project ID.
      See Also:
      • ServiceOptions.Builder.setProjectId(String)
    • getPathPrefixInBucket

      public String getPathPrefixInBucket()
      Optional path in the bucket where assets will be uploaded. If not specified will be defaulted to "blc_assets"
    • 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.
    • setBucketName

      public void setBucketName(String bucketName)
      The bucket name.
    • setProjectId

      public void setProjectId(String projectId)
      The project ID.
      See Also:
      • ServiceOptions.Builder.setProjectId(String)
    • setPathPrefixInBucket

      public void setPathPrefixInBucket(String pathPrefixInBucket)
      Optional path in the bucket where assets will be uploaded. If not specified will be defaulted to "blc_assets"
    • toString

      public String toString()
      Overrides:
      toString in class Object