01: /**
02: * JOnAS: Java(TM) Open Application Server
03: * Copyright (C) 2004 Bull S.A.
04: * Contact: jonas-team@objectweb.org
05: *
06: * This library is free software; you can redistribute it and/or
07: * modify it under the terms of the GNU Lesser General Public
08: * License as published by the Free Software Foundation; either
09: * version 2.1 of the License, or 1any later version.
10: *
11: * This library is distributed in the hope that it will be useful,
12: * but WITHOUT ANY WARRANTY; without even the implied warranty of
13: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14: * Lesser General Public License for more details.
15: *
16: * You should have received a copy of the GNU Lesser General Public
17: * License along with this library; if not, write to the Free Software
18: * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
19: * USA
20: *
21: * Initial developer: Florent BENOIT
22: * --------------------------------------------------------------------------
23: * $Id: WebAppRuleSet.java 5202 2004-07-29 12:20:26Z benoitf $
24: * --------------------------------------------------------------------------
25: */package org.objectweb.jonas_web.deployment.rules;
26:
27: import org.apache.commons.digester.Digester;
28: import org.objectweb.jonas_lib.deployment.rules.EnvironmentRuleSet;
29: import org.objectweb.jonas_lib.deployment.rules.JRuleSetBase;
30: import org.objectweb.jonas_lib.deployment.rules.MessageDestinationRuleSet;
31: import org.objectweb.jonas_lib.deployment.rules.SecurityRoleRuleSet;
32:
33: /**
34: * This class defines rules to analyze web.xml file
35: * @author Florent Benoit
36: */
37: public class WebAppRuleSet extends JRuleSetBase {
38:
39: /**
40: * Construct an object
41: */
42: public WebAppRuleSet() {
43: super ("web-app/");
44: }
45:
46: /**
47: * Add a set of rules to the digester object
48: * @param digester Digester instance
49: */
50: public void addRuleInstances(Digester digester) {
51: digester.addCallMethod(prefix + "display-name",
52: "setDisplayName", 0);
53: digester.addRuleSet(new ServletRuleSet(prefix));
54: digester.addRuleSet(new ServletMappingRuleSet(prefix));
55: digester.addRuleSet(new SecurityConstraintRuleSet(prefix));
56: digester.addRuleSet(new SecurityRoleRuleSet(prefix));
57: digester.addRuleSet(new EnvironmentRuleSet(prefix));
58: digester.addRuleSet(new MessageDestinationRuleSet(prefix));
59: digester.addRuleSet(new DistributableRuleSet(prefix));
60:
61: }
62:
63: }
|