Package org.apache.commons.chain.config
Class ConfigRuleSet
java.lang.Object
org.apache.commons.digester.RuleSetBase
org.apache.commons.chain.config.ConfigRuleSet
- All Implemented Interfaces:
org.apache.commons.digester.RuleSet
Digester
RuleSet for configuring Chain of
Responsibility command chains, and adding them to an appropriate
Catalog. The following properties
may be configured prior to executing the addRuleInstance()
method in order to influence the rules that get added, with default
values in square brackets:
- catalogClass -- Fully qualified name of the
implementation class used to create new
Cataloginstances. If not specified, the default value isorg.apache.commons.chain.impl.CatalogBase. - catalogElement -- Name of the XML element representing
the addition of a
Catalog. Any such catalog that is created will be registered with theCatalogFactoryinstance for our application, under the name specified by thenameAttributeattribute (if present), or as the defaultCatalog. If not specified, the default value iscatalog. - chainClass -- Fully qualified name of the implementation
class used to create new
Chaininstances. If not specified, the default value isorg.apache.commons.chain.impl.ChainBase. - chainElement -- Name of the XML element representing
the addition of a
Chain. A chain element has the same functionality as a command element, except that it defaults the implementation class toorg.apache.commons.chain.impl.ChainBase. [chain] - classAttribute -- Attribute on a chain (optional) or command (required) element that specifies the fully qualified class name of the implementation class that should be instantiated. [className]
- commandElement -- Name of the XML element
representing the addition of a
Command. An implementation class name must be provided on the attribute named by theclassAttributeproperty. [command] - defineElement -- Name of the XML element
that associates the element specified by the
nameAttributeattributes with aCommandorChainimplementation class named by theclassAttributeattribute. [define] - nameAttribute -- Attribute on an outermost chain or
command element that will be used to register this command with the
associated
Cataloginstance on the stack. [name] - namespaceURI -- The XML namespace URI with which these
rules will be associated, or
nullfor no namespace. [null]
- Version:
- $Revision$ $Date$
- Author:
- Craig R. McClanahan
-
Field Summary
Fields inherited from class org.apache.commons.digester.RuleSetBase
namespaceURI -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddRuleInstances(org.apache.commons.digester.Digester digester) Add the set of Rule instances defined in this RuleSet to the specifiedDigesterinstance, associating them with our namespace URI (if any).Return the fully qualifiedCatalogimplementation class.Return the element name of a catalog element.Return the fully qualifiedChainimplementation class.Return the element name of a chain element.Return the attribute name of a class attribute.Return the element name of a command element.Return the element name of a define element.Return the attribute name of a name attribute.voidsetCatalogClass(String catalogClass) Set the fully qualifiedCatalogimplementation class.voidsetCatalogElement(String catalogElement) Set the element name of a catalog element.voidsetChainClass(String chainClass) Set the fully qualifiedChainimplementation class.voidsetChainElement(String chainElement) Set the element name of a chain element.voidsetClassAttribute(String classAttribute) Set the attribute name of a class attribute.voidsetCommandElement(String commandElement) Set the element name of a command element.voidsetDefineElement(String defineElement) Set the element name of a define element.voidsetNameAttribute(String nameAttribute) Set the attribute name of a name attribute.Methods inherited from class org.apache.commons.digester.RuleSetBase
getNamespaceURI
-
Constructor Details
-
ConfigRuleSet
public ConfigRuleSet()The Default-Constructor for this class.
-
-
Method Details
-
getCatalogClass
Return the fully qualifiedCatalogimplementation class.- Returns:
- The Catalog's class name.
-
setCatalogClass
Set the fully qualifiedCatalogimplementation class.- Parameters:
catalogClass- The newCatalogimplementation class
-
getCatalogElement
Return the element name of a catalog element.- Returns:
- The element name of a catalog element.
-
setCatalogElement
Set the element name of a catalog element.- Parameters:
catalogElement- The new element name
-
getChainClass
Return the fully qualifiedChainimplementation class.- Returns:
- The Chain's class name.
-
setChainClass
Set the fully qualifiedChainimplementation class.- Parameters:
chainClass- The newChainimplementation class
-
getChainElement
Return the element name of a chain element.- Returns:
- The element name of a catalog element.
-
setChainElement
Set the element name of a chain element.- Parameters:
chainElement- The new element name
-
getClassAttribute
Return the attribute name of a class attribute.- Returns:
- The attribute name of a class attribute.
-
setClassAttribute
Set the attribute name of a class attribute.- Parameters:
classAttribute- The new attribute name
-
getCommandElement
Return the element name of a command element.- Returns:
- The element name of a command element.
-
setCommandElement
Set the element name of a command element.- Parameters:
commandElement- The new element name
-
getDefineElement
Return the element name of a define element.- Returns:
- The element name of a define element.
-
setDefineElement
Set the element name of a define element.- Parameters:
defineElement- The new element name
-
getNameAttribute
Return the attribute name of a name attribute.- Returns:
- The attribute name of an attribute element.
-
setNameAttribute
Set the attribute name of a name attribute.- Parameters:
nameAttribute- The new attribute name
-
addRuleInstances
Add the set of Rule instances defined in this RuleSet to the specifiedDigesterinstance, associating them with our namespace URI (if any). This method should only be called by a Digester instance.- Specified by:
addRuleInstancesin interfaceorg.apache.commons.digester.RuleSet- Specified by:
addRuleInstancesin classorg.apache.commons.digester.RuleSetBase- Parameters:
digester- Digester instance to which the new Rule instances should be added.
-