|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.opensaml.xml.XMLConfigurator
public class XMLConfigurator
Reads in an XML configuration and configures the XMLTooling library accordingly.
Field Summary | |
---|---|
private Schema |
configurationSchema
Schema used to validate configruation files. |
private Logger |
log
Class logger. |
private BasicParserPool |
parserPool
Pool of parsers used to read and validate configurations. |
private boolean |
retainXMLConfiguration
Whether the XML configuration elements that configured object providers should be retained. |
Constructor Summary | |
---|---|
XMLConfigurator()
Constructor. |
|
XMLConfigurator(boolean retainXML)
Deprecated. this method will be removed once Configuration no longer has the option to store the XML configuration fragements |
Method Summary | |
---|---|
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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private final Logger log
private boolean retainXMLConfiguration
private BasicParserPool parserPool
private Schema configurationSchema
Constructor Detail |
---|
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 fragements
retainXML
- whether to retain the XML configuration elements within the Configuration
.
ConfigurationException
- thrown if the validation schema for configuration files can not be createdMethod Detail |
---|
public void load(File configurationFile) throws ConfigurationException
configurationFile
- the configuration file(s) to be loaded
ConfigurationException
- thrown if the configuration file(s) can not be be read or invalidpublic void load(InputStream configurationStream) throws ConfigurationException
configurationStream
- configuration stream
ConfigurationException
- thrown if the given configuration is invalid or can not be readpublic void load(Document configuration) throws ConfigurationException
configuration
- the configurationd document
ConfigurationException
- thrown if the configuration file(s) can not be be read or invalidprotected void load(Element configurationRoot) throws ConfigurationException
configurationRoot
- root of the configuration
ConfigurationException
- thrown if there is a problem processing the configurationprotected void initializeObjectProviders(Element objectProviders) throws ConfigurationException
objectProviders
- the configuration for the various object providers
ConfigurationException
- thrown if the configuration elements are invalidprotected void initializeValidatorSuites(Element validatorSuitesElement) throws ConfigurationException
validatorSuitesElement
- the ValidatorSuites element from the configuration file
ConfigurationException
- 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 file
ConfigurationException
- 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 element
ConfigurationException
- thrown if the class can not be instaniatedprotected void validateConfiguration(Document configuration) throws ConfigurationException
configuration
- the configuration to validate
ConfigurationException
- thrown if the configuration is not schema-valid
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |