类 XmlFactoryConfiguration
java.lang.Object
org.apache.velocity.tools.config.Configuration
org.apache.velocity.tools.config.CompoundConfiguration<ToolboxConfiguration>
org.apache.velocity.tools.config.FactoryConfiguration
org.apache.velocity.tools.config.FileFactoryConfiguration
org.apache.velocity.tools.config.XmlFactoryConfiguration
- 所有已实现的接口:
Comparable<Configuration>
This reads in configuration info formatted as an XML file
using Commons-Digester. This uses
XmlFactoryConfigurationRuleSet as the default set of rules
for processing the XML. However, you may always change this by
passing a new RuleSet to the setRuleSet(org.apache.commons.digester3.RuleSet) method.
See the configuration documentation on the main web site for
instructions on the XML format supported by the default rules.
Example usage:
FactoryConfiguration cfg = new XmlFactoryConfiguration("Dev Tools");
cfg.read("devtools.xml");
ToolboxFactory factory = cfg.createFactory();
- 版本:
- $Id: XmlFactoryConfiguration.java 511959 2007-02-26 19:24:39Z nbubna $
- 作者:
- Nathan Bubna
-
构造器概要
构造器构造器说明Creates an instanceCreates an instance using the specified string as an identifier to distinguish this instance when debugging -
方法概要
修饰符和类型方法说明org.apache.commons.digester3.RuleSetRetrieves the rule set Digester should use to parse and load the toolbox for this manager.protected voidReads an XML document from anURLand uses it to configure thisFactoryConfiguration.voidsetRuleSet(org.apache.commons.digester3.RuleSet rules) Sets theRuleSetthis loader will use to digest the xml toolbox.从类继承的方法 org.apache.velocity.tools.config.FileFactoryConfiguration
findURL, read, read, read, read, read, read从类继承的方法 org.apache.velocity.tools.config.FactoryConfiguration
addConfiguration, addData, addSource, addToolbox, createFactory, equals, getData, getData, getData, getSource, getSources, getToolbox, getToolboxes, hasData, hashCode, removeData, removeToolbox, setData, setSource, setToolboxes, toString, toString, validate从类继承的方法 org.apache.velocity.tools.config.CompoundConfiguration
addChild, addConfiguration, appendChildren, getChild, getChildren, hasChildren, removeChild, setChildren从类继承的方法 org.apache.velocity.tools.config.Configuration
addConfiguration, addProperty, appendProperties, compareTo, getProperties, getProperty, getPropertyMap, hasProperties, removeProperty, removeProperty, setProperties, setProperty, setPropertyMap
-
构造器详细资料
-
XmlFactoryConfiguration
public XmlFactoryConfiguration()Creates an instance -
XmlFactoryConfiguration
Creates an instance using the specified string as an identifier to distinguish this instance when debugging- 参数:
id- the name of the "source" of this instance- 另请参阅:
-
-
方法详细资料
-
setRuleSet
public void setRuleSet(org.apache.commons.digester3.RuleSet rules) Sets theRuleSetthis loader will use to digest the xml toolbox.- 参数:
rules- rules set
-
getRuleSet
public org.apache.commons.digester3.RuleSet getRuleSet()Retrieves the rule set Digester should use to parse and load the toolbox for this manager.
- 返回:
- rules set
-
readImpl
Reads an XML document from an
URLand uses it to configure thisFactoryConfiguration.- 指定者:
readImpl在类中FileFactoryConfiguration- 参数:
url- the URL to read from- 抛出:
IOException- if a problem occurs
-