FileDocCategorySizeDatePackage
NamingRuleSet.javaAPI DocGlassfish v2 API6470Fri May 04 22:32:30 BST 2007org.apache.catalina.startup

NamingRuleSet

public class NamingRuleSet extends com.sun.org.apache.commons.digester.RuleSetBase

RuleSet for processing the JNDI Enterprise Naming Context resource declaration elements.

author
Craig R. McClanahan
author
Remy Maucherat
version
$Revision: 1.4 $ $Date: 2007/05/05 05:32:29 $

Fields Summary
protected String
prefix
The matching pattern prefix to use for recognizing our elements.
Constructors Summary
public NamingRuleSet()
Construct an instance of this RuleSet with the default matching pattern prefix.



    // ------------------------------------------------------------ Constructor


                     
      

        this("");

    
public NamingRuleSet(String prefix)
Construct an instance of this RuleSet with the specified matching pattern prefix.

param
prefix Prefix for matching pattern rules (including the trailing slash character)


        super();
        this.namespaceURI = null;
        this.prefix = prefix;

    
Methods Summary
public voidaddRuleInstances(com.sun.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.

param
digester Digester instance to which the new Rule instances should be added.


        digester.addObjectCreate(prefix + "Ejb",
                                 "org.apache.catalina.deploy.ContextEjb");
        digester.addSetProperties(prefix + "Ejb");
        digester.addSetNext(prefix + "Ejb",
                            "addEjb",
                            "org.apache.catalina.deploy.ContextEjb");

        digester.addObjectCreate(prefix + "Environment",
                                 "org.apache.catalina.deploy.ContextEnvironment");
        digester.addSetProperties(prefix + "Environment");
        digester.addSetNext(prefix + "Environment",
                            "addEnvironment",
                            "org.apache.catalina.deploy.ContextEnvironment");

        digester.addObjectCreate(prefix + "LocalEjb",
                                 "org.apache.catalina.deploy.ContextLocalEjb");
        digester.addSetProperties(prefix + "LocalEjb");
        digester.addSetNext(prefix + "LocalEjb",
                            "addLocalEjb",
                            "org.apache.catalina.deploy.ContextLocalEjb");

        digester.addObjectCreate(prefix + "Resource",
                                 "org.apache.catalina.deploy.ContextResource");
        digester.addSetProperties(prefix + "Resource");
        digester.addSetNext(prefix + "Resource",
                            "addResource",
                            "org.apache.catalina.deploy.ContextResource");

        digester.addCallMethod(prefix + "ResourceEnvRef",
                               "addResourceEnvRef", 2);
        digester.addCallParam(prefix + "ResourceEnvRef/name", 0);
        digester.addCallParam(prefix + "ResourceEnvRef/type", 1);

        digester.addObjectCreate(prefix + "ResourceParams",
                                 "org.apache.catalina.deploy.ResourceParams");
        digester.addSetProperties(prefix + "ResourceParams");
        digester.addSetNext(prefix + "ResourceParams",
                            "addResourceParams",
                            "org.apache.catalina.deploy.ResourceParams");

        digester.addCallMethod(prefix + "ResourceParams/parameter",
                               "addParameter", 2);
        digester.addCallParam(prefix + "ResourceParams/parameter/name", 0);
        digester.addCallParam(prefix + "ResourceParams/parameter/value", 1);