KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > objectweb > jonas > ws > mbean > Service


1 /**
2  * JOnAS: Java(TM) Open Application Server
3  * Copyright (C) 2005 Bull S.A.
4  * Contact: jonas-team@objectweb.org
5  *
6  * This library is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Lesser General Public
8  * License as published by the Free Software Foundation; either
9  * 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$
23  * --------------------------------------------------------------------------
24  */

25 package org.objectweb.jonas.ws.mbean;
26
27 import java.util.ArrayList JavaDoc;
28 import java.util.List JavaDoc;
29
30 /**
31  * A <code>WebService</code> MBean represents a <code>webservice-description</code>
32  * in webservices.xml.
33  *
34  * @author Guillaume Sauthier
35  */

36 public class Service extends AbstractWebServiceMBean {
37
38     /**
39      * Service's name
40      */

41     private String JavaDoc name = null;
42
43     /**
44      * Published WSDL URL
45      */

46     private String JavaDoc wsdlURL = null;
47
48     /**
49      * JAX-RPC mapping file name
50      */

51     private String JavaDoc mappingFilename = null;
52
53     /**
54      * WSDL file name
55      */

56     private String JavaDoc wsdlFilename = null;
57
58     /**
59      * PortComponent MBean list
60      */

61     private List JavaDoc portComponents = new ArrayList JavaDoc();
62
63     /**
64      * PortComponent's ObjectName list
65      */

66     private List JavaDoc portComponentONames = new ArrayList JavaDoc();
67
68     /**
69      * Service Constructor
70      * @param objectName Service's ObjectName
71      */

72     public Service(String JavaDoc objectName) {
73         super(objectName);
74     }
75
76     /**
77      * @return Returns the mappingFile.
78      */

79     public String JavaDoc getMappingFilename() {
80         return mappingFilename;
81     }
82
83     /**
84      * @param mappingFile The mappingFile to set.
85      */

86     public void setMappingFilename(String JavaDoc mappingFile) {
87         this.mappingFilename = mappingFile;
88     }
89
90     /**
91      * @return Returns the wsdlFilename.
92      */

93     public String JavaDoc getWsdlFilename() {
94         return wsdlFilename;
95     }
96
97     /**
98      * @param wsdlFilename The wsdlFilename to set.
99      */

100     public void setWsdlFilename(String JavaDoc wsdlFilename) {
101         this.wsdlFilename = wsdlFilename;
102     }
103
104     /**
105      * @return Returns the name.
106      */

107     public String JavaDoc getName() {
108         return name;
109     }
110
111     /**
112      * @param name The name to set.
113      */

114     public void setName(String JavaDoc name) {
115         this.name = name;
116     }
117
118     /**
119      * @return Returns the wsdlURL.
120      */

121     public String JavaDoc getWsdlURL() {
122         return wsdlURL;
123     }
124
125     /**
126      * @param wsdlURL The wsdlURL to set.
127      */

128     public void setWsdlURL(String JavaDoc wsdlURL) {
129         this.wsdlURL = wsdlURL;
130     }
131
132     /**
133      * @return Returns the portComponents MBean.
134      */

135     public List JavaDoc getPortComponentsMBean() {
136         return portComponents;
137     }
138
139     /**
140      * @return Returns the portComponentONames.
141      */

142     public String JavaDoc[] getPortComponents() {
143         return (String JavaDoc[]) portComponentONames.toArray(new String JavaDoc[portComponentONames.size()]);
144     }
145
146     /**
147      * Add a portComponent
148      * @param pc PortComponent MBean
149      */

150     public void addPortComponentMBean(PortComponent pc) {
151         portComponents.add(pc);
152         portComponentONames.add(pc.getObjectName());
153     }
154
155     /**
156      * @return Returns the Service MBean subtype
157      */

158     protected String JavaDoc getMBeanType() {
159         return WebServicesObjectName.WEBSERVICE_TYPE;
160     }
161
162     /**
163      * @return Returns the childs MBeans (if any)
164      */

165     protected List JavaDoc getChildsMBeans() {
166         return portComponents;
167     }
168
169 }
170
Popular Tags