01: /**
02: * JOnAS: Java(TM) Open Application Server
03: * Copyright (C) 1999-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: * --------------------------------------------------------------------------
22: * $Id: JonasServiceRefRuleSet.java 5408 2004-09-10 11:37:56Z sauthieg $
23: * --------------------------------------------------------------------------
24: */package org.objectweb.jonas_lib.deployment.rules;
25:
26: import org.apache.commons.digester.Digester;
27:
28: /**
29: * This class defines a rule to analyze element jonas-service-ref
30: * @author Florent Benoit
31: */
32: public class JonasServiceRefRuleSet extends JRuleSetBase {
33:
34: /**
35: * Construct an object with a specific prefix
36: * @param prefix prefix to use during the parsing
37: */
38: public JonasServiceRefRuleSet(String prefix) {
39: super (prefix);
40: }
41:
42: /**
43: * Add a set of rules to the digester object
44: * @param digester Digester instance
45: */
46: public void addRuleInstances(Digester digester) {
47: digester
48: .addObjectCreate(prefix + "jonas-service-ref",
49: "org.objectweb.jonas_lib.deployment.xml.JonasServiceRef");
50: digester
51: .addSetNext(prefix + "jonas-service-ref",
52: "addJonasServiceRef",
53: "org.objectweb.jonas_lib.deployment.xml.JonasServiceRef");
54:
55: // jonas-service-ref/service-ref-name
56: digester.addCallMethod(prefix
57: + "jonas-service-ref/service-ref-name",
58: "setServiceRefName", 0);
59:
60: // jonas-service-ref/alt-wsdl
61: digester.addCallMethod(prefix + "jonas-service-ref/alt-wsdl",
62: "setAltWsdl", 0);
63:
64: // jonas-service-ref/jonas-init-param*
65: digester.addRuleSet(new JonasCustomParamRuleSet(prefix
66: + "jonas-service-ref/", "jonas-init-param",
67: "JonasInitParam"));
68: // jonas-service-ref/jonas-port-component-ref*
69: digester.addRuleSet(new JonasPortComponentRefRuleSet(prefix
70: + "jonas-service-ref/"));
71: }
72:
73: }
|