MCPcopy Index your code
hub / github.com/apache/tomcat / NamingRuleSet

Class NamingRuleSet

java/org/apache/catalina/startup/NamingRuleSet.java:25–96  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

23 * <strong>RuleSet</strong> for processing the JNDI Enterprise Naming Context resource declaration elements.
24 */
25public class NamingRuleSet implements RuleSet {
26
27 // ----------------------------------------------------- Instance Variables
28
29 /**
30 * The matching pattern prefix to use for recognizing our elements.
31 */
32 protected final String prefix;
33
34
35 // ------------------------------------------------------------ Constructor
36
37 /**
38 * Construct an instance of this <code>RuleSet</code> with the default matching pattern prefix.
39 */
40 public NamingRuleSet() {
41 this("");
42 }
43
44
45 /**
46 * Construct an instance of this <code>RuleSet</code> with the specified matching pattern prefix.
47 *
48 * @param prefix Prefix for matching pattern rules (including the trailing slash character)
49 */
50 public NamingRuleSet(String prefix) {
51 this.prefix = prefix;
52 }
53
54
55 // --------------------------------------------------------- Public Methods
56
57 @Override
58 public void addRuleInstances(Digester digester) {
59
60 digester.addObjectCreate(prefix + "Ejb", "org.apache.tomcat.util.descriptor.web.ContextEjb");
61 digester.addSetProperties(prefix + "Ejb");
62 digester.addRule(prefix + "Ejb",
63 new SetNextNamingRule("addEjb", "org.apache.tomcat.util.descriptor.web.ContextEjb"));
64
65 digester.addObjectCreate(prefix + "Environment", "org.apache.tomcat.util.descriptor.web.ContextEnvironment");
66 digester.addSetProperties(prefix + "Environment");
67 digester.addRule(prefix + "Environment",
68 new SetNextNamingRule("addEnvironment", "org.apache.tomcat.util.descriptor.web.ContextEnvironment"));
69
70 digester.addObjectCreate(prefix + "LocalEjb", "org.apache.tomcat.util.descriptor.web.ContextLocalEjb");
71 digester.addSetProperties(prefix + "LocalEjb");
72 digester.addRule(prefix + "LocalEjb",
73 new SetNextNamingRule("addLocalEjb", "org.apache.tomcat.util.descriptor.web.ContextLocalEjb"));
74
75 digester.addObjectCreate(prefix + "Resource", "org.apache.tomcat.util.descriptor.web.ContextResource");
76 digester.addSetProperties(prefix + "Resource");
77 digester.addRule(prefix + "Resource",
78 new SetNextNamingRule("addResource", "org.apache.tomcat.util.descriptor.web.ContextResource"));
79
80 digester.addObjectCreate(prefix + "ResourceEnvRef",
81 "org.apache.tomcat.util.descriptor.web.ContextResourceEnvRef");
82 digester.addSetProperties(prefix + "ResourceEnvRef");

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected