public class ConfigRuleSet
extends org.apache.commons.digester.RuleSetBase
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:
Catalog
instances.
If not specified, the default value is
org.apache.commons.chain.impl.CatalogBsae
.Catalog
.
Any such catalog that is created will be registered with the
CatalogFactory
instance for our
application, under the name specified by the nameAttribute
attribute (if present), or as the default Catalog
.
If not specified, the default value is catalog
.Chain
instances.
If not specified, the default value is
org.apache.commons.chain.impl.ChainBase
.
Chain
. A chain
element has the same functionality as a command element, except that
it defaults the implementation class to
org.apache.commons.chain.impl.ChainBase
. [chain]Command
.
An implementation class name must be provided on the attribute named by the
classAttribute
property. [command]nameAttribute
attributes with a Command
or
Chain
implementation class
named by the classAttribute
attribute. [define]Catalog
instance on the stack.
[name]null
for no namespace.
[null]Modifier and Type | Field | Description |
---|---|---|
private java.lang.String |
catalogClass |
|
private java.lang.String |
catalogElement |
|
private java.lang.String |
chainClass |
|
private java.lang.String |
chainElement |
|
private java.lang.String |
classAttribute |
|
private java.lang.String |
commandElement |
|
private java.lang.String |
defineElement |
|
private java.lang.String |
nameAttribute |
Constructor | Description |
---|---|
ConfigRuleSet() |
Modifier and Type | Method | Description |
---|---|---|
void |
addRuleInstances(org.apache.commons.digester.Digester digester) |
Add the set of Rule instances defined in this RuleSet to the
specified
Digester instance, associating them with
our namespace URI (if any). |
java.lang.String |
getCatalogClass() |
Return the fully qualified
Catalog
implementation class. |
java.lang.String |
getCatalogElement() |
Return the element name of a catalog element.
|
java.lang.String |
getChainClass() |
Return the fully qualified
Chain
implementation class. |
java.lang.String |
getChainElement() |
Return the element name of a chain element.
|
java.lang.String |
getClassAttribute() |
Return the attribute name of a class attribute.
|
java.lang.String |
getCommandElement() |
Return the element name of a command element.
|
java.lang.String |
getDefineElement() |
Return the element name of a define element.
|
java.lang.String |
getNameAttribute() |
Return the attribute name of a name attribute.
|
void |
setCatalogClass(java.lang.String catalogClass) |
Set the fully qualified
Catalog
implementation class. |
void |
setCatalogElement(java.lang.String catalogElement) |
Set the element name of a catalog element.
|
void |
setChainClass(java.lang.String chainClass) |
Set the fully qualified
Chain
implementation class. |
void |
setChainElement(java.lang.String chainElement) |
Set the element name of a chain element.
|
void |
setClassAttribute(java.lang.String classAttribute) |
Set the attribute name of a class attribute.
|
void |
setCommandElement(java.lang.String commandElement) |
Set the element name of a command element.
|
void |
setDefineElement(java.lang.String defineElement) |
Set the element name of a define element.
|
void |
setNameAttribute(java.lang.String nameAttribute) |
Set the attribute name of a name attribute.
|
private java.lang.String catalogClass
private java.lang.String catalogElement
private java.lang.String chainClass
private java.lang.String chainElement
private java.lang.String classAttribute
private java.lang.String commandElement
private java.lang.String defineElement
private java.lang.String nameAttribute
public java.lang.String getCatalogClass()
Return the fully qualified Catalog
implementation class.
public void setCatalogClass(java.lang.String catalogClass)
Set the fully qualified Catalog
implementation class.
catalogClass
- The new Catalog
implementation classpublic java.lang.String getCatalogElement()
Return the element name of a catalog element.
public void setCatalogElement(java.lang.String catalogElement)
Set the element name of a catalog element.
catalogElement
- The new element namepublic java.lang.String getChainClass()
Return the fully qualified Chain
implementation class.
public void setChainClass(java.lang.String chainClass)
Set the fully qualified Chain
implementation class.
chainClass
- The new Chain
implementation classpublic java.lang.String getChainElement()
Return the element name of a chain element.
public void setChainElement(java.lang.String chainElement)
Set the element name of a chain element.
chainElement
- The new element namepublic java.lang.String getClassAttribute()
Return the attribute name of a class attribute.
public void setClassAttribute(java.lang.String classAttribute)
Set the attribute name of a class attribute.
classAttribute
- The new attribute namepublic java.lang.String getCommandElement()
Return the element name of a command element.
public void setCommandElement(java.lang.String commandElement)
Set the element name of a command element.
commandElement
- The new element namepublic java.lang.String getDefineElement()
Return the element name of a define element.
public void setDefineElement(java.lang.String defineElement)
Set the element name of a define element.
defineElement
- The new element namepublic java.lang.String getNameAttribute()
Return the attribute name of a name attribute.
public void setNameAttribute(java.lang.String nameAttribute)
Set the attribute name of a name attribute.
nameAttribute
- The new attribute namepublic void addRuleInstances(org.apache.commons.digester.Digester digester)
Add the set of Rule instances defined in this RuleSet to the
specified Digester
instance, associating them with
our namespace URI (if any). This method should only be called
by a Digester instance.
addRuleInstances
in class org.apache.commons.digester.RuleSetBase
digester
- Digester instance to which the new Rule instances
should be added.