01: /**
02: * JOnAS: Java(TM) Open Application Server
03: * Copyright (C) 2003-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: WsClientGenerator.java 5590 2004-10-11 13:16:15Z benoitf $
23: * --------------------------------------------------------------------------
24: */package org.objectweb.jonas_ws.wsgen.generator;
25:
26: import org.objectweb.jonas_lib.genbase.GenBaseException;
27: import org.objectweb.jonas_lib.genbase.archive.Archive;
28: import org.objectweb.jonas_lib.genbase.generator.Config;
29:
30: import org.objectweb.jonas_ws.deployment.api.ServiceRefDesc;
31: import org.objectweb.jonas_ws.wsgen.ddmodifier.WsClientDDModifier;
32:
33: /**
34: * Generate sources and/or config for WebServices clients.
35: *
36: * @author Guillaume Sauthier
37: */
38: public abstract class WsClientGenerator extends Generator {
39:
40: /** service-ref describing client dependency on a webservice */
41: private ServiceRefDesc ref;
42:
43: /** jonas-service-ref modifier */
44: private WsClientDDModifier modifier;
45:
46: /** archive */
47: private Archive archive;
48:
49: /**
50: * Creates a new WsClientGenerator.
51: *
52: * @param config Generator Configuration
53: * @param serviceRef client dependency on a webservice
54: * @param ddm jonas-service-ref modifier
55: * @param arch modified archive
56: *
57: * @throws GenBaseException When instanciation fails
58: */
59: public WsClientGenerator(Config config, ServiceRefDesc serviceRef,
60: WsClientDDModifier ddm, Archive arch)
61: throws GenBaseException {
62: super (config);
63: ref = serviceRef;
64: modifier = ddm;
65: archive = arch;
66: }
67:
68: /**
69: * @return the archive.
70: */
71: public Archive getArchive() {
72: return archive;
73: }
74:
75: /**
76: * @return the modifier.
77: */
78: public WsClientDDModifier getModifier() {
79: return modifier;
80: }
81:
82: /**
83: * @return the ref.
84: */
85: public ServiceRefDesc getRef() {
86: return ref;
87: }
88: }
|