KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > objectweb > celtix > tools > common > model > WSDLParameter


1 package org.objectweb.celtix.tools.common.model;
2
3 import java.util.ArrayList JavaDoc;
4 import java.util.Collections JavaDoc;
5 import java.util.List JavaDoc;
6 import java.util.logging.Logger JavaDoc;
7
8 import com.sun.xml.bind.api.TypeReference;
9
10 import org.objectweb.celtix.common.i18n.Message;
11 import org.objectweb.celtix.common.logging.LogUtils;
12 import org.objectweb.celtix.tools.common.ToolException;
13 import org.objectweb.celtix.tools.common.model.JavaType.Style;
14 import org.objectweb.celtix.tools.processors.java2.JavaToWSDLProcessor;
15 public class WSDLParameter {
16     private static final Logger JavaDoc LOG = LogUtils.getL7dLogger(JavaToWSDLProcessor.class);
17     protected String JavaDoc name;
18     protected String JavaDoc type;
19     protected String JavaDoc className;
20     protected String JavaDoc targetNamespace;
21     protected final List JavaDoc<JavaParameter> parts = new ArrayList JavaDoc<JavaParameter>();
22     private TypeReference typeRef;
23     private Style style;
24     private String JavaDoc pname;
25     
26     public WSDLParameter() {
27         
28     }
29
30     public WSDLParameter(String JavaDoc paraName, TypeReference ref, Style paraStyle) {
31         pname = paraName;
32         typeRef = ref;
33         style = paraStyle;
34     }
35     
36     public void setName(String JavaDoc arg) {
37         this.pname = arg;
38     }
39
40     public void setClassName(String JavaDoc clzName) {
41         this.className = clzName;
42     }
43
44     public String JavaDoc getClassName() {
45         return this.className;
46     }
47
48     public void setTargetNamespace(String JavaDoc tns) {
49         this.targetNamespace = tns;
50     }
51
52     public String JavaDoc getTargetNamespace() {
53         return this.targetNamespace;
54     }
55
56     public Style getStyle() {
57         return this.style;
58     }
59
60     public void setStyle(Style s) {
61         this.style = s;
62     }
63
64     public String JavaDoc getName() {
65         return pname;
66     }
67
68     
69
70     public void setTypeReference(TypeReference ref) {
71         this.typeRef = ref;
72     }
73
74     public TypeReference getTypeReference() {
75         return this.typeRef;
76     }
77
78     public boolean isWrapped() {
79         return true;
80     }
81
82     public List JavaDoc<JavaParameter> getChildren() {
83         return Collections.unmodifiableList(parts);
84     }
85
86     public void addChildren(JavaParameter jp) {
87         if (parts.contains(jp)) {
88             Message message = new Message("PART_ALREADY_EXIST", LOG, jp.getName());
89             throw new ToolException(message);
90         }
91         parts.add(jp);
92     }
93
94     public JavaParameter removeChildren(int index) {
95         return parts.remove(index);
96     }
97
98     public void clear() {
99         parts.clear();
100     }
101
102    
103 }
104
Popular Tags