Package com.suse.common.configuration
Class FileConfigurationSource
java.lang.Object
com.suse.common.configuration.BaseConfigurationSource
com.suse.common.configuration.FileConfigurationSource
- All Implemented Interfaces:
ConfigurationSource
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Stringprivate static final Comparator<Path>private final Propertiesprivate static final org.apache.logging.log4j.Logger -
Constructor Summary
ConstructorsConstructorDescriptionFileConfigurationSource(List<Path> fileSourcesIn) Builds a file configuration source.FileConfigurationSource(List<Path> fileSourcesIn, String filePrefixIn) Builds a file configuration source.FileConfigurationSource(List<Path> fileSourcesIn, String filePrefixIn, List<String> fallbackNamespacesIn) Builds a file configuration source. -
Method Summary
Modifier and TypeMethodDescriptiongetConfigurationStream(List<Path> locationsList) Retrieves the names of all the available properties.protected StringgetRawValue(String property) Get the configuration entry for given propertyprivate PropertiesloadProperties(Path file) private StringmakeNamespace(Path path) Methods inherited from class com.suse.common.configuration.BaseConfigurationSource
convertTo, getBoolean, getDouble, getFloat, getInteger, getList, getLong, getString, toPropertiesMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.suse.common.configuration.ConfigurationSource
requireBoolean, requireDouble, requireFloat, requireInteger, requireList, requireLong, requireString
-
Field Details
-
CONFIG_PATH_COMPARATOR
-
LOGGER
private static final org.apache.logging.log4j.Logger LOGGER -
fallbackNamespaces
-
commonFilePrefix
-
configValues
-
-
Constructor Details
-
FileConfigurationSource
Builds a file configuration source.- Parameters:
fileSourcesIn- List of files and directories to process
-
FileConfigurationSource
Builds a file configuration source.- Parameters:
fileSourcesIn- List of files and directories to processfilePrefixIn- a common prefix used by all configuration file names
-
FileConfigurationSource
public FileConfigurationSource(List<Path> fileSourcesIn, String filePrefixIn, List<String> fallbackNamespacesIn) Builds a file configuration source.- Parameters:
fileSourcesIn- List of files and directories to processfilePrefixIn- a common prefix used by all configuration file namesfallbackNamespacesIn- namespaces to search for, in the given order. These are used when a property, specified with no namespace, was not found.
-
-
Method Details
-
getRawValue
Get the configuration entry for given property- Specified by:
getRawValuein classBaseConfigurationSource- Parameters:
property- string to get the value of- Returns:
- the value
-
getPropertyNames
Description copied from interface:ConfigurationSourceRetrieves the names of all the available properties.- Returns:
- the set of property names
-
getConfigurationStream
-
loadProperties
-
makeNamespace
-