KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jboss > webservice > metadata > PortComponentMetaData


1 /*
2  * JBoss, the OpenSource J2EE webOS
3  *
4  * Distributable under LGPL license.
5  * See terms of license at gnu.org.
6  */

7
8 // $Id: PortComponentMetaData.java,v 1.10.2.6 2005/06/17 22:33:06 tdiesler Exp $
9
package org.jboss.webservice.metadata;
10
11 // $Id: PortComponentMetaData.java,v 1.10.2.6 2005/06/17 22:33:06 tdiesler Exp $
12

13 import javax.xml.namespace.QName JavaDoc;
14
15 import org.jboss.webservice.metadata.serviceref.HandlerMetaData;
16
17 import java.net.URL JavaDoc;
18 import java.util.ArrayList JavaDoc;
19
20 /**
21  * XML Binding and ws4ee meta-data element for
22  * <code>webservices/webservice-description/port-component</code>
23  * <p/>
24  * A port component is the equivalent of an ordinary Axis service (and
25  * as such it constitutes the building blocks for jaxrpc services).
26  * <p/>
27  *
28  * @author Thomas.Diesler@jboss.org
29  * @since 15-April-2004
30  */

31 public class PortComponentMetaData
32 {
33    /**
34     * The index of the webservice-description in webservices.xml
35     */

36    public static final String JavaDoc PARAMETER_WEBSERVICE_ID = "webserviceID";
37
38    // The parent <webservice-description> element
39
private WebserviceDescriptionMetaData webserviceDescription;
40
41    /** The required <port-component-name> element
42     * This name bears no relationship to the WSDL port name.
43     * This name must be unique amongst all port component names in a module.
44     */

45    private String JavaDoc portComponentName;
46    // The required <wsdl-port> element
47
private QName JavaDoc wsdlPort;
48    // The required <service-endpoint-interface> element
49
private String JavaDoc serviceEndpointInterface;
50    // The required <ejb-link> or <servlet-link> in the <service-impl-bean> element
51
private String JavaDoc ejbLink;
52    private String JavaDoc servletLink;
53    // The optional <handler> elements
54
private ArrayList JavaDoc handlers = new ArrayList JavaDoc();
55
56    // The endpoint implementation bean
57
private String JavaDoc serviceEndpointBean;
58
59    // The updated port service URL
60
private URL JavaDoc serviceEndpointURL;
61
62    /**
63     * Construct a new PortComponentMetaData for a given WebserviceDescriptionMetaData
64     */

65    public PortComponentMetaData(WebserviceDescriptionMetaData webserviceDescription)
66    {
67       this.webserviceDescription = webserviceDescription;
68    }
69
70    public WebserviceDescriptionMetaData getWebserviceDescription()
71    {
72       return webserviceDescription;
73    }
74
75    public String JavaDoc getPortComponentName()
76    {
77       return portComponentName;
78    }
79
80    public void setPortComponentName(String JavaDoc portComponentName)
81    {
82       this.portComponentName = portComponentName;
83    }
84
85    public QName JavaDoc getWsdlPort()
86    {
87       return wsdlPort;
88    }
89
90    public void setWsdlPort(QName JavaDoc wsdlPort)
91    {
92       this.wsdlPort = wsdlPort;
93    }
94
95    public String JavaDoc getEjbLink()
96    {
97       return ejbLink;
98    }
99
100    public void setEjbLink(String JavaDoc ejbLink)
101    {
102       this.ejbLink = ejbLink;
103    }
104
105    public String JavaDoc getServletLink()
106    {
107       return servletLink;
108    }
109
110    public void setServletLink(String JavaDoc servletLink)
111    {
112       this.servletLink = servletLink;
113    }
114
115    public String JavaDoc getServiceEndpointInterface()
116    {
117       return serviceEndpointInterface;
118    }
119
120    public void setServiceEndpointInterface(String JavaDoc serviceEndpointInterface)
121    {
122       this.serviceEndpointInterface = serviceEndpointInterface;
123    }
124
125    public String JavaDoc getServiceEndpointBean()
126    {
127       return serviceEndpointBean;
128    }
129
130    public void setServiceEndpointBean(String JavaDoc serviceEndpointBean)
131    {
132       this.serviceEndpointBean = serviceEndpointBean;
133    }
134
135    public void addHandler(HandlerMetaData handler)
136    {
137       handlers.add(handler);
138    }
139
140    public HandlerMetaData[] getHandlers()
141    {
142       HandlerMetaData[] array = new HandlerMetaData[handlers.size()];
143       handlers.toArray(array);
144       return array;
145    }
146
147    /**
148     * Get the updated web service URL
149     */

150    public URL JavaDoc getServiceEndpointURL()
151    {
152       return serviceEndpointURL;
153    }
154
155    /**
156     * Set the updated web service URL
157     */

158    public void setServiceEndpointURL(URL JavaDoc serviceEndpointURL)
159    {
160       this.serviceEndpointURL = serviceEndpointURL;
161    }
162 }
163
Popular Tags