KickJava   Java API By Example, From Geeks To Geeks.

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


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: ServiceEndpointMethodMapping.java,v 1.1.4.1 2005/06/17 22:31:50 tdiesler Exp $
10

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

19 public class ServiceEndpointMethodMapping
20 {
21    // The parent <service-endpoint-interface-mapping> element
22
private ServiceEndpointInterfaceMapping serviceEndpointInterfaceMapping;
23
24    // The required <java-method-name> element
25
private String JavaDoc javaMethodName;
26    // The required <wsdl-operation> element
27
private String JavaDoc wsdlOperation;
28    // The optional <wrapped-element> element
29
private boolean wrappedElement;
30    // Zero or more <method-param-parts-mapping> elements
31
private ArrayList JavaDoc methodParamPartsMappings = new ArrayList JavaDoc();
32    // The optional <wsdl-return-value-mapping> element
33
private WsdlReturnValueMapping wsdlReturnValueMapping;
34
35    public ServiceEndpointMethodMapping(ServiceEndpointInterfaceMapping serviceEndpointInterfaceMapping)
36    {
37       this.serviceEndpointInterfaceMapping = serviceEndpointInterfaceMapping;
38    }
39
40    public ServiceEndpointInterfaceMapping getServiceEndpointInterfaceMapping()
41    {
42       return serviceEndpointInterfaceMapping;
43    }
44
45    public String JavaDoc getJavaMethodName()
46    {
47       return javaMethodName;
48    }
49
50    public void setJavaMethodName(String JavaDoc javaMethodName)
51    {
52       this.javaMethodName = javaMethodName;
53    }
54
55    public MethodParamPartsMapping[] getMethodParamPartsMappings()
56    {
57       MethodParamPartsMapping[] arr = new MethodParamPartsMapping[methodParamPartsMappings.size()];
58       methodParamPartsMappings.toArray(arr);
59       return arr;
60    }
61
62    public MethodParamPartsMapping getMethodParamPartsMappingByPartName(String JavaDoc partName)
63    {
64       MethodParamPartsMapping paramMapping = null;
65       for (int i = 0; paramMapping == null && i < methodParamPartsMappings.size(); i++)
66       {
67          MethodParamPartsMapping aux = (MethodParamPartsMapping)methodParamPartsMappings.get(i);
68          if (aux.getWsdlMessageMapping().getWsdlMessagePartName().equals(partName))
69             paramMapping = aux;
70       }
71       return paramMapping;
72    }
73
74    public void addMethodParamPartsMapping(MethodParamPartsMapping methodParamPartsMapping)
75    {
76       methodParamPartsMappings.add(methodParamPartsMapping);
77    }
78
79    public boolean isWrappedElement()
80    {
81       return wrappedElement;
82    }
83
84    public void setWrappedElement(boolean wrappedElement)
85    {
86       this.wrappedElement = wrappedElement;
87    }
88
89    public String JavaDoc getWsdlOperation()
90    {
91       return wsdlOperation;
92    }
93
94    public void setWsdlOperation(String JavaDoc wsdlOperation)
95    {
96       this.wsdlOperation = wsdlOperation;
97    }
98
99    public WsdlReturnValueMapping getWsdlReturnValueMapping()
100    {
101       return wsdlReturnValueMapping;
102    }
103
104    public void setWsdlReturnValueMapping(WsdlReturnValueMapping wsdlReturnValueMapping)
105    {
106       this.wsdlReturnValueMapping = wsdlReturnValueMapping;
107    }
108 }
109
Popular Tags