Class S3ConfigFactory

    • Field Detail

      • S3_BUCKET_NAME_PROPERTY_NAME

        public static final String S3_BUCKET_NAME_PROPERTY_NAME
        Property storing S3 bucket name. The env variable is: CONFLUENCE_FILESTORE_ATTACHMENTS_S3_BUCKET_NAME
        See Also:
        Constant Field Values
      • S3_BUCKET_REGION_PROPERTY_NAME

        public static final String S3_BUCKET_REGION_PROPERTY_NAME
        Property storing S3 bucket region. The env variable is: CONFLUENCE_FILESTORE_ATTACHMENTS_S3_BUCKET_REGION
        See Also:
        Constant Field Values
      • S3_ENDPOINT_OVERRIDE

        public static final String S3_ENDPOINT_OVERRIDE
        Property storing S3 bucket region. The env variable is: CONFLUENCE_FILESTORE_ATTACHMENTS_S3_ENDPOINT_OVERRIDE
        See Also:
        Constant Field Values
    • Constructor Detail

      • S3ConfigFactory

        public S3ConfigFactory()
    • Method Detail

      • getInstance

        public static Optional<com.atlassian.dc.filestore.impl.s3.S3Config> getInstance​(com.atlassian.config.ApplicationConfiguration appConfig)
        Produces instance of S3Config based on the defined properties.
        Parameters:
        appConfig - application configuration
        Returns:
        new instance of S3 Config
      • getConfigProperty

        @Nullable
        public static String getConfigProperty​(com.atlassian.config.ApplicationConfiguration appConfig,
                                               String propertyName)
        Loads property from different sources in this order (lower, overrides higher) 1. application config 2. environmental variable 3. system property
        Parameters:
        appConfig - application config
        propertyName - property name to load
        Returns:
        value of the property if defined, null otherwise