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 any 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: JonasWebserviceDescriptionRuleSet.java 5607 2004-10-13 14:04:22Z sauthieg $
23: * --------------------------------------------------------------------------
24: */package org.objectweb.jonas_ws.deployment.rules;
25:
26: import org.apache.commons.digester.Digester;
27:
28: import org.objectweb.jonas_lib.deployment.rules.JRuleSetBase;
29:
30: /**
31: * @author Guillaume Sauthier
32: */
33: public class JonasWebserviceDescriptionRuleSet extends JRuleSetBase {
34:
35: /**
36: * Construct an object with a specific prefix
37: * @param prefix prefix to use during the parsing
38: */
39: public JonasWebserviceDescriptionRuleSet(String prefix) {
40: super (prefix);
41: }
42:
43: /**
44: * Add a set of rules to the digester object
45: * @param digester Digester instance
46: */
47: public void addRuleInstances(Digester digester) {
48: digester
49: .addObjectCreate(prefix
50: + "jonas-webservice-description",
51: "org.objectweb.jonas_ws.deployment.xml.JonasWebserviceDescription");
52: digester
53: .addSetNext(prefix + "jonas-webservice-description",
54: "addJonasWebserviceDescription",
55: "org.objectweb.jonas_ws.deployment.xml.JonasWebserviceDescription");
56: digester
57: .addCallMethod(
58: prefix
59: + "jonas-webservice-description/webservice-description-name",
60: "setWebserviceDescriptionName", 0);
61: digester.addCallMethod(prefix
62: + "jonas-webservice-description/default-endpoint-uri",
63: "setDefaultEndpointURI", 0);
64: digester
65: .addCallMethod(
66: prefix
67: + "jonas-webservice-description/wsdl-publish-directory",
68: "setWsdlPublishDirectory", 0);
69:
70: // jonas-port-component
71: digester.addRuleSet(new JonasPortComponentRuleSet(prefix
72: + "jonas-webservice-description/"));
73: }
74:
75: }
|