org.apache.commons.digester.plugins
Class PluginDeclarationRule

java.lang.Object
  extended by org.apache.commons.digester.Rule
      extended by org.apache.commons.digester.plugins.PluginDeclarationRule

public class PluginDeclarationRule
extends Rule

A Digester rule which allows the user to pre-declare a class which is to be referenced later at a plugin point by a PluginCreateRule.

Normally, a PluginDeclarationRule is added to a Digester instance with the pattern "{root}/plugin" or "* /plugin" where {root} is the name of the root tag in the input document.

Since:
1.6

Field Summary
 
Fields inherited from class org.apache.commons.digester.Rule
digester, namespaceURI
 
Constructor Summary
PluginDeclarationRule()
          constructor
 
Method Summary
 void begin(java.lang.String namespace, java.lang.String name, org.xml.sax.Attributes attributes)
          Invoked upon reading a tag defining a plugin declaration.
static void declarePlugin(Digester digester, java.util.Properties props)
           
 
Methods inherited from class org.apache.commons.digester.Rule
begin, body, body, end, end, finish, getDigester, getNamespaceURI, setDigester, setNamespaceURI
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PluginDeclarationRule

public PluginDeclarationRule()
constructor

Method Detail

begin

public void begin(java.lang.String namespace,
                  java.lang.String name,
                  org.xml.sax.Attributes attributes)
           throws java.lang.Exception
Invoked upon reading a tag defining a plugin declaration. The tag must have the following mandatory attributes:

Overrides:
begin in class Rule
Parameters:
namespace - The xml namespace in which the xml element which triggered this rule resides.
name - The name of the xml element which triggered this rule.
attributes - The set of attributes on the xml element which triggered this rule.
Throws:
java.lang.Exception

declarePlugin

public static void declarePlugin(Digester digester,
                                 java.util.Properties props)
                          throws PluginException
Throws:
PluginException


Copyright © 2001-2006 The Apache Software Foundation. All Rights Reserved.