Class FileSystemConfigBuilder

    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected FileSystemConfigBuilder()
      Construct builder with default prefix.
      protected FileSystemConfigBuilder​(java.lang.String component)
      Construct builder with specified component name.
    • Constructor Detail

      • FileSystemConfigBuilder

        protected FileSystemConfigBuilder​(java.lang.String component)
        Construct builder with specified component name.
        Parameters:
        component - component name to be used in prefix
        Since:
        2.0
    • Method Detail

      • setRootURI

        public void setRootURI​(FileSystemOptions opts,
                               java.lang.String rootURI)
        The root URI of the file system.
        Parameters:
        opts - the file system options to modify
        rootURI - The creator name to be associated with the file.
        Since:
        2.0
      • getRootURI

        public java.lang.String getRootURI​(FileSystemOptions opts)
        Return the root URI of the file system.
        Parameters:
        opts - file system options to work with
        Returns:
        The root URI
        Since:
        2.0
      • setParam

        protected void setParam​(FileSystemOptions opts,
                                java.lang.String name,
                                boolean value)
        Set named parameter.
        Parameters:
        opts - the file system options to modify
        name - set option with this name
        value - boolean value to set
        Since:
        2.1
      • setParam

        protected void setParam​(FileSystemOptions opts,
                                java.lang.String name,
                                java.lang.Object value)
        Set named parameter.
        Parameters:
        opts - the file system options to modify
        name - set option with this name
        value - object value to set
        Since:
        1.0
      • getParam

        protected java.lang.Object getParam​(FileSystemOptions opts,
                                            java.lang.String name)
        Get named parameter.
        Parameters:
        opts - file system options to work with
        name - get option with this name
        Returns:
        the named option or null
        Since:
        1.0
      • hasParam

        protected boolean hasParam​(FileSystemOptions opts,
                                   java.lang.String name)
        Check if option exists.
        Parameters:
        opts - file system options to work with
        name - the name to look up in opts
        Returns:
        true if opts have the named parameter
        Since:
        1.0
      • hasObject

        protected boolean hasObject​(FileSystemOptions opts,
                                    java.lang.String name)
        Is named setting specified.
        Parameters:
        opts - file system options to work with
        name - the option to check in opts or system properties
        Returns:
        true if option exists
        Since:
        2.0
      • getBoolean

        protected boolean getBoolean​(FileSystemOptions opts,
                                     java.lang.String name,
                                     boolean defaultValue)
        Get named option as boolean.
        Parameters:
        opts - file system options to work with
        name - the option name
        defaultValue - value to return if option is not present
        Returns:
        the option in opts or system properties, otherwise defaultValue
        Since:
        2.0
        See Also:
        getBoolean(FileSystemOptions, String, Boolean)
      • getBoolean

        protected java.lang.Boolean getBoolean​(FileSystemOptions opts,
                                               java.lang.String name,
                                               java.lang.Boolean defaultValue)
        Get named option as boolean.
        Parameters:
        opts - file system options to work with
        name - the option name
        defaultValue - value to return if option is not present
        Returns:
        the option in opts or system properties, otherwise defaultValue
        Since:
        2.0
        See Also:
        getBoolean(FileSystemOptions, String, Boolean)
      • getByte

        protected java.lang.Byte getByte​(FileSystemOptions opts,
                                         java.lang.String name)
        Get named option as byte.
        Parameters:
        opts - file system options to work with
        name - the option name
        Returns:
        the option in opts or system properties, otherwise null
        Since:
        2.0
        See Also:
        getByte(FileSystemOptions, String, Byte)
      • getByte

        protected byte getByte​(FileSystemOptions opts,
                               java.lang.String name,
                               byte defaultValue)
        Get named option as byte.
        Parameters:
        opts - file system options to work with
        name - the option name
        defaultValue - value to return if option is not present
        Returns:
        the option in opts or system properties, otherwise defaultValue
        Since:
        2.0
        See Also:
        getByte(FileSystemOptions, String, Byte)
      • getByte

        protected java.lang.Byte getByte​(FileSystemOptions opts,
                                         java.lang.String name,
                                         java.lang.Byte defaultValue)
        Get named option as byte.
        Parameters:
        opts - file system options to work with
        name - the option name
        defaultValue - value to return if option is not present
        Returns:
        the option in opts or system properties, otherwise defaultValue
        Since:
        2.0
      • getCharacter

        protected char getCharacter​(FileSystemOptions opts,
                                    java.lang.String name,
                                    char defaultValue)
        Get named option as character.
        Parameters:
        opts - file system options to work with
        name - the option name
        defaultValue - value to return if option is not present
        Returns:
        the option in opts or system properties, otherwise defaultValue
        Since:
        2.0
        See Also:
        getCharacter(FileSystemOptions, String, Character)
      • getCharacter

        protected java.lang.Character getCharacter​(FileSystemOptions opts,
                                                   java.lang.String name,
                                                   java.lang.Character defaultValue)
        Get named option as character.
        Parameters:
        opts - file system options to work with
        name - the option name
        defaultValue - value to return if option is not present
        Returns:
        the option in opts or system properties, otherwise defaultValue
        Since:
        2.0
      • getDouble

        protected double getDouble​(FileSystemOptions opts,
                                   java.lang.String name,
                                   double defaultValue)
        Get named option as double.
        Parameters:
        opts - file system options to work with
        name - the option name
        defaultValue - value to return if option is not present
        Returns:
        the option in opts or system properties, otherwise defaultValue
        Since:
        2.0
        See Also:
        getDouble(FileSystemOptions, String, Double)
      • getDouble

        protected java.lang.Double getDouble​(FileSystemOptions opts,
                                             java.lang.String name,
                                             java.lang.Double defaultValue)
        Get named option as double.
        Parameters:
        opts - file system options to work with
        name - the option name
        defaultValue - value to return if option is not present
        Returns:
        the option in opts or system properties, otherwise defaultValue
        Since:
        2.0
      • getEnum

        protected <E extends java.lang.Enum<E>> E getEnum​(java.lang.Class<E> enumClass,
                                                          FileSystemOptions opts,
                                                          java.lang.String name)
        Get named option as enumeration.
        Type Parameters:
        E - enumeration type
        Parameters:
        enumClass - class of enumeration type
        opts - file system options to work with
        name - the option name *
        Returns:
        the option in opts or system properties, otherwise null
        Throws:
        java.lang.IllegalArgumentException - if option value is not a known enumeration.
        Since:
        2.1
        See Also:
        getEnum(Class, FileSystemOptions, String, Enum)
      • getEnum

        protected <E extends java.lang.Enum<E>> E getEnum​(java.lang.Class<E> enumClass,
                                                          FileSystemOptions opts,
                                                          java.lang.String name,
                                                          E defaultValue)
        Get named option as enumeration.
        Type Parameters:
        E - enumeration type
        Parameters:
        enumClass - class of enumeration type
        opts - file system options to work with
        name - the option name
        defaultValue - value to return if option is not present
        Returns:
        the option in opts or system properties, otherwise defaultValue
        Throws:
        java.lang.IllegalArgumentException - if option value is not a known enumeration.
        Since:
        2.1
        See Also:
        getEnum(Class, FileSystemOptions, String, Enum)
      • getFloat

        protected java.lang.Float getFloat​(FileSystemOptions opts,
                                           java.lang.String name)
        Get named option as float.
        Parameters:
        opts - file system options to work with
        name - the option name
        Returns:
        the option in opts or system properties, otherwise null
        Throws:
        java.lang.NumberFormatException - if option value is not a valid float.
        Since:
        2.0
        See Also:
        getFloat(FileSystemOptions, String, Float)
      • getFloat

        protected float getFloat​(FileSystemOptions opts,
                                 java.lang.String name,
                                 float defaultValue)
        Get named option as float.
        Parameters:
        opts - file system options to work with
        name - the option name
        defaultValue - value to return if option is not present
        Returns:
        the option in opts or system properties, otherwise defaultValue
        Throws:
        java.lang.NumberFormatException - if option value is not a valid float.
        Since:
        2.0
        See Also:
        getFloat(FileSystemOptions, String, Float)
      • getFloat

        protected java.lang.Float getFloat​(FileSystemOptions opts,
                                           java.lang.String name,
                                           java.lang.Float defaultValue)
        Get named option as float.
        Parameters:
        opts - file system options to work with
        name - the option name
        defaultValue - value to return if option is not present
        Returns:
        the option in opts or system properties, otherwise defaultValue
        Throws:
        java.lang.NumberFormatException - if option value is not a valid float.
        Since:
        2.0
      • getInteger

        protected java.lang.Integer getInteger​(FileSystemOptions opts,
                                               java.lang.String name)
        Get named option as integer.
        Parameters:
        opts - file system options to work with
        name - the option name
        Returns:
        the option in opts or system properties, otherwise null
        Throws:
        java.lang.NumberFormatException - if option value is not a valid integer.
        Since:
        2.0
        See Also:
        getInteger(FileSystemOptions, String, Integer)
      • getInteger

        protected int getInteger​(FileSystemOptions opts,
                                 java.lang.String name,
                                 int defaultValue)
        Get named option as integer.
        Parameters:
        opts - file system options to work with
        name - the option name
        defaultValue - value to return if option is not present
        Returns:
        the option in opts or system properties, otherwise defaultValue
        Throws:
        java.lang.NumberFormatException - if option value is not a valid integer.
        Since:
        2.0
        See Also:
        getInteger(FileSystemOptions, String, Integer)
      • getInteger

        protected java.lang.Integer getInteger​(FileSystemOptions opts,
                                               java.lang.String name,
                                               java.lang.Integer defaultValue)
        Get named option as integer.
        Parameters:
        opts - file system options to work with
        name - the option name
        defaultValue - value to return if option is not present
        Returns:
        the option in opts or system properties, otherwise defaultValue
        Throws:
        java.lang.NumberFormatException - if option value is not a valid integer.
        Since:
        2.0
      • getLong

        protected java.lang.Long getLong​(FileSystemOptions opts,
                                         java.lang.String name)
        Get named option as long.
        Parameters:
        opts - file system options to work with
        name - the option name
        Returns:
        the option in opts or system properties, otherwise null
        Throws:
        java.lang.NumberFormatException - if option value is not a valid long.
        Since:
        2.0
        See Also:
        getLong(FileSystemOptions, String, Long)
      • getLong

        protected long getLong​(FileSystemOptions opts,
                               java.lang.String name,
                               long defaultValue)
        Get named option as long.
        Parameters:
        opts - file system options to work with
        name - the option name
        defaultValue - value to return if option is not present
        Returns:
        the option in opts or system properties, otherwise defaultValue
        Throws:
        java.lang.NumberFormatException - if option value is not a valid long.
        Since:
        2.0
        See Also:
        getLong(FileSystemOptions, String, Long)
      • getLong

        protected java.lang.Long getLong​(FileSystemOptions opts,
                                         java.lang.String name,
                                         java.lang.Long defaultValue)
        Get named option as long.
        Parameters:
        opts - file system options to work with
        name - the option name
        defaultValue - value to return if option is not present
        Returns:
        the option in opts or system properties, otherwise defaultValue
        Throws:
        java.lang.NumberFormatException - if option value is not a valid long.
        Since:
        2.0
      • getShort

        protected java.lang.Short getShort​(FileSystemOptions opts,
                                           java.lang.String name)
        Get named option as short.
        Parameters:
        opts - file system options to work with
        name - the option name
        Returns:
        the option in opts or system properties, otherwise null
        Throws:
        java.lang.NumberFormatException - if option value is not a valid short.
        Since:
        2.0
        See Also:
        getShort(FileSystemOptions, String, Short)
      • getShort

        protected short getShort​(FileSystemOptions opts,
                                 java.lang.String name,
                                 short defaultValue)
        Get named option as short.
        Parameters:
        opts - file system options to work with
        name - the option name
        defaultValue - value to return if option is not present
        Returns:
        the option in opts or system properties, otherwise defaultValue
        Throws:
        java.lang.NumberFormatException - if option value is not a valid short
        Since:
        2.0
        See Also:
        getShort(FileSystemOptions, String, Short)
      • getShort

        protected java.lang.Short getShort​(FileSystemOptions opts,
                                           java.lang.String name,
                                           java.lang.Short defaultValue)
        Get named option as short.
        Parameters:
        opts - file system options to work with
        name - the option name
        defaultValue - value to return if option is not present
        Returns:
        the option in opts or system properties, otherwise defaultValue
        Throws:
        java.lang.NumberFormatException - if option value is not a valid short
        Since:
        2.0
      • getString

        protected java.lang.String getString​(FileSystemOptions opts,
                                             java.lang.String name,
                                             java.lang.String defaultValue)
        Get named option as String.
        Parameters:
        opts - file system options to work with
        name - the option name
        defaultValue - value to return if option is not present
        Returns:
        the option in opts or system properties, otherwise defaultValue
        Since:
        2.0
      • getConfigClass

        protected abstract java.lang.Class<? extends FileSystemgetConfigClass()
        Get the target of this configuration.
        Returns:
        the specific file system class
        Since:
        1.0