Class InternalAssetProperties.StorageProvider.GoogleCloudStorage
java.lang.Object
com.broadleafcommerce.asset.autoconfigure.InternalAssetProperties.StorageProvider.GoogleCloudStorage
- Enclosing class:
- InternalAssetProperties.StorageProvider
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionThe bucket name.intURLs 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.Optional path in the bucket where assets will be uploaded.The project ID.voidsetBucketName(String bucketName) The bucket name.voidsetMaxGeneratedDirectoryDepth(int maxGeneratedDirectoryDepth) Sets the maximum generated directory depth on the filesystem based on the MD5 hash of the filename.voidsetPathPrefixInBucket(String pathPrefixInBucket) Optional path in the bucket where assets will be uploaded.voidsetProjectId(String projectId) The project ID.toString()
-
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
The bucket name. -
getProjectId
The project ID.- See Also:
-
ServiceOptions.Builder.setProjectId(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.
-
setBucketName
The bucket name. -
setProjectId
The project ID.- See Also:
-
ServiceOptions.Builder.setProjectId(String)
-
setPathPrefixInBucket
Optional path in the bucket where assets will be uploaded. If not specified will be defaulted to "blc_assets" -
toString
-