Save This Page
Home » glassfish-v2ur2-b04-src » org.apache » tomcat » util » digester » [javadoc | source]
org.apache.tomcat.util.digester
abstract public class: AbstractRulesImpl [javadoc | source]
java.lang.Object
   org.apache.tomcat.util.digester.AbstractRulesImpl

All Implemented Interfaces:
    Rules

AbstractRuleImpl provides basic services for Rules implementations. Extending this class should make it easier to create a Rules implementation.

AbstractRuleImpl manages the Digester and namespaceUri properties. If the subclass overrides #registerRule (rather than #add ), then the Digester and namespaceURI of the Rule will be set correctly before it is passed to registerRule. The subclass can then perform whatever it needs to do to register the rule.

Method from org.apache.tomcat.util.digester.AbstractRulesImpl Summary:
add,   clear,   getDigester,   getNamespaceURI,   match,   match,   registerRule,   rules,   setDigester,   setNamespaceURI
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.apache.tomcat.util.digester.AbstractRulesImpl Detail:
 public  void add(String pattern,
    Rule rule) 
    Registers a new Rule instance matching the specified pattern. This implementation sets the Digester and the namespaceURI on the Rule before calling #registerRule .
 abstract public  void clear()
    Clear all existing Rule instance registrations.
 public Digester getDigester() 
    Return the Digester instance with which this Rules instance is associated.
 public String getNamespaceURI() 
    Return the namespace URI that will be applied to all subsequently added Rule objects.
 public List match(String pattern) 
Deprecated! Call - match(namespaceURI,pattern) instead.

    Return a List of all registered Rule instances that match the specified nesting pattern, or a zero-length List if there are no matches. If more than one Rule instance matches, they must be returned in the order originally registered through the add() method.
 abstract public List match(String namespaceURI,
    String pattern)
    Return a List of all registered Rule instances that match the specified nesting pattern, or a zero-length List if there are no matches. If more than one Rule instance matches, they must be returned in the order originally registered through the add() method.
 abstract protected  void registerRule(String pattern,
    Rule rule)
    Register rule at given pattern. The the Digester and namespaceURI properties of the given Rule can be assumed to have been set properly before this method is called.
 abstract public List rules()
    Return a List of all registered Rule instances, or a zero-length List if there are no registered Rule instances. If more than one Rule instance has been registered, they must be returned in the order originally registered through the add() method.
 public  void setDigester(Digester digester) 
    Set the Digester instance with which this Rules instance is associated.
 public  void setNamespaceURI(String namespaceURI) 
    Set the namespace URI that will be applied to all subsequently added Rule objects.