Uses of Class
org.apache.commons.configuration2.ex.ConfigurationException
-
Packages that use ConfigurationException 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 newConfiguration
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. -
-
Uses of ConfigurationException in org.apache.commons.configuration2
Fields in org.apache.commons.configuration2 with type parameters of type ConfigurationException Modifier and Type Field Description static ConfigurationConsumer<ConfigurationException>
PropertiesConfiguration. DEFAULT_INCLUDE_LISTENER
Defines default error handling for the special"include"
key by throwing the given exception.private ConfigurationConsumer<ConfigurationException>
PropertiesConfiguration. includeListener
The include listener for the special"include"
key.static ConfigurationConsumer<ConfigurationException>
PropertiesConfiguration. NOOP_INCLUDE_LISTENER
Defines error handling as a noop for the special"include"
key.Methods in org.apache.commons.configuration2 that return types with arguments of type ConfigurationException Modifier and Type Method Description ConfigurationConsumer<ConfigurationException>
PropertiesConfiguration. getIncludeListener()
Gets the current include listener, never null.Method parameters in org.apache.commons.configuration2 with type arguments of type ConfigurationException Modifier and Type Method Description void
PropertiesConfiguration. setIncludeListener(ConfigurationConsumer<ConfigurationException> includeListener)
Sets the current include listener, may not be null.Methods in org.apache.commons.configuration2 that throw ConfigurationException Modifier and Type Method Description void
ConfigurationConsumer. accept(T t)
Performs this operation on the given argument.private static org.w3c.dom.Document
XMLDocumentHelper. copyDocument(org.w3c.dom.Document doc)
Creates a copy of the specified document.XMLDocumentHelper
XMLDocumentHelper. createCopy()
Creates a copy of this object.private org.w3c.dom.Document
XMLConfiguration. createDocument()
Creates a DOM document from the internal tree of configuration nodes.(package private) static javax.xml.parsers.DocumentBuilder
XMLDocumentHelper. createDocumentBuilder(javax.xml.parsers.DocumentBuilderFactory factory)
Creates a newDocumentBuilder
using the specified factory.protected javax.xml.transform.Transformer
XMLConfiguration. createTransformer()
Creates and initializes the transformer used for save operations.static javax.xml.transform.Transformer
XMLDocumentHelper. createTransformer()
Creates a newTransformer
object.(package private) static javax.xml.transform.Transformer
XMLDocumentHelper. createTransformer(javax.xml.transform.TransformerFactory factory)
Creates aTransformer
using the specified factory.private FileBased
PatternSubtreeConfigurationWrapper. fetchFileBased()
Returns the wrapped configuration as aFileBased
object.static XMLDocumentHelper
XMLDocumentHelper. forNewDocument(java.lang.String rootElementName)
Creates a new instance ofXMLDocumentHelper
and initializes it with a newly created, emptyDocument
.static XMLDocumentHelper
XMLDocumentHelper. forSourceDocument(org.w3c.dom.Document srcDoc)
Creates a new instance ofXMLDocumentHelper
and initializes it with a source document.void
PropertiesConfigurationLayout. load(PropertiesConfiguration config, java.io.Reader reader)
Reads a properties file and stores its internal structure.private void
XMLConfiguration. load(org.xml.sax.InputSource source)
Loads a configuration file from the specified input source.void
XMLPropertiesConfiguration. load(org.w3c.dom.Element element)
Parses a DOM element containing the properties.private void
PropertiesConfiguration. loadIncludeFile(java.lang.String fileName, boolean optional, java.util.Deque<java.net.URL> seenStack)
Helper method for loading an included properties file.(package private) boolean
PropertiesConfiguration. propertyLoaded(java.lang.String key, java.lang.String value, java.util.Deque<java.net.URL> seenStack)
This method is invoked by the associatedPropertiesConfigurationLayout
object for each property definition detected in the parsed properties file.void
INIConfiguration. read(java.io.Reader in)
Load the configuration from the given reader.void
JSONConfiguration. read(java.io.InputStream in)
Loads the configuration from the given input stream.void
JSONConfiguration. read(java.io.Reader in)
void
PatternSubtreeConfigurationWrapper. read(java.io.Reader reader)
void
PropertiesConfiguration. read(java.io.Reader in)
Reads the content of this object from the given reader.void
XMLConfiguration. read(java.io.InputStream in)
Loads the configuration from the given input stream.void
XMLConfiguration. read(java.io.Reader in)
Loads the configuration from the given reader.void
XMLPropertiesConfiguration. read(java.io.Reader in)
(package private) static void
AbstractYAMLBasedConfiguration. rethrowException(java.lang.Exception e)
Internal helper method to wrap an exception in aConfigurationException
.void
PropertiesConfigurationLayout. save(PropertiesConfiguration config, java.io.Writer writer)
Writes the properties file to the given writer, preserving as much of its structure as possible.static void
SystemConfiguration. setSystemProperties(java.lang.String fileName)
Sets system properties from a file specified by its file name.static void
SystemConfiguration. setSystemProperties(java.lang.String basePath, java.lang.String fileName)
Sets system properties from a file specified using its base path and file name.static void
XMLDocumentHelper. transform(javax.xml.transform.Transformer transformer, javax.xml.transform.Source source, javax.xml.transform.Result result)
Performs an XSL transformation on the passed in operands.void
XMLConfiguration. validate()
Validate the document against the Schema.void
INIConfiguration. write(java.io.Writer writer)
Save the configuration to the specified writer.void
JSONConfiguration. write(java.io.Writer out)
void
PatternSubtreeConfigurationWrapper. write(java.io.Writer writer)
void
PropertiesConfiguration. write(java.io.Writer out)
Writes the content of this object to the given writer.void
XMLConfiguration. write(java.io.Writer writer)
Saves the configuration to the specified writer.void
XMLConfiguration. write(java.io.Writer writer, javax.xml.transform.Transformer transformer)
Saves the configuration to the specified writer.void
XMLPropertiesConfiguration. write(java.io.Writer out)
Constructors in org.apache.commons.configuration2 that throw ConfigurationException Constructor Description XMLPropertiesConfiguration(org.w3c.dom.Element element)
Creates and loads the XML properties from the specified DOM node. -
Uses of ConfigurationException in org.apache.commons.configuration2.builder
Method parameters in org.apache.commons.configuration2.builder with type arguments of type ConfigurationException Modifier and Type Method Description PropertiesBuilderParametersImpl
PropertiesBuilderParametersImpl. setIncludeListener(ConfigurationConsumer<ConfigurationException> includeListener)
default T
PropertiesBuilderProperties. setIncludeListener(ConfigurationConsumer<ConfigurationException> includeListener)
Sets the current include listener, may be null.Methods in org.apache.commons.configuration2.builder that throw ConfigurationException Modifier and Type Method Description ReloadingDetector
DefaultReloadingDetectorFactory. createReloadingDetector(FileHandler handler, FileBasedBuilderParametersImpl params)
ReloadingDetector
ReloadingDetectorFactory. createReloadingDetector(FileHandler handler, FileBasedBuilderParametersImpl params)
Creates a newReloadingDetector
object based on the passed in parameters.protected ReloadingDetector
ReloadingFileBasedConfigurationBuilder. createReloadingDetector(FileHandler handler, FileBasedBuilderParametersImpl fbparams)
Creates aReloadingDetector
which monitors the passed inFileHandler
.protected T
BasicConfigurationBuilder. createResult()
Creates a new, initialized result object.protected BeanDeclaration
BasicConfigurationBuilder. createResultDeclaration(java.util.Map<java.lang.String,java.lang.Object> params)
Creates a newBeanDeclaration
which is used for creating new result objects dynamically.protected T
BasicConfigurationBuilder. createResultInstance()
Creates the new, uninitialized result object.T
BasicConfigurationBuilder. getConfiguration()
Gets the configuration provided by this builder.T
ConfigurationBuilder. getConfiguration()
Gets the configuration provided by this builder.protected BeanDeclaration
BasicConfigurationBuilder. getResultDeclaration()
Gets theBeanDeclaration
that is used to create and initialize result objects.private java.lang.Object
BuilderConfigurationWrapperFactory.BuilderConfigurationWrapperInvocationHandler. handleConfigurationInvocation(java.lang.reflect.Method method, java.lang.Object[] args)
Handles a method invocation on the associated builder's configuration object.protected void
FileBasedConfigurationBuilder. initFileHandler(FileHandler handler)
Initializes the new currentFileHandler
.protected void
ReloadingFileBasedConfigurationBuilder. initFileHandler(FileHandler handler)
Initializes the new currentFileHandler
.protected void
BasicConfigurationBuilder. initResultInstance(T obj)
Initializes a newly created result object.protected void
FileBasedConfigurationBuilder. initResultInstance(T obj)
Initializes a newly created result object.java.lang.Object
BuilderConfigurationWrapperFactory.BuilderConfigurationWrapperInvocationHandler. invoke(java.lang.Object proxy, java.lang.reflect.Method method, java.lang.Object[] args)
Handles method invocations.void
FileBasedConfigurationBuilder. save()
Convenience method which saves the associated configuration. -
Uses of ConfigurationException in org.apache.commons.configuration2.builder.combined
Methods in org.apache.commons.configuration2.builder.combined that throw ConfigurationException Modifier and Type Method Description private void
CombinedConfigurationBuilder.ConfigurationSourceData. addChildConfiguration(CombinedConfiguration ccResult, ConfigurationDeclaration decl, ConfigurationBuilder<? extends Configuration> builder)
Creates a new configuration using the specified builder and adds it to the resulting combined configuration.protected void
CombinedConfigurationBuilder. configureEntityResolver(HierarchicalConfiguration<?> config, XMLBuilderParametersImpl xmlParams)
Creates and initializes a defaultEntityResolver
if the definition configuration contains a corresponding declaration.java.util.List<ConfigurationBuilder<? extends Configuration>>
CombinedConfigurationBuilder.ConfigurationSourceData. createAndAddConfigurations(CombinedConfiguration ccResult, java.util.List<ConfigurationDeclaration> srcDecl, java.util.List<ConfigurationBuilder<? extends Configuration>> builders)
Processes the declaration of configuration builder providers, creates the corresponding builder if necessary, obtains configurations, and adds them to the specified result configuration.private ConfigurationBuilder<? extends Configuration>
CombinedConfigurationBuilder.ConfigurationSourceData. createConfigurationBuilder(ConfigurationDeclaration decl)
Creates a configuration builder based on a source declaration in the definition configuration.protected FileBasedConfigurationBuilder<T>
MultiFileConfigurationBuilder. createInitializedManagedBuilder(java.lang.String fileName, java.util.Map<java.lang.String,java.lang.Object> params)
Creates a fully initialized builder for a managed configuration.protected FileBasedConfigurationBuilder<T>
MultiFileConfigurationBuilder. createManagedBuilder(java.lang.String fileName, java.util.Map<java.lang.String,java.lang.Object> params)
Creates a builder for a managed configuration.protected FileBasedConfigurationBuilder<T>
ReloadingMultiFileConfigurationBuilder. createManagedBuilder(java.lang.String fileName, java.util.Map<java.lang.String,java.lang.Object> params)
Creates a builder for a managed configuration.protected ReloadingController
ReloadingCombinedConfigurationBuilder. createReloadingController()
Creates theReloadingController
for this builder.protected BeanDeclaration
CombinedConfigurationBuilder. createResultDeclaration(java.util.Map<java.lang.String,java.lang.Object> params)
Creates a newBeanDeclaration
which is used for creating new result objects dynamically.private CombinedConfigurationBuilder.ConfigurationSourceData
CombinedConfigurationBuilder. createSourceData()
Creates the data object for configuration sources and the corresponding builders.protected java.lang.String
BaseConfigurationBuilderProvider. determineBuilderClass(ConfigurationDeclaration decl)
Determines the name of the class to be used for a new builder instance.protected java.lang.String
BaseConfigurationBuilderProvider. determineConfigurationClass(ConfigurationDeclaration decl, java.util.Collection<BuilderParameters> params)
Determines the name of the configuration class produced by the builder.protected java.lang.String
FileExtensionConfigurationBuilderProvider. determineConfigurationClass(ConfigurationDeclaration decl, java.util.Collection<BuilderParameters> params)
Determines the name of the configuration class produced by the builder.T
MultiFileConfigurationBuilder. getConfiguration()
Gets the configuration provided by this builder.Configuration
MultiFileConfigurationBuilderProvider.WrapperBuilder. getConfiguration()
CombinedConfiguration
ReloadingCombinedConfigurationBuilder. getConfiguration()
Gets the configuration provided by this builder.ConfigurationBuilder<? extends Configuration>
BaseConfigurationBuilderProvider. getConfigurationBuilder(ConfigurationDeclaration decl)
Gets the builder for the configuration source managed by this provider.ConfigurationBuilder<? extends Configuration>
ConfigurationBuilderProvider. getConfigurationBuilder(ConfigurationDeclaration decl)
Gets the builder for the configuration source managed by this provider.ConfigurationBuilder<? extends Configuration>
MultiFileConfigurationBuilderProvider. getConfigurationBuilder(ConfigurationDeclaration decl)
Gets the builder for the configuration source managed by this provider.ConfigurationBuilder<? extends HierarchicalConfiguration<?>>
CombinedConfigurationBuilder. getDefinitionBuilder()
Gets theConfigurationBuilder
which creates the definition configuration.protected HierarchicalConfiguration<?>
CombinedConfigurationBuilder. getDefinitionConfiguration()
Gets the configuration containing the definition of the combined configuration to be created.FileBasedConfigurationBuilder<T>
MultiFileConfigurationBuilder. getManagedBuilder()
Gets the managedFileBasedConfigurationBuilder
for the current file name pattern.ConfigurationBuilder<? extends Configuration>
CombinedConfigurationBuilder. getNamedBuilder(java.lang.String name)
Gets the configuration builder with the given name.private CombinedConfigurationBuilder.ConfigurationSourceData
CombinedConfigurationBuilder. getSourceData()
Obtains the data object for the configuration sources and the corresponding builders.private void
CombinedConfigurationBuilder. initDefaultBasePath()
Initializes the default base path for all file-based child configuration sources.protected FileSystem
CombinedConfigurationBuilder. initFileSystem(HierarchicalConfiguration<?> config)
Creates and initializes a defaultFileSystem
if the definition configuration contains a corresponding declaration.void
CombinedConfigurationBuilder.ConfigurationSourceData. initFromDefinitionConfiguration(HierarchicalConfiguration<?> config)
Initializes this object from the specified definition configuration.protected void
CombinedConfigurationBuilder. initResultInstance(CombinedConfiguration result)
Initializes a newly created result object.protected void
ReloadingCombinedConfigurationBuilder. initResultInstance(CombinedConfiguration result)
Initializes a newly created result object.protected void
CombinedConfigurationBuilder. initSystemProperties(HierarchicalConfiguration<?> config, java.lang.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 customLookup
objects that might be declared in the definition configuration.private void
CombinedConfigurationBuilder. setUpCurrentXMLParameters()
Sets up an XML parameters object which is used to store properties related to XML and file-based configurations during creation of the result configuration.protected ConfigurationBuilder<? extends HierarchicalConfiguration<?>>
CombinedConfigurationBuilder. setupDefinitionBuilder(java.util.Map<java.lang.String,java.lang.Object> params)
Obtains theConfigurationBuilder
object which provides access to the configuration containing the definition of the combined configuration to create. -
Uses of ConfigurationException in org.apache.commons.configuration2.builder.fluent
Methods in org.apache.commons.configuration2.builder.fluent that throw ConfigurationException Modifier and Type Method Description CombinedConfiguration
Configurations. combined(java.io.File file)
Creates aCombinedConfiguration
instance from the content of the given file.CombinedConfiguration
Configurations. combined(java.lang.String path)
Creates aCombinedConfiguration
instance from the content of the file identified by the given path.CombinedConfiguration
Configurations. combined(java.net.URL url)
Creates aCombinedConfiguration
instance from the content of the given URL.<T extends FileBasedConfiguration>
TConfigurations. fileBased(java.lang.Class<T> configClass, java.io.File file)
Creates an instance of the specified file-based configuration class from the content of the given file.<T extends FileBasedConfiguration>
TConfigurations. fileBased(java.lang.Class<T> configClass, java.lang.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>
TConfigurations. fileBased(java.lang.Class<T> configClass, java.net.URL url)
Creates an instance of the specified file-based configuration class from the content of the given URL.INIConfiguration
Configurations. ini(java.io.File file)
Creates aINIConfiguration
instance from the content of the given file.INIConfiguration
Configurations. ini(java.lang.String path)
Creates aINIConfiguration
instance from the content of the file identified by the given path.INIConfiguration
Configurations. ini(java.net.URL url)
Creates aINIConfiguration
instance from the content of the given URL.PropertiesConfiguration
Configurations. properties(java.io.File file)
Creates aPropertiesConfiguration
instance from the content of the given file.PropertiesConfiguration
Configurations. properties(java.lang.String path)
Creates aPropertiesConfiguration
instance from the content of the file identified by the given path.PropertiesConfiguration
Configurations. properties(java.net.URL url)
Creates aPropertiesConfiguration
instance from the content of the given URL.XMLConfiguration
Configurations. xml(java.io.File file)
Creates aXMLConfiguration
instance from the content of the given file.XMLConfiguration
Configurations. xml(java.lang.String path)
Creates aXMLConfiguration
instance from the content of the file identified by the given path.XMLConfiguration
Configurations. xml(java.net.URL url)
Creates aXMLConfiguration
instance from the content of the given URL. -
Uses of ConfigurationException in org.apache.commons.configuration2.io
Methods in org.apache.commons.configuration2.io that throw ConfigurationException Modifier and Type Method Description private void
FileHandler. checkContent()
Checks whether a content object is available.private FileLocator
FileHandler. checkContentAndGetLocator()
Checks whether a content object is available and returns the currentFileLocator
.private void
DefaultFileSystem. createPath(java.io.File file)
Create the path to the specified file.java.io.InputStream
DefaultFileSystem. getInputStream(java.net.URL url)
java.io.InputStream
DefaultFileSystem. getInputStream(java.net.URL url, URLConnectionOptions urlConnectionOptions)
abstract java.io.InputStream
FileSystem. getInputStream(java.net.URL url)
java.io.InputStream
FileSystem. getInputStream(java.net.URL url, URLConnectionOptions urlConnectionOptions)
Not abstract for binary compatibility.java.io.InputStream
VFSFileSystem. getInputStream(java.net.URL url)
java.io.OutputStream
DefaultFileSystem. getOutputStream(java.io.File file)
java.io.OutputStream
DefaultFileSystem. getOutputStream(java.net.URL url)
abstract java.io.OutputStream
FileSystem. getOutputStream(java.io.File file)
abstract java.io.OutputStream
FileSystem. getOutputStream(java.net.URL url)
java.io.OutputStream
VFSFileSystem. getOutputStream(java.net.URL url)
void
FileHandler. load()
Loads the associated file from the underlying location.void
FileHandler. load(java.io.File file)
Loads the associated file from the specifiedFile
.void
FileHandler. load(java.io.InputStream in)
Loads the associated file from the specified stream, using the encoding returned byFileHandler.getEncoding()
.void
FileHandler. load(java.io.InputStream in, java.lang.String encoding)
Loads the associated file from the specified stream, using the specified encoding.private void
FileHandler. load(java.io.InputStream in, FileLocator locator)
Internal helper method for loading a file from the given input stream.void
FileHandler. load(java.io.Reader in)
Loads the associated file from the specified reader.void
FileHandler. load(java.lang.String fileName)
Loads the associated file from the given file name.private void
FileHandler. load(java.lang.String fileName, FileLocator locator)
Internal helper method for loading a file from a file name.void
FileHandler. load(java.net.URL url)
Loads the associated file from the specified URL.private void
FileHandler. load(java.net.URL url, FileLocator locator)
Internal helper method for loading a file from the given URL.private void
FileHandler. load(FileLocator locator)
Internal helper method for loading the associated file from the location specified in the givenFileLocator
.private void
FileHandler. loadFromReader(java.io.Reader in)
Internal helper method for loading a file from the given reader.private void
FileHandler. loadFromStream(java.io.InputStream in, java.lang.String encoding, java.net.URL url)
Internal helper method for loading a file from an input stream.private void
FileHandler. loadFromStreamDirectly(java.io.InputStream in)
Loads data from an input stream if the associatedFileBased
object implements theInputStreamSupport
interface.private void
FileHandler. loadFromTransformedStream(java.io.InputStream in, java.lang.String encoding)
Internal helper method for transforming an input stream to a reader and reading its content.static java.net.URL
FileLocatorUtils. locateOrThrow(FileLocator locator)
Tries to locate the file referenced by the passed inFileLocator
.void
FileBased. read(java.io.Reader in)
Reads the content of this object from the given reader.void
InputStreamSupport. read(java.io.InputStream in)
Reads the content of this object from the specifiedInputStream
.void
FileHandler. save()
Saves the associated file to the current location set for this object.void
FileHandler. save(java.io.File file)
Saves the associated file to the specifiedFile
.private void
FileHandler. save(java.io.File file, FileLocator locator)
Internal helper method for saving data to the givenFile
.void
FileHandler. save(java.io.OutputStream out)
Saves the associated file to the specified stream using the encoding returned byFileHandler.getEncoding()
.void
FileHandler. save(java.io.OutputStream out, java.lang.String encoding)
Saves the associated file to the specified stream using the specified encoding.private void
FileHandler. save(java.io.OutputStream out, FileLocator locator)
Internal helper method for saving a file to the given output stream.void
FileHandler. save(java.io.Writer out)
Saves the associated file to the givenWriter
.void
FileHandler. save(java.lang.String fileName)
Saves the associated file to the specified file name.private void
FileHandler. save(java.lang.String fileName, FileLocator locator)
Internal helper method for saving data to the given file name.void
FileHandler. save(java.net.URL url)
Saves the associated file to the specified URL.private void
FileHandler. save(java.net.URL url, FileLocator locator)
Internal helper method for saving data to the given URL.private void
FileHandler. save(FileLocator locator)
Internal helper method for saving data to the internal location stored for this object.private void
FileHandler. saveToStream(java.io.OutputStream out, java.lang.String encoding, java.net.URL url)
Internal helper method for saving a file to the given stream.private void
FileHandler. saveToWriter(java.io.Writer out)
Internal helper method for saving a file into the given writer.void
FileBased. write(java.io.Writer out)
Writes the content of this object to the given writer. -
Uses of ConfigurationException in org.apache.commons.configuration2.plist
Methods in org.apache.commons.configuration2.plist that throw ConfigurationException Modifier and Type Method Description void
PropertyListConfiguration. read(java.io.Reader in)
void
XMLPropertyListConfiguration. read(java.io.Reader in)
void
PropertyListConfiguration. write(java.io.Writer out)
void
XMLPropertyListConfiguration. write(java.io.Writer out)
-