java.lang.Object
com.pervasive.datarush.io.configuration.FileMetaConfiguration
A FileMetaConfiguration is a grouping of all file configurations related to
the client. FileMetaConfiguration consist of a list of
entries which each entry is a pair of
path prefix to those that are to be used for paths starting with the given
prefix. The list of entries are searched in the order until a match is found.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classAn entry in the meta-configuration consisting of a path prefix and those configurations that are to be used for paths starting with the given prefix. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic FileMetaConfigurationAn empty configuration that only has default configuration. -
Method Summary
Modifier and TypeMethodDescriptionstatic FileMetaConfigurationconfiguration(FileMetaConfiguration.Entry... entries) Creates a new meta-configuration consisting of the given entries.static FileMetaConfigurationconfiguration(List<FileMetaConfiguration.Entry> entries) Creates a new meta-configuration consisting of the given entries.static FileMetaConfiguration.Entryentry(Path prefix, FileConfiguration configuration) Creates a new entrystatic FileMetaConfigurationexactConfiguration(FileMetaConfiguration.Entry... entries) Creates a new configuration consisting of onlythe given entries; no default configuration is acquired.static FileMetaConfigurationCreates a new configuration consisting of onlythe given entries; no default configuration is acquired.Returns the first entry whose prefix is a prefix of the given pathgetConfiguration(Path path) Returns the configuration to be used for the given path orFileConfiguration.EMPTY_CONFIGURATIONif none found.Returns the list of entries contained by this configurationGets a new meta-configuration with all default configuration removed.Gets a new meta-configuration with the default configuration replaced with those from the current environment.
-
Field Details
-
DEFAULT_CONFIGURATION
An empty configuration that only has default configuration.
-
-
Method Details
-
entry
Creates a new entry- Parameters:
prefix- the path prefixconfiguration- the configuration to use for paths that start with the given prefix- Returns:
- a new entry
-
configuration
Creates a new meta-configuration consisting of the given entries. The resulting meta-configuration will also acquire any default configuration from the execution environment.- Parameters:
entries- the entries- Returns:
- the configuration
-
configuration
Creates a new meta-configuration consisting of the given entries. The resulting configuration will also acquire any default configuration from the execution environment.- Parameters:
entries- the entries- Returns:
- the configuration
-
exactConfiguration
Creates a new configuration consisting of onlythe given entries; no default configuration is acquired.- Parameters:
entries- the entries- Returns:
- the configuration
-
exactConfiguration
Creates a new configuration consisting of onlythe given entries; no default configuration is acquired.- Parameters:
entries- the entries- Returns:
- the configuration
-
getEntries
Returns the list of entries contained by this configuration- Returns:
- the entries
-
resetDefaultConfiguration
Gets a new meta-configuration with the default configuration replaced with those from the current environment.This is equivalent to calling
FileMetaConfiguration.exactConfiguration(this.getEntries()).- Returns:
- a new configuration inheriting default configuration from the current environment
-
removeDefaultConfiguration
Gets a new meta-configuration with all default configuration removed. This strips all configuration inherited from the execution environment from the resulting configuration.This is equivalent to calling
FileMetaConfiguration.exactConfiguration(this.getEntries()).- Returns:
- a new configuration without default configuration
-
getConfiguration
Returns the configuration to be used for the given path orFileConfiguration.EMPTY_CONFIGURATIONif none found.- Parameters:
path- the path- Returns:
- the configuration
-
findEntry
Returns the first entry whose prefix is a prefix of the given path- Parameters:
path- the path- Returns:
- the matching entry or null if no matches found
-