public class XMLConfigurator extends Object
コンストラクタと説明 |
---|
XMLConfigurator()
Constructor.
|
XMLConfigurator(boolean retainXML)
推奨されていません。
this method will be removed once
Configuration no longer has the option to store the XML configuration fragements |
修飾子とタイプ | メソッドと説明 |
---|---|
protected Object |
createClassInstance(Element configuration)
Constructs an instance of the given class.
|
protected void |
initializeIDAttributes(Element idAttributesElement)
Registers the global ID attributes specified in the configuration file.
|
protected void |
initializeObjectProviders(Element objectProviders)
Intializes the object providers defined in the configuration file.
|
protected void |
initializeValidatorSuites(Element validatorSuitesElement)
Initializes the validator suites specified in the configuration file.
|
void |
load(Document configuration)
Loads the configuration docuement.
|
protected void |
load(Element configurationRoot)
Loads a configuration after it's been schema validated.
|
void |
load(File configurationFile)
Loads the configuration file(s) from the given file.
|
void |
load(InputStream configurationStream)
Loads a configuration file from an input stream.
|
protected void |
validateConfiguration(Document configuration)
Schema validates the given configuration.
|
public XMLConfigurator() throws ConfigurationException
ConfigurationException
- thrown if the validation schema for configuration files can not be createdpublic XMLConfigurator(boolean retainXML) throws ConfigurationException
Configuration
no longer has the option to store the XML configuration fragementsretainXML
- whether to retain the XML configuration elements within the Configuration
.ConfigurationException
- thrown if the validation schema for configuration files can not be createdpublic void load(File configurationFile) throws ConfigurationException
configurationFile
- the configuration file(s) to be loadedConfigurationException
- thrown if the configuration file(s) can not be be read or invalidpublic void load(InputStream configurationStream) throws ConfigurationException
configurationStream
- configuration streamConfigurationException
- thrown if the given configuration is invalid or can not be readpublic void load(Document configuration) throws ConfigurationException
configuration
- the configurationd documentConfigurationException
- thrown if the configuration file(s) can not be be read or invalidprotected void load(Element configurationRoot) throws ConfigurationException
configurationRoot
- root of the configurationConfigurationException
- thrown if there is a problem processing the configurationprotected void initializeObjectProviders(Element objectProviders) throws ConfigurationException
objectProviders
- the configuration for the various object providersConfigurationException
- thrown if the configuration elements are invalidprotected void initializeValidatorSuites(Element validatorSuitesElement) throws ConfigurationException
validatorSuitesElement
- the ValidatorSuites element from the configuration fileConfigurationException
- thrown if there is a problem initializing the validator suites, usually because of
malformed elementsprotected void initializeIDAttributes(Element idAttributesElement) throws ConfigurationException
idAttributesElement
- the IDAttributes element from the configuration fileConfigurationException
- thrown if there is a problem with a parsing or registering the the ID attributeprotected Object createClassInstance(Element configuration) throws ConfigurationException
configuration
- the current configuration elementConfigurationException
- thrown if the class can not be instaniatedprotected void validateConfiguration(Document configuration) throws ConfigurationException
configuration
- the configuration to validateConfigurationException
- thrown if the configuration is not schema-validCopyright © 2012. All Rights Reserved.