1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.apache.geronimo.ews.ws4j2ee.context.webservices.server;
17
18 import org.apache.geronimo.ews.ws4j2ee.context.webservices.server.interfaces.WSCFHandler;
19 import org.apache.geronimo.ews.ws4j2ee.context.webservices.server.interfaces.WSCFInitParam;
20 import org.apache.geronimo.ews.ws4j2ee.context.webservices.server.interfaces.WSCFSOAPHeader;
21
22 import java.util.HashMap;
23 import java.util.Vector;
24
25 /***
26 * This encapsulates the layer 3 handler element of the webservices.xml. This
27 * is also the concrete implementation of the WSCFHandler.
28 */
29 public abstract class AbstractWSCFHandler extends WSCFElement implements WSCFHandler {
30
31 /***
32 * handler derscription
33 */
34 protected String description;
35
36 /***
37 * handler display name
38 */
39 protected String displayName;
40
41 /***
42 * handler small icon
43 */
44 protected String smallIcon;
45
46 /***
47 * handler large icon
48 */
49 protected String largeIcon;
50
51 /***
52 * handler name
53 */
54 protected String handlerName;
55
56 /***
57 * handler class
58 */
59 protected String handlerClass;
60
61 /***
62 * handler init parameters as a collection
63 */
64 protected HashMap initParam = new HashMap();
65
66 /***
67 * handler soap headers as a collection
68 */
69 protected Vector soapHeader = new Vector();
70
71 /***
72 * handler soap roles as a collection
73 */
74 protected Vector soapRole = new Vector();
75
76
77
78
79
80
81
82 /***
83 // * The constructor. This will parse the chaild elementsin a depth first manner.
84 // * @param e handler Element
85 // * @throws WSCFException
86 // */
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133 /***
134 * Gets the description of the handler element
135 *
136 * @return description
137 */
138 public String getDescription() {
139 return description;
140 }
141
142 /***
143 * Gets the display name of the handler element
144 *
145 * @return display-name
146 */
147 public String getDisplayName() {
148 return displayName;
149 }
150
151 /***
152 * Gets the class of the handler element
153 *
154 * @return handler-class
155 */
156 public String getHandlerClass() {
157 return handlerClass;
158 }
159
160 /***
161 * Gets the name of the handler element
162 *
163 * @return handler-name
164 */
165 public String getHandlerName() {
166 return handlerName;
167 }
168
169 /***
170 * Gets the init paramaeters of the handler element as a array
171 *
172 * @return init-parameters
173 */
174 public WSCFInitParam[] getInitParam() {
175 WSCFInitParam[] initparam = new WSCFInitParam[this.initParam.size()];
176 this.initParam.values().toArray(initparam);
177 return initparam;
178 }
179
180 /***
181 * Gets the large icon of the handler element
182 *
183 * @return large-icon
184 */
185 public String getLargeIcon() {
186 return largeIcon;
187 }
188
189 /***
190 * Gets the small icon of the handler element
191 *
192 * @return small-icon
193 */
194 public String getSmallIcon() {
195 return smallIcon;
196 }
197
198 /***
199 * Gets the soap headers of the handler element
200 *
201 * @return soap-headers
202 */
203 public WSCFSOAPHeader[] getSoapHeader() {
204 WSCFSOAPHeader[] soapheader = new WSCFSOAPHeader[this.soapHeader.size()];
205 int size = soapHeader.size();
206 for (int i = 0; i < size; i++) {
207 soapheader[i] = ((WSCFSOAPHeader) soapHeader.get(i));
208 }
209 return soapheader;
210 }
211
212 /***
213 * Gets the soap roles of the handler element
214 *
215 * @return soap-roles
216 */
217 public String[] getSoapRole() {
218 String[] soaprole = new String[this.soapRole.size()];
219 int size = soapRole.size();
220 for (int i = 0; i < size; i++) {
221 soaprole[i] = (String) soapRole.get(i);
222 }
223 return soaprole;
224 }
225
226 /***
227 // * @return
228 // */
229
230
231
232
233 }