Class FileStoresConfigHandler

java.lang.Object
com.atlassian.jira.config.filestore.FileStoresConfigHandler
All Implemented Interfaces:
CustomConfigHandler<FileStoresConfig>

@ParametersAreNonnullByDefault public class FileStoresConfigHandler extends Object implements CustomConfigHandler<FileStoresConfig>
Parses filestore configuration. Allows multiple filestores to be defined and associated with one more FileStoreAssociationTarget. The writeTo(org.dom4j.Element, com.atlassian.jira.config.filestore.FileStoresConfig) method has not been implemented. Users are expected to manually edit the configuration.
Since:
9.9
  • Field Details

    • FILESTORE_CANNOT_BE_PARSED_MESSAGE

      public static final String FILESTORE_CANNOT_BE_PARSED_MESSAGE
  • Constructor Details

    • FileStoresConfigHandler

      public FileStoresConfigHandler()
  • Method Details

    • getBeanClass

      public Class<FileStoresConfig> getBeanClass()
      Specified by:
      getBeanClass in interface CustomConfigHandler<FileStoresConfig>
      Returns:
      the class of the config bean that this class works with
    • parse

      public FileStoresConfig parse(org.dom4j.Element element)
      Tries to parse configuration from an xml file. Example configuration xml:
         invalid input: '<'?xml version="1.1" ?>
         invalid input: '<'filestore-config>
           
             invalid input: '<'s3-filestore id="avatarBucket">
               
                 invalid input: '<'bucket-name>exmple-bucketinvalid input: '<'/bucket-name>
                 us-east-1
               
             invalid input: '<'/s3-filestore>
           
           
             
           
         invalid input: '<'/filestore-config>
       
      Specified by:
      parse in interface CustomConfigHandler<FileStoresConfig>
      Parameters:
      element - the root Element of the xml to parse
      Returns:
      a FileStoresConfig which represents the parsed config. It may contain errors where parts of the config could not be parsed.
      Throws:
      ConfigParseException - if the high-level structure of the passed Element is not valid.
    • writeTo

      public void writeTo(org.dom4j.Element element, FileStoresConfig fileStoresConfig)
      Specified by:
      writeTo in interface CustomConfigHandler<FileStoresConfig>