- java.lang.Object
-
- com.pervasive.datarush.io.configuration.FileConfiguration
-
public final class FileConfiguration extends Object
Generic configuration object which consists of a list of arbitrary named fields. Configuration typically consist of an account id field plus a secret key field plus any extra configuration. From the standpoint of the framework, configurations are opaque objects. The framework's responsibility is to transport the configuration templateFileSystemProvider#getConfigurationTemplate()
to the user interface and then securely transport the user's response to the file provider.
-
-
Field Summary
Fields Modifier and Type Field Description static FileConfiguration
EMPTY_CONFIGURATION
Any empty configuration object.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static FileConfiguration
configuration(ConfigurationField... fields)
Creates a configuration object consisting of an ordered list of fieldsstatic FileConfiguration
configuration(List<ConfigurationField> fields)
Creates a configuration object consisting of an ordered list of fieldsConfigurationField
getField(String name)
Returns the field corresponding to the given nameList<ConfigurationField>
getFields()
Returns the fields of this configuration objectboolean
isEmpty()
Indicates whether the configuration represent the empty configuration.FileConfiguration
override(FileConfiguration overrides)
Creates a new FileConfiguration object equal to this configuration with its values overridden by the specified values
-
-
-
Field Detail
-
EMPTY_CONFIGURATION
public static final FileConfiguration EMPTY_CONFIGURATION
Any empty configuration object.
-
-
Method Detail
-
configuration
public static FileConfiguration configuration(ConfigurationField... fields) throws IllegalArgumentException
Creates a configuration object consisting of an ordered list of fields- Parameters:
fields
- the fields- Returns:
- a new configuration object
- Throws:
IllegalArgumentException
- if there are any duplicate fields
-
configuration
public static FileConfiguration configuration(List<ConfigurationField> fields) throws IllegalArgumentException
Creates a configuration object consisting of an ordered list of fields- Parameters:
fields
- the fields- Returns:
- a new configuration object
- Throws:
IllegalArgumentException
- if there are any duplicate fields
-
override
public FileConfiguration override(FileConfiguration overrides)
Creates a new FileConfiguration object equal to this configuration with its values overridden by the specified values- Parameters:
overrides
- the overriding values- Returns:
- a new FileConfiguration object equal
-
isEmpty
public boolean isEmpty()
Indicates whether the configuration represent the empty configuration.- Returns:
true
if the configuration is empty,false
otherwise
-
getFields
public List<ConfigurationField> getFields()
Returns the fields of this configuration object- Returns:
- the fields of this configuration object
-
getField
public ConfigurationField getField(String name) throws IllegalArgumentException
Returns the field corresponding to the given name- Parameters:
name
- the name of the field- Returns:
- the corresponding field
- Throws:
IllegalArgumentException
- if the given field does not exist
-
-