1
2
3
4
5
6
7
8 package it.imolinfo.jbi4corba.webservice.descriptor;
9
10 import it.imolinfo.jbi4corba.jbi.endpoint.ProviderEndpoint;
11 import it.imolinfo.jbi4corba.webservice.generator.ChildFirstClassLoader;
12 import it.imolinfo.jbi4corba.webservice.generator.InterfaceType;
13 import it.imolinfo.jbi4corba.webservice.generator.MethodSignature;
14 import it.imolinfo.jbi4corba.webservice.generator.SearchedType;
15 import it.imolinfo.jbi4corba.webservice.generator.UnionType;
16 import it.imolinfo.jbi4corba.webservice.generator.typedef.TypeDef;
17
18 import java.io.Serializable;
19 import java.net.URLClassLoader;
20 import java.util.ArrayList;
21 import java.util.HashMap;
22 import java.util.HashSet;
23 import java.util.List;
24 import java.util.Map;
25 import java.util.Properties;
26 import java.util.Set;
27
28 import javax.xml.namespace.QName;
29
30 import org.apache.commons.lang.builder.EqualsBuilder;
31 import org.apache.commons.lang.builder.ReflectionToStringBuilder;
32
33
34
35
36 public class ProviderServiceDescriptor implements Serializable {
37
38
39 public static final String NAMESERVICE = "NameService";
40
41
42 public static final String CORBALOC = "corbaloc";
43
44
45 public static final String CORBANAME = "corbaname";
46
47
48 public static final String IOR = "IOR";
49
50
51 private static final long serialVersionUID = -6630066280740249302L;
52
53
54
55
56 private String serviceName;
57
58 private String corbaServiceName;
59
60 private String serviceNameSpace;
61
62 private String wsdlRootDirectory;
63
64
65 private Class serviceInterface;
66
67 private Class corbaHelperClass;
68
69 private Class corbaObjectInterface;
70
71
72 private org.omg.CORBA.Object corbaObjectReference;
73
74
75 private Properties orbProperties;
76
77
78 private String localizationType;
79
80 private URLClassLoader urlClassLoader;
81
82 private ChildFirstClassLoader originalClassLoader;
83
84 private String componentRootPath;
85
86
87 private QName portTypeName = null;
88
89
90 private List<MethodSignature> methodSignatures = new ArrayList<MethodSignature>();
91
92
93 private Map<String, Map<String, String>> substitutedUnionFields = new HashMap<String, Map<String, String>>();
94
95 private Map<String, UnionType> allUniontypes = null;
96
97
98 private Map<String, Map<String, String>> substitutedInterfaceFields = new HashMap<String, Map<String, String>>();
99
100 private Map<String, InterfaceType> allInterfacetypes = null;
101
102 private Map<String, TypeDef> typeDefs = null;
103
104
105 private ProviderEndpoint endpoint = null;
106
107
108
109
110
111 private Map<String, Object> valueTypeIdAndInstance;
112
113
114 private Set<Class> allIDLTypes = new HashSet<Class>();
115
116
117 Map<String, List<String>> corbaEnumMap = new HashMap<String, List<String>>();
118
119
120 private Map<String, String> idTOClassNameMap = new HashMap<String, String>();
121
122
123
124
125 public ProviderServiceDescriptor() {
126 super();
127 }
128
129
130
131
132 public String getServiceName() {
133 return serviceName;
134 }
135
136 public void setIdToClassNameMap(Map<String, String> idToClassMap) {
137 this.idTOClassNameMap = idToClassMap;
138 }
139
140 public Map<String, String> getIdToClassNameMap() {
141 return idTOClassNameMap;
142 }
143
144
145
146
147
148 public void setServiceName(String serviceName) {
149 this.serviceName = serviceName;
150 }
151
152
153
154
155 public String getServiceNameSpace() {
156 return serviceNameSpace;
157 }
158
159
160
161
162
163 public void setServiceNameSpace(String serviceNameSpace) {
164 this.serviceNameSpace = serviceNameSpace;
165 }
166
167
168
169
170
171 public org.omg.CORBA.Object getCorbaObjectReference() {
172 return corbaObjectReference;
173 }
174
175
176
177
178
179
180 public void setCorbaObjectReference(
181 org.omg.CORBA.Object corbaObjectReference) {
182 this.corbaObjectReference = corbaObjectReference;
183 }
184
185
186
187
188
189 public Class getServiceInterface() {
190 return serviceInterface;
191 }
192
193
194
195
196
197
198 public void setServiceInterface(Class serviceInterface) {
199 this.serviceInterface = serviceInterface;
200 }
201
202
203
204
205
206 public Class getCorbaHelperClass() {
207 return corbaHelperClass;
208 }
209
210
211
212
213
214
215 public void setCorbaHelperClass(Class corbaHelperClass) {
216 this.corbaHelperClass = corbaHelperClass;
217 }
218
219
220
221
222
223 public Class getCorbaObjectInterface() {
224 return corbaObjectInterface;
225 }
226
227
228
229
230
231
232 public void setCorbaObjectInterface(Class corbaObjectInterface) {
233 this.corbaObjectInterface = corbaObjectInterface;
234 }
235
236
237
238
239
240 public String toString() {
241 return ReflectionToStringBuilder.toString(this);
242 }
243
244
245
246
247
248
249 public boolean equals(Object obj) {
250 return EqualsBuilder.reflectionEquals(this, obj);
251 }
252
253
254
255
256
257 public String getLocalizationType() {
258 return localizationType;
259 }
260
261
262
263
264
265
266 public void setLocalizationType(String localizationType) {
267 this.localizationType = localizationType;
268 }
269
270
271
272
273
274 public Properties getOrbProperties() {
275 return orbProperties;
276 }
277
278
279
280
281
282
283 public void setOrbProperties(Properties orbProperties) {
284 this.orbProperties = orbProperties;
285 }
286
287
288
289
290
291 public String getWsdlRootDirectory() {
292 return wsdlRootDirectory;
293 }
294
295
296
297
298
299
300 public void setWsdlRootDirectory(String wsdlRootDirectory) {
301 this.wsdlRootDirectory = wsdlRootDirectory;
302 }
303
304
305
306
307
308 public String getCorbaServiceName() {
309 return corbaServiceName;
310 }
311
312
313
314
315
316
317 public void setCorbaServiceName(String corbaServiceName) {
318 this.corbaServiceName = corbaServiceName;
319 }
320
321
322
323
324
325 public URLClassLoader getUrlClassLoader() {
326 return urlClassLoader;
327 }
328
329
330
331
332
333
334 public void setUrlClassLoader(URLClassLoader urlClassLoader) {
335 this.urlClassLoader = urlClassLoader;
336 }
337
338
339
340
341
342 public ChildFirstClassLoader getOriginalClassLoader() {
343 return originalClassLoader;
344 }
345
346
347
348
349
350
351
352
353 public void setOriginalClassLoader(ChildFirstClassLoader originalClassLoader) {
354 this.originalClassLoader = originalClassLoader;
355 }
356
357
358
359
360
361 public Map<String, Object> getValueTypeIdAndInstance() {
362 return valueTypeIdAndInstance;
363 }
364
365
366
367
368
369
370 public void setValueTypeIdAndInstance(
371 Map<String, Object> valueTypeIdAndInstance) {
372 this.valueTypeIdAndInstance = valueTypeIdAndInstance;
373 }
374
375
376
377
378
379 public String getComponentRootPath() {
380 return componentRootPath;
381 }
382
383
384
385
386
387
388 public void setComponentRootPath(String componentRootPath) {
389 this.componentRootPath = componentRootPath;
390 }
391
392 public QName getPortTypeName() {
393 return portTypeName;
394 }
395
396 public void setPortTypeName(QName portTypeName) {
397 this.portTypeName = portTypeName;
398 }
399
400 public List<MethodSignature> getMethodSignatures() {
401 return methodSignatures;
402 }
403
404 public void setMethodSignatures(List<MethodSignature> methodSignatures) {
405 this.methodSignatures = methodSignatures;
406 }
407
408
409
410
411
412
413
414 public void setEndpoint(ProviderEndpoint endpoint) {
415 this.endpoint = endpoint;
416 }
417
418
419
420
421
422
423 public ProviderEndpoint getEndpoint() {
424 return endpoint;
425 }
426
427 public Map<String, Map<String, String>> getSubstitutedUnionFields() {
428 return substitutedUnionFields;
429 }
430
431 public void setSubstitutedUnionFields(
432 Map<String, Map<String, String>> substitutedUnionFields) {
433 this.substitutedUnionFields = substitutedUnionFields;
434 }
435
436 public Map<String, UnionType> getAllUniontypes() {
437 return allUniontypes;
438 }
439
440 public void setAllUniontypes(Map<String, UnionType> allUniontypes) {
441 this.allUniontypes = allUniontypes;
442 }
443
444 public Map<String, Map<String, String>> getSubstitutedInterfaceFields() {
445 return substitutedUnionFields;
446 }
447
448 public void setSubstitutedInterfaceFields(
449 Map<String, Map<String, String>> substitutedInterfaceFields) {
450 this.substitutedInterfaceFields = substitutedInterfaceFields;
451 }
452
453 public Map<String, InterfaceType> getAllInterfacetypes() {
454 return allInterfacetypes;
455 }
456
457 public void setAllInterfacetypes(Map<String, InterfaceType> allInterfaceypes) {
458 this.allInterfacetypes = allInterfaceypes;
459 }
460
461 public Map<String, SearchedType> getAllCorbaTypes() {
462 Map<String, SearchedType> allCorbaTypes = new HashMap<String, SearchedType>();
463
464 allCorbaTypes.putAll(allInterfacetypes);
465 allCorbaTypes.putAll(allUniontypes);
466
467 return allCorbaTypes;
468 }
469
470 public Set<Class> getAllIDLTypes() {
471 return allIDLTypes;
472 }
473
474 public void setAllIDLTypes(Set<Class> allIDLTypes) {
475 this.allIDLTypes = allIDLTypes;
476 }
477
478 public Map<String, List<String>> getCorbaEnumMap() {
479 return corbaEnumMap;
480 }
481
482 public void setCorbaEnumMap(Map<String, List<String>> corbaEnumMap) {
483 this.corbaEnumMap = corbaEnumMap;
484 }
485
486 public Map<String, TypeDef> getTypeDefs() {
487 return typeDefs;
488 }
489
490 public void setTypeDefs(Map<String, TypeDef> typeDefs) {
491 this.typeDefs = typeDefs;
492 }
493
494 }