KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > geronimo > axis > server > ReadOnlyServiceDesc


1 /**
2  * Licensed to the Apache Software Foundation (ASF) under one or more
3  * contributor license agreements. See the NOTICE file distributed with
4  * this work for additional information regarding copyright ownership.
5  * The ASF licenses this file to You under the Apache License, Version 2.0
6  * (the "License"); you may not use this file except in compliance with
7  * the License. You may obtain a copy of the License at
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  */

17 package org.apache.geronimo.axis.server;
18
19 import java.io.Externalizable JavaDoc;
20 import java.io.IOException JavaDoc;
21 import java.io.ObjectInput JavaDoc;
22 import java.io.ObjectOutput JavaDoc;
23 import java.util.ArrayList JavaDoc;
24 import java.util.Iterator JavaDoc;
25 import java.util.List JavaDoc;
26
27 import javax.xml.namespace.QName JavaDoc;
28
29 import org.apache.axis.constants.Style;
30 import org.apache.axis.constants.Use;
31 import org.apache.axis.description.JavaServiceDesc;
32 import org.apache.axis.description.OperationDesc;
33 import org.apache.axis.description.TypeDesc;
34 import org.apache.axis.encoding.TypeMapping;
35 import org.apache.axis.encoding.TypeMappingRegistry;
36 import org.apache.geronimo.axis.client.TypeInfo;
37
38 /**
39  * @version $Rev: 476049 $ $Date: 2006-11-16 23:35:17 -0500 (Thu, 16 Nov 2006) $
40  */

41 public class ReadOnlyServiceDesc extends JavaServiceDesc implements Externalizable JavaDoc {
42     private JavaServiceDesc serviceDesc;
43     private List JavaDoc typeInfo;
44
45     /**
46      * Only required as Externalizable.
47      */

48     public ReadOnlyServiceDesc() {
49     }
50
51     public ReadOnlyServiceDesc(JavaServiceDesc serviceDesc, List JavaDoc typeInfo) {
52         this.serviceDesc = serviceDesc;
53         this.typeInfo = typeInfo;
54     }
55
56     public Class JavaDoc getImplClass() {
57         return serviceDesc.getImplClass();
58     }
59
60     public void setImplClass(Class JavaDoc implClass) {
61         serviceDesc.setImplClass(implClass);
62     }
63
64     public ArrayList JavaDoc getStopClasses() {
65         return serviceDesc.getStopClasses();
66     }
67
68     public void setStopClasses(ArrayList JavaDoc stopClasses) {
69     }
70
71     public void loadServiceDescByIntrospection() {
72         serviceDesc.loadServiceDescByIntrospection();
73     }
74
75     public void loadServiceDescByIntrospection(Class JavaDoc implClass) {
76         serviceDesc.loadServiceDescByIntrospection(implClass);
77     }
78
79     public void loadServiceDescByIntrospection(Class JavaDoc cls, TypeMapping tm) {
80         serviceDesc.loadServiceDescByIntrospection(cls, tm);
81     }
82
83     public Style getStyle() {
84         return serviceDesc.getStyle();
85     }
86
87     public void setStyle(Style style) {
88     }
89
90     public Use getUse() {
91         return serviceDesc.getUse();
92     }
93
94     public void setUse(Use use) {
95     }
96
97     public String JavaDoc getWSDLFile() {
98         return serviceDesc.getWSDLFile();
99     }
100
101     public void setWSDLFile(String JavaDoc wsdlFileName) {
102     }
103
104     public List JavaDoc getAllowedMethods() {
105         return serviceDesc.getAllowedMethods();
106     }
107
108     public void setAllowedMethods(List JavaDoc allowedMethods) {
109     }
110
111     public TypeMapping getTypeMapping() {
112         return serviceDesc.getTypeMapping();
113     }
114
115     public void setTypeMapping(TypeMapping tm) {
116     }
117
118     public String JavaDoc getName() {
119         return serviceDesc.getName();
120     }
121
122     public void setName(String JavaDoc name) {
123     }
124
125     public String JavaDoc getDocumentation() {
126         return serviceDesc.getDocumentation();
127     }
128
129     public void setDocumentation(String JavaDoc documentation) {
130     }
131
132     public void removeOperationDesc(OperationDesc operation) {
133     }
134
135     public void addOperationDesc(OperationDesc operation) {
136     }
137
138     public ArrayList JavaDoc getOperations() {
139         return serviceDesc.getOperations();
140     }
141
142     public OperationDesc[] getOperationsByName(String JavaDoc methodName) {
143         return serviceDesc.getOperationsByName(methodName);
144     }
145
146     public OperationDesc getOperationByName(String JavaDoc methodName) {
147         return serviceDesc.getOperationByName(methodName);
148     }
149
150     public OperationDesc getOperationByElementQName(QName JavaDoc qname) {
151         return serviceDesc.getOperationByElementQName(qname);
152     }
153
154     public OperationDesc[] getOperationsByQName(QName JavaDoc qname) {
155         return serviceDesc.getOperationsByQName(qname);
156     }
157
158     public void setNamespaceMappings(List JavaDoc namespaces) {
159     }
160
161     public String JavaDoc getDefaultNamespace() {
162         return serviceDesc.getDefaultNamespace();
163     }
164
165     public void setDefaultNamespace(String JavaDoc namespace) {
166     }
167
168     public void setProperty(String JavaDoc name, Object JavaDoc value) {
169         serviceDesc.setProperty(name, value);
170     }
171
172     public Object JavaDoc getProperty(String JavaDoc name) {
173         return serviceDesc.getProperty(name);
174     }
175
176     public String JavaDoc getEndpointURL() {
177         return serviceDesc.getEndpointURL();
178     }
179
180     public void setEndpointURL(String JavaDoc endpointURL) {
181     }
182
183     public TypeMappingRegistry getTypeMappingRegistry() {
184         return serviceDesc.getTypeMappingRegistry();
185     }
186
187     public void setTypeMappingRegistry(TypeMappingRegistry tmr) {
188     }
189
190     public boolean isInitialized() {
191         return serviceDesc.isInitialized();
192     }
193
194     public boolean isWrapped() {
195         return serviceDesc.isWrapped();
196     }
197
198     public List JavaDoc getDisallowedMethods() {
199         return serviceDesc.getDisallowedMethods();
200     }
201
202     public void setDisallowedMethods(List JavaDoc disallowedMethods) {
203     }
204
205     public void readExternal(ObjectInput JavaDoc in) throws IOException JavaDoc, ClassNotFoundException JavaDoc {
206         typeInfo = (List JavaDoc) in.readObject();
207         
208         // one must register the TypeDesc before to deserialize the JavaServiceDesc
209
// as it contains a bunch of BeanXXXFactory instances which need
210
// them registered to properly recreate the state of the factories.
211
for (Iterator JavaDoc iter = typeInfo.iterator(); iter.hasNext();) {
212             TypeInfo info = (TypeInfo) iter.next();
213             TypeDesc.registerTypeDescForClass(info.getClazz(), info.buildTypeDesc());
214         }
215         
216         serviceDesc = (JavaServiceDesc) in.readObject();
217     }
218
219     public void writeExternal(ObjectOutput JavaDoc out) throws IOException JavaDoc {
220         out.writeObject(typeInfo);
221         out.writeObject(serviceDesc);
222     }
223 }
224
Popular Tags