Package | Description |
---|---|
org.apache.commons.configuration2 |
The Configuration main package.
|
org.apache.commons.configuration2.builder |
This package contains the implementations of configuration builder
classes used to create new
Configuration objects. |
org.apache.commons.configuration2.builder.combined |
A package containing the implementation of the builder for combined
configurations.
|
org.apache.commons.configuration2.builder.fluent |
This package defines a fluent API for setting up fully configured configuration
builders.
|
org.apache.commons.configuration2.io |
A package with classes related to I/O operations.
|
org.apache.commons.configuration2.plist |
Configuration classes supporting NeXT / OpenStep /GNUStep style configuration.
|
Modifier and Type | Field and Description |
---|---|
static ConfigurationConsumer<ConfigurationException> |
PropertiesConfiguration.DEFAULT_INCLUDE_LISTENER
Defines default error handling for the special
"include" key by throwing the given exception. |
static ConfigurationConsumer<ConfigurationException> |
PropertiesConfiguration.NOOP_INCLUDE_LISTENER
Defines error handling as a noop for the special
"include" key. |
Modifier and Type | Method and Description |
---|---|
ConfigurationConsumer<ConfigurationException> |
PropertiesConfiguration.getIncludeListener()
Gets the current include listener, never null.
|
Modifier and Type | Method and Description |
---|---|
void |
PropertiesConfiguration.setIncludeListener(ConfigurationConsumer<ConfigurationException> includeListener)
Sets the current include listener, may not be null.
|
Modifier and Type | Method and Description |
---|---|
void |
ConfigurationConsumer.accept(T t)
Performs this operation on the given argument.
|
protected Transformer |
XMLConfiguration.createTransformer()
Creates and initializes the transformer used for save operations.
|
void |
YAMLConfiguration.dump(Writer out,
org.yaml.snakeyaml.DumperOptions options) |
void |
XMLPropertiesConfiguration.load(Element element)
Parses a DOM element containing the properties.
|
void |
PropertiesConfigurationLayout.load(PropertiesConfiguration config,
Reader in)
Reads a properties file and stores its internal structure.
|
void |
YAMLConfiguration.read(InputStream in)
Loads the configuration from the given input stream.
|
void |
JSONConfiguration.read(InputStream in)
Loads the configuration from the given input stream.
|
void |
XMLConfiguration.read(InputStream in)
Loads the configuration from the given input stream.
|
void |
YAMLConfiguration.read(InputStream in,
org.yaml.snakeyaml.LoaderOptions options) |
void |
YAMLConfiguration.read(Reader in) |
void |
JSONConfiguration.read(Reader in) |
void |
PatternSubtreeConfigurationWrapper.read(Reader reader) |
void |
XMLPropertiesConfiguration.read(Reader in) |
void |
PropertiesConfiguration.read(Reader in)
Reads the content of this object from the given reader.
|
void |
INIConfiguration.read(Reader in)
Load the configuration from the given reader.
|
void |
XMLConfiguration.read(Reader in)
Loads the configuration from the given reader.
|
void |
YAMLConfiguration.read(Reader in,
org.yaml.snakeyaml.LoaderOptions options) |
void |
PropertiesConfigurationLayout.save(PropertiesConfiguration config,
Writer out)
Writes the properties file to the given writer, preserving as much of its
structure as possible.
|
static void |
SystemConfiguration.setSystemProperties(String fileName)
Sets system properties from a file specified by its file name.
|
static void |
SystemConfiguration.setSystemProperties(String basePath,
String fileName)
Sets system properties from a file specified using its base path and
file name.
|
void |
XMLConfiguration.validate()
Validate the document against the Schema.
|
void |
YAMLConfiguration.write(Writer out) |
void |
JSONConfiguration.write(Writer out) |
void |
PatternSubtreeConfigurationWrapper.write(Writer writer) |
void |
XMLPropertiesConfiguration.write(Writer out) |
void |
PropertiesConfiguration.write(Writer out)
Writes the content of this object to the given writer.
|
void |
INIConfiguration.write(Writer writer)
Save the configuration to the specified writer.
|
void |
XMLConfiguration.write(Writer writer)
Saves the configuration to the specified writer.
|
void |
XMLConfiguration.write(Writer writer,
Transformer transformer)
Saves the configuration to the specified writer.
|
Constructor and Description |
---|
XMLPropertiesConfiguration(Element element)
Creates and loads the xml properties from the specified DOM node.
|
Modifier and Type | Method and Description |
---|---|
PropertiesBuilderParametersImpl |
PropertiesBuilderParametersImpl.setIncludeListener(ConfigurationConsumer<ConfigurationException> includeListener) |
default T |
PropertiesBuilderProperties.setIncludeListener(ConfigurationConsumer<ConfigurationException> includeListener)
Sets the current include listener, may be null.
|
Modifier and Type | Method and Description |
---|---|
ReloadingDetector |
ReloadingDetectorFactory.createReloadingDetector(FileHandler handler,
FileBasedBuilderParametersImpl params)
Creates a new
ReloadingDetector object based on the passed in
parameters. |
protected ReloadingDetector |
ReloadingFileBasedConfigurationBuilder.createReloadingDetector(FileHandler handler,
FileBasedBuilderParametersImpl fbparams)
Creates a
ReloadingDetector which monitors the passed in
FileHandler . |
ReloadingDetector |
DefaultReloadingDetectorFactory.createReloadingDetector(FileHandler handler,
FileBasedBuilderParametersImpl params) |
protected T |
BasicConfigurationBuilder.createResult()
Creates a new, initialized result object.
|
protected BeanDeclaration |
BasicConfigurationBuilder.createResultDeclaration(Map<String,Object> params)
Creates a new
BeanDeclaration which is used for creating new
result objects dynamically. |
protected T |
BasicConfigurationBuilder.createResultInstance()
Creates the new, uninitialized result object.
|
T |
BasicConfigurationBuilder.getConfiguration()
Returns the configuration provided by this builder.
|
T |
ConfigurationBuilder.getConfiguration()
Returns the configuration provided by this builder.
|
protected BeanDeclaration |
BasicConfigurationBuilder.getResultDeclaration()
Returns the
BeanDeclaration that is used to create and initialize
result objects. |
protected void |
FileBasedConfigurationBuilder.initFileHandler(FileHandler handler)
Initializes the new current
FileHandler . |
protected void |
ReloadingFileBasedConfigurationBuilder.initFileHandler(FileHandler handler)
Initializes the new current
FileHandler . |
protected void |
BasicConfigurationBuilder.initResultInstance(T obj)
Initializes a newly created result object.
|
protected void |
FileBasedConfigurationBuilder.initResultInstance(T obj)
Initializes a newly created result object.
|
void |
FileBasedConfigurationBuilder.save()
Convenience method which saves the associated configuration.
|
Modifier and Type | Method and Description |
---|---|
protected void |
CombinedConfigurationBuilder.configureEntityResolver(HierarchicalConfiguration<?> config,
XMLBuilderParametersImpl xmlParams)
Creates and initializes a default
EntityResolver if the
definition configuration contains a corresponding declaration. |
protected FileBasedConfigurationBuilder<T> |
MultiFileConfigurationBuilder.createInitializedManagedBuilder(String fileName,
Map<String,Object> params)
Creates a fully initialized builder for a managed configuration.
|
protected FileBasedConfigurationBuilder<T> |
MultiFileConfigurationBuilder.createManagedBuilder(String fileName,
Map<String,Object> params)
Creates a builder for a managed configuration.
|
protected FileBasedConfigurationBuilder<T> |
ReloadingMultiFileConfigurationBuilder.createManagedBuilder(String fileName,
Map<String,Object> params)
Creates a builder for a managed configuration.
|
protected ReloadingController |
ReloadingCombinedConfigurationBuilder.createReloadingController()
Creates the
ReloadingController for this builder. |
protected BeanDeclaration |
CombinedConfigurationBuilder.createResultDeclaration(Map<String,Object> params)
Creates a new
BeanDeclaration which is used for creating new
result objects dynamically. |
protected String |
BaseConfigurationBuilderProvider.determineBuilderClass(ConfigurationDeclaration decl)
Determines the name of the class to be used for a new builder instance.
|
protected String |
BaseConfigurationBuilderProvider.determineConfigurationClass(ConfigurationDeclaration decl,
Collection<BuilderParameters> params)
Determines the name of the configuration class produced by the builder.
|
protected String |
FileExtensionConfigurationBuilderProvider.determineConfigurationClass(ConfigurationDeclaration decl,
Collection<BuilderParameters> params)
Determines the name of the configuration class produced by the builder.
|
T |
MultiFileConfigurationBuilder.getConfiguration()
Returns the configuration provided by this builder.
|
CombinedConfiguration |
ReloadingCombinedConfigurationBuilder.getConfiguration()
Returns the configuration provided by this builder.
|
ConfigurationBuilder<? extends Configuration> |
ConfigurationBuilderProvider.getConfigurationBuilder(ConfigurationDeclaration decl)
Returns the builder for the configuration source managed by this
provider.
|
ConfigurationBuilder<? extends Configuration> |
BaseConfigurationBuilderProvider.getConfigurationBuilder(ConfigurationDeclaration decl)
Returns the builder for the configuration source managed by this
provider.
|
ConfigurationBuilder<? extends Configuration> |
MultiFileConfigurationBuilderProvider.getConfigurationBuilder(ConfigurationDeclaration decl)
Returns the builder for the configuration source managed by this
provider.
|
ConfigurationBuilder<? extends HierarchicalConfiguration<?>> |
CombinedConfigurationBuilder.getDefinitionBuilder()
Returns the
ConfigurationBuilder which creates the definition
configuration. |
protected HierarchicalConfiguration<?> |
CombinedConfigurationBuilder.getDefinitionConfiguration()
Returns the configuration containing the definition of the combined
configuration to be created.
|
FileBasedConfigurationBuilder<T> |
MultiFileConfigurationBuilder.getManagedBuilder()
Returns the managed
FileBasedConfigurationBuilder for the current
file name pattern. |
ConfigurationBuilder<? extends Configuration> |
CombinedConfigurationBuilder.getNamedBuilder(String name)
Returns the configuration builder with the given name.
|
protected FileSystem |
CombinedConfigurationBuilder.initFileSystem(HierarchicalConfiguration<?> config)
Creates and initializes a default
FileSystem if the definition
configuration contains a corresponding declaration. |
protected void |
ReloadingCombinedConfigurationBuilder.initResultInstance(CombinedConfiguration result)
Initializes a newly created result object.
|
protected void |
CombinedConfigurationBuilder.initResultInstance(CombinedConfiguration result)
Initializes a newly created result object.
|
protected void |
CombinedConfigurationBuilder.initSystemProperties(HierarchicalConfiguration<?> config,
String basePath)
Handles a file with system properties that may be defined in the
definition configuration.
|
protected void |
CombinedConfigurationBuilder.registerConfiguredLookups(HierarchicalConfiguration<?> defConfig,
Configuration resultConfig)
Processes custom
Lookup objects that might be declared in the
definition configuration. |
protected ConfigurationBuilder<? extends HierarchicalConfiguration<?>> |
CombinedConfigurationBuilder.setupDefinitionBuilder(Map<String,Object> params)
Obtains the
ConfigurationBuilder object which provides access to
the configuration containing the definition of the combined configuration
to create. |
Modifier and Type | Method and Description |
---|---|
CombinedConfiguration |
Configurations.combined(File file)
Creates a
CombinedConfiguration instance from the content of the
given file. |
CombinedConfiguration |
Configurations.combined(String path)
Creates a
CombinedConfiguration instance from the content of the
file identified by the given path. |
CombinedConfiguration |
Configurations.combined(URL url)
Creates a
CombinedConfiguration instance from the content of the
given URL. |
<T extends FileBasedConfiguration> |
Configurations.fileBased(Class<T> configClass,
File file)
Creates an instance of the specified file-based configuration class from
the content of the given file.
|
<T extends FileBasedConfiguration> |
Configurations.fileBased(Class<T> configClass,
String path)
Creates an instance of the specified file-based configuration class from
the content of the file identified by the given path.
|
<T extends FileBasedConfiguration> |
Configurations.fileBased(Class<T> configClass,
URL url)
Creates an instance of the specified file-based configuration class from
the content of the given URL.
|
INIConfiguration |
Configurations.ini(File file)
Creates a
INIConfiguration instance from the content of the given
file. |
INIConfiguration |
Configurations.ini(String path)
Creates a
INIConfiguration instance from the content of the file
identified by the given path. |
INIConfiguration |
Configurations.ini(URL url)
Creates a
INIConfiguration instance from the content of the given
URL. |
PropertiesConfiguration |
Configurations.properties(File file)
Creates a
PropertiesConfiguration instance from the content of
the given file. |
PropertiesConfiguration |
Configurations.properties(String path)
Creates a
PropertiesConfiguration instance from the content of
the file identified by the given path. |
PropertiesConfiguration |
Configurations.properties(URL url)
Creates a
PropertiesConfiguration instance from the content of
the given URL. |
XMLConfiguration |
Configurations.xml(File file)
Creates a
XMLConfiguration instance from the content of the given
file. |
XMLConfiguration |
Configurations.xml(String path)
Creates a
XMLConfiguration instance from the content of the file
identified by the given path. |
XMLConfiguration |
Configurations.xml(URL url)
Creates a
XMLConfiguration instance from the content of the given
URL. |
Modifier and Type | Method and Description |
---|---|
InputStream |
VFSFileSystem.getInputStream(URL url) |
InputStream |
DefaultFileSystem.getInputStream(URL url) |
abstract InputStream |
FileSystem.getInputStream(URL url) |
OutputStream |
DefaultFileSystem.getOutputStream(File file) |
abstract OutputStream |
FileSystem.getOutputStream(File file) |
OutputStream |
VFSFileSystem.getOutputStream(URL url) |
OutputStream |
DefaultFileSystem.getOutputStream(URL url) |
abstract OutputStream |
FileSystem.getOutputStream(URL url) |
void |
FileHandler.load()
Loads the associated file from the underlying location.
|
void |
FileHandler.load(File file)
Loads the associated file from the specified
File . |
void |
FileHandler.load(InputStream in)
Loads the associated file from the specified stream, using the encoding
returned by
FileHandler.getEncoding() . |
void |
FileHandler.load(InputStream in,
String encoding)
Loads the associated file from the specified stream, using the specified
encoding.
|
void |
FileHandler.load(Reader in)
Loads the associated file from the specified reader.
|
void |
FileHandler.load(String fileName)
Loads the associated file from the given file name.
|
void |
FileHandler.load(URL url)
Loads the associated file from the specified URL.
|
static URL |
FileLocatorUtils.locateOrThrow(FileLocator locator)
Tries to locate the file referenced by the passed in
FileLocator . |
void |
InputStreamSupport.read(InputStream in)
Reads the content of this object from the specified
InputStream . |
void |
FileBased.read(Reader in)
Reads the content of this object from the given reader.
|
void |
FileHandler.save()
Saves the associated file to the current location set for this object.
|
void |
FileHandler.save(File file)
Saves the associated file to the specified
File . |
void |
FileHandler.save(OutputStream out)
Saves the associated file to the specified stream using the encoding
returned by
FileHandler.getEncoding() . |
void |
FileHandler.save(OutputStream out,
String encoding)
Saves the associated file to the specified stream using the specified
encoding.
|
void |
FileHandler.save(String fileName)
Saves the associated file to the specified file name.
|
void |
FileHandler.save(URL url)
Saves the associated file to the specified URL.
|
void |
FileHandler.save(Writer out)
Saves the associated file to the given
Writer . |
void |
FileBased.write(Writer out)
Writes the content of this object to the given writer.
|
Modifier and Type | Method and Description |
---|---|
void |
PropertyListConfiguration.read(Reader in) |
void |
XMLPropertyListConfiguration.read(Reader in) |
void |
PropertyListConfiguration.write(Writer out) |
void |
XMLPropertyListConfiguration.write(Writer out) |
Copyright © 2001–2020 The Apache Software Foundation. All rights reserved.