KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jboss > webservice > metadata > jaxrpcmapping > ServiceEndpointInterfaceMapping


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

7 package org.jboss.webservice.metadata.jaxrpcmapping;
8
9 // $Id: ServiceEndpointInterfaceMapping.java,v 1.2 2004/08/13 15:31:34 tdiesler Exp $
10

11 import javax.xml.namespace.QName JavaDoc;
12 import java.util.ArrayList JavaDoc;
13 import java.util.Iterator JavaDoc;
14
15 /**
16  * XML mapping of the java-wsdl-mapping/service-endpoint-interface-mapping element.
17  *
18  * @author Thomas.Diesler@jboss.org
19  * @since 14-May-2004
20  */

21 public class ServiceEndpointInterfaceMapping
22 {
23    // The parent <java-wsdl-mapping> element
24
private JavaWsdlMapping javaWsdlMapping;
25
26    // The required <service-endpoint-interface> element
27
private String JavaDoc serviceEndpointInterface;
28    // The required <wsdl-port-type> element
29
private QName JavaDoc wsdlPortType;
30    // The required <wsdl-binding> element
31
private QName JavaDoc wsdlBinding;
32    // Zero or more <service-endpoint-method-mapping> elements
33
private ArrayList JavaDoc serviceEndpointMethodMappings = new ArrayList JavaDoc();
34
35    public ServiceEndpointInterfaceMapping(JavaWsdlMapping javaWsdlMapping)
36    {
37       this.javaWsdlMapping = javaWsdlMapping;
38    }
39
40    public JavaWsdlMapping getJavaWsdlMapping()
41    {
42       return javaWsdlMapping;
43    }
44
45    public String JavaDoc getServiceEndpointInterface()
46    {
47       return serviceEndpointInterface;
48    }
49
50    public void setServiceEndpointInterface(String JavaDoc serviceEndpointInterface)
51    {
52       this.serviceEndpointInterface = serviceEndpointInterface;
53    }
54
55    public QName JavaDoc getWsdlPortType()
56    {
57       return wsdlPortType;
58    }
59
60    public void setWsdlPortType(QName JavaDoc wsdlPortType)
61    {
62       this.wsdlPortType = wsdlPortType;
63    }
64
65    public QName JavaDoc getWsdlBinding()
66    {
67       return wsdlBinding;
68    }
69
70    public void setWsdlBinding(QName JavaDoc wsdlBinding)
71    {
72       this.wsdlBinding = wsdlBinding;
73    }
74
75    public ServiceEndpointMethodMapping[] getServiceEndpointMethodMappings()
76    {
77       ServiceEndpointMethodMapping[] arr = new ServiceEndpointMethodMapping[serviceEndpointMethodMappings.size()];
78       serviceEndpointMethodMappings.toArray(arr);
79       return arr;
80    }
81
82    public void addServiceEndpointMethodMapping(ServiceEndpointMethodMapping serviceEndpointMethodMapping)
83    {
84       serviceEndpointMethodMappings.add(serviceEndpointMethodMapping);
85    }
86
87    public ServiceEndpointMethodMapping getServiceEndpointMethodMappingByWsdlOperation(String JavaDoc wsdlOperation)
88    {
89       ServiceEndpointMethodMapping semMapping = null;
90
91       Iterator JavaDoc it = serviceEndpointMethodMappings.iterator();
92       while (it.hasNext())
93       {
94          ServiceEndpointMethodMapping aux = (ServiceEndpointMethodMapping)it.next();
95          if (aux.getWsdlOperation().equals(wsdlOperation))
96             semMapping = aux;
97       }
98       return semMapping;
99    }
100 }
101
Popular Tags