KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > netbeans > modules > websvc > wsitmodelext > security > SecurityPolicyFactories


1 /*
2  * The contents of this file are subject to the terms of the Common Development
3  * and Distribution License (the License). You may not use this file except in
4  * compliance with the License.
5  *
6  * You can obtain a copy of the License at http://www.netbeans.org/cddl.html
7  * or http://www.netbeans.org/cddl.txt.
8  *
9  * When distributing Covered Code, include this CDDL Header Notice in each file
10  * and include the License file at http://www.netbeans.org/cddl.txt.
11  * If applicable, add the following below the CDDL Header, with the fields
12  * enclosed by brackets [] replaced by your own identifying information:
13  * "Portions Copyrighted [year] [name of copyright owner]"
14  *
15  * The Original Software is NetBeans. The Initial Developer of the Original
16  * Software is Sun Microsystems, Inc. Portions Copyright 2006 Sun
17  * Microsystems, Inc. All Rights Reserved.
18  */

19
20 package org.netbeans.modules.websvc.wsitmodelext.security;
21
22 import org.netbeans.modules.websvc.wsitmodelext.security.impl.*;
23 import org.netbeans.modules.websvc.wsitmodelext.security.parameters.impl.*;
24 import org.netbeans.modules.xml.wsdl.model.WSDLComponent;
25 import org.netbeans.modules.xml.wsdl.model.spi.ElementFactory;
26 import org.w3c.dom.Element JavaDoc;
27
28 import javax.xml.namespace.QName JavaDoc;
29 import java.util.Collections JavaDoc;
30 import java.util.Set JavaDoc;
31
32 public class SecurityPolicyFactories {
33
34     public static class Wss11Factory extends ElementFactory {
35         @Override JavaDoc
36         public Set JavaDoc<QName JavaDoc> getElementQNames() {
37             return Collections.singleton(SecurityPolicyQName.WSS11.getQName());
38         }
39         public <C extends WSDLComponent> C create(WSDLComponent context, Class JavaDoc<C> type) {
40             return type.cast(new Wss11Impl(context.getModel()));
41         }
42         @Override JavaDoc
43         public WSDLComponent create(WSDLComponent context, Element JavaDoc element) {
44             return new Wss11Impl(context.getModel(), element);
45         }
46     }
47
48     public static class Wss10Factory extends ElementFactory {
49         @Override JavaDoc
50         public Set JavaDoc<QName JavaDoc> getElementQNames() {
51             return Collections.singleton(SecurityPolicyQName.WSS10.getQName());
52         }
53         public <C extends WSDLComponent> C create(WSDLComponent context, Class JavaDoc<C> type) {
54             return type.cast(new Wss10Impl(context.getModel()));
55         }
56         @Override JavaDoc
57         public WSDLComponent create(WSDLComponent context, Element JavaDoc element) {
58             return new Wss10Impl(context.getModel(), element);
59         }
60     }
61
62     public static class MustSupportRefEmbeddedTokenFactory extends ElementFactory {
63         @Override JavaDoc
64         public Set JavaDoc<QName JavaDoc> getElementQNames() {
65             return Collections.singleton(SecurityPolicyQName.MUSTSUPPORTREFEMBEDDEDTOKEN.getQName());
66         }
67         public <C extends WSDLComponent> C create(WSDLComponent context, Class JavaDoc<C> type) {
68             return type.cast(new MustSupportRefEmbeddedTokenImpl(context.getModel()));
69         }
70         @Override JavaDoc
71         public WSDLComponent create(WSDLComponent context, Element JavaDoc element) {
72             return new MustSupportRefEmbeddedTokenImpl(context.getModel(), element);
73         }
74     }
75
76     public static class MustSupportRefEncryptedKeyFactory extends ElementFactory {
77         @Override JavaDoc
78         public Set JavaDoc<QName JavaDoc> getElementQNames() {
79             return Collections.singleton(SecurityPolicyQName.MUSTSUPPORTREFENCRYPTEDKEY.getQName());
80         }
81         public <C extends WSDLComponent> C create(WSDLComponent context, Class JavaDoc<C> type) {
82             return type.cast(new MustSupportRefEncryptedKeyImpl(context.getModel()));
83         }
84         @Override JavaDoc
85         public WSDLComponent create(WSDLComponent context, Element JavaDoc element) {
86             return new MustSupportRefEncryptedKeyImpl(context.getModel(), element);
87         }
88     }
89
90     public static class MustSupportRefExternalURIFactory extends ElementFactory {
91         @Override JavaDoc
92         public Set JavaDoc<QName JavaDoc> getElementQNames() {
93             return Collections.singleton(SecurityPolicyQName.MUSTSUPPORTREFEXTERNALURI.getQName());
94         }
95         public <C extends WSDLComponent> C create(WSDLComponent context, Class JavaDoc<C> type) {
96             return type.cast(new MustSupportRefExternalURIImpl(context.getModel()));
97         }
98         @Override JavaDoc
99         public WSDLComponent create(WSDLComponent context, Element JavaDoc element) {
100             return new MustSupportRefExternalURIImpl(context.getModel(), element);
101         }
102     }
103
104     public static class MustSupportRefIssuerSerialFactory extends ElementFactory {
105         @Override JavaDoc
106         public Set JavaDoc<QName JavaDoc> getElementQNames() {
107             return Collections.singleton(SecurityPolicyQName.MUSTSUPPORTREFISSUERSERIAL.getQName());
108         }
109         public <C extends WSDLComponent> C create(WSDLComponent context, Class JavaDoc<C> type) {
110             return type.cast(new MustSupportRefIssuerSerialImpl(context.getModel()));
111         }
112         @Override JavaDoc
113         public WSDLComponent create(WSDLComponent context, Element JavaDoc element) {
114             return new MustSupportRefIssuerSerialImpl(context.getModel(), element);
115         }
116     }
117
118     public static class MustSupportRefKeyIdentifierFactory extends ElementFactory {
119         @Override JavaDoc
120         public Set JavaDoc<QName JavaDoc> getElementQNames() {
121             return Collections.singleton(SecurityPolicyQName.MUSTSUPPORTREFKEYIDENTIFIER.getQName());
122         }
123         public <C extends WSDLComponent> C create(WSDLComponent context, Class JavaDoc<C> type) {
124             return type.cast(new MustSupportRefKeyIdentifierImpl(context.getModel()));
125         }
126         @Override JavaDoc
127         public WSDLComponent create(WSDLComponent context, Element JavaDoc element) {
128             return new MustSupportRefKeyIdentifierImpl(context.getModel(), element);
129         }
130     }
131
132     public static class MustSupportRefThumbprintFactory extends ElementFactory {
133         @Override JavaDoc
134         public Set JavaDoc<QName JavaDoc> getElementQNames() {
135             return Collections.singleton(SecurityPolicyQName.MUSTSUPPORTREFTHUMBPRINT.getQName());
136         }
137         public <C extends WSDLComponent> C create(WSDLComponent context, Class JavaDoc<C> type) {
138             return type.cast(new MustSupportRefThumbprintImpl(context.getModel()));
139         }
140         @Override JavaDoc
141         public WSDLComponent create(WSDLComponent context, Element JavaDoc element) {
142             return new MustSupportRefThumbprintImpl(context.getModel(), element);
143         }
144     }
145
146     public static class RequireSignatureConfirmationFactory extends ElementFactory {
147         @Override JavaDoc
148         public Set JavaDoc<QName JavaDoc> getElementQNames() {
149             return Collections.singleton(SecurityPolicyQName.REQUIRESIGNATURECONFIRMATION.getQName());
150         }
151         public <C extends WSDLComponent> C create(WSDLComponent context, Class JavaDoc<C> type) {
152             return type.cast(new RequireSignatureConfirmationImpl(context.getModel()));
153         }
154         @Override JavaDoc
155         public WSDLComponent create(WSDLComponent context, Element JavaDoc element) {
156             return new RequireSignatureConfirmationImpl(context.getModel(), element);
157         }
158     }
159
160     public static class RequestSecurityTokenTemplateFactory extends ElementFactory {
161         @Override JavaDoc
162         public Set JavaDoc<QName JavaDoc> getElementQNames() {
163             return Collections.singleton(SecurityPolicyQName.REQUESTSECURITYTOKENTEMPLATE.getQName());
164         }
165         public <C extends WSDLComponent> C create(WSDLComponent context, Class JavaDoc<C> type) {
166             return type.cast(new RequestSecurityTokenTemplateImpl(context.getModel()));
167         }
168         @Override JavaDoc
169         public WSDLComponent create(WSDLComponent context, Element JavaDoc element) {
170             return new RequestSecurityTokenTemplateImpl(context.getModel(), element);
171         }
172     }
173
174     public static class Trust10Factory extends ElementFactory {
175         @Override JavaDoc
176         public Set JavaDoc<QName JavaDoc> getElementQNames() {
177             return Collections.singleton(SecurityPolicyQName.TRUST10.getQName());
178         }
179         public <C extends WSDLComponent> C create(WSDLComponent context, Class JavaDoc<C> type) {
180             return type.cast(new Trust10Impl(context.getModel()));
181         }
182         @Override JavaDoc
183         public WSDLComponent create(WSDLComponent context, Element JavaDoc element) {
184             return new Trust10Impl(context.getModel(), element);
185         }
186     }
187
188     public static class RequireServerEntropyFactory extends ElementFactory {
189         @Override JavaDoc
190         public Set JavaDoc<QName JavaDoc> getElementQNames() {
191             return Collections.singleton(SecurityPolicyQName.REQUIRESERVERENTROPY.getQName());
192         }
193         public <C extends WSDLComponent> C create(WSDLComponent context, Class JavaDoc<C> type) {
194             return type.cast(new RequireServerEntropyImpl(context.getModel()));
195         }
196         @Override JavaDoc
197         public WSDLComponent create(WSDLComponent context, Element JavaDoc element) {
198             return new RequireServerEntropyImpl(context.getModel(), element);
199         }
200     }
201
202     public static class RequireClientEntropyFactory extends ElementFactory {
203         @Override JavaDoc
204         public Set JavaDoc<QName JavaDoc> getElementQNames() {
205             return Collections.singleton(SecurityPolicyQName.REQUIRECLIENTENTROPY.getQName());
206         }
207         public <C extends WSDLComponent> C create(WSDLComponent context, Class JavaDoc<C> type) {
208             return type.cast(new RequireClientEntropyImpl(context.getModel()));
209         }
210         @Override JavaDoc
211         public WSDLComponent create(WSDLComponent context, Element JavaDoc element) {
212             return new RequireClientEntropyImpl(context.getModel(), element);
213         }
214     }
215  
216     public static class MustSupportIssuedTokensFactory extends ElementFactory {
217         @Override JavaDoc
218         public Set JavaDoc<QName JavaDoc> getElementQNames() {
219             return Collections.singleton(SecurityPolicyQName.MUSTSUPPORTISSUEDTOKENS.getQName());
220         }
221         public <C extends WSDLComponent> C create(WSDLComponent context, Class JavaDoc<C> type) {
222             return type.cast(new MustSupportIssuedTokensImpl(context.getModel()));
223         }
224         @Override JavaDoc
225         public WSDLComponent create(WSDLComponent context, Element JavaDoc element) {
226             return new MustSupportIssuedTokensImpl(context.getModel(), element);
227         }
228     }
229
230     public static class MustSupportClientChallengeFactory extends ElementFactory {
231         @Override JavaDoc
232         public Set JavaDoc<QName JavaDoc> getElementQNames() {
233             return Collections.singleton(SecurityPolicyQName.MUSTSUPPORTCLIENTCHALLENGE.getQName());
234         }
235         public <C extends WSDLComponent> C create(WSDLComponent context, Class JavaDoc<C> type) {
236             return type.cast(new MustSupportClientChallengeImpl(context.getModel()));
237         }
238         @Override JavaDoc
239         public WSDLComponent create(WSDLComponent context, Element JavaDoc element) {
240             return new MustSupportClientChallengeImpl(context.getModel(), element);
241         }
242     }
243
244     public static class MustSupportServerChallengeFactory extends ElementFactory {
245         @Override JavaDoc
246         public Set JavaDoc<QName JavaDoc> getElementQNames() {
247             return Collections.singleton(SecurityPolicyQName.MUSTSUPPORTSERVERCHALLENGE.getQName());
248         }
249         public <C extends WSDLComponent> C create(WSDLComponent context, Class JavaDoc<C> type) {
250             return type.cast(new MustSupportServerChallengeImpl(context.getModel()));
251         }
252         @Override JavaDoc
253         public WSDLComponent create(WSDLComponent context, Element JavaDoc element) {
254             return new MustSupportServerChallengeImpl(context.getModel(), element);
255         }
256     }
257     
258     public static class IncludeTimestampFactory extends ElementFactory {
259         @Override JavaDoc
260         public Set JavaDoc<QName JavaDoc> getElementQNames() {
261             return Collections.singleton(SecurityPolicyQName.INCLUDETIMESTAMP.getQName());
262         }
263         public <C extends WSDLComponent> C create(WSDLComponent context, Class JavaDoc<C> type) {
264             return type.cast(new IncludeTimestampImpl(context.getModel()));
265         }
266         @Override JavaDoc
267         public WSDLComponent create(WSDLComponent context, Element JavaDoc element) {
268             return new IncludeTimestampImpl(context.getModel(), element);
269         }
270     }
271
272     public static class OnlySignEntireHeadersAndBodyFactory extends ElementFactory {
273         @Override JavaDoc
274         public Set JavaDoc<QName JavaDoc> getElementQNames() {
275             return Collections.singleton(SecurityPolicyQName.ONLYSIGNENTIREHEADERSANDBODY.getQName());
276         }
277         public <C extends WSDLComponent> C create(WSDLComponent context, Class JavaDoc<C> type) {
278             return type.cast(new OnlySignEntireHeadersAndBodyImpl(context.getModel()));
279         }
280         @Override JavaDoc
281         public WSDLComponent create(WSDLComponent context, Element JavaDoc element) {
282             return new OnlySignEntireHeadersAndBodyImpl(context.getModel(), element);
283         }
284     }
285     
286     public static class EncryptSignatureFactory extends ElementFactory {
287         @Override JavaDoc
288         public Set JavaDoc<QName JavaDoc> getElementQNames() {
289             return Collections.singleton(SecurityPolicyQName.ENCRYPTSIGNATURE.getQName());
290         }
291         public <C extends WSDLComponent> C create(WSDLComponent context, Class JavaDoc<C> type) {
292             return type.cast(new EncryptSignatureImpl(context.getModel()));
293         }
294         @Override JavaDoc
295         public WSDLComponent create(WSDLComponent context, Element JavaDoc element) {
296             return new EncryptSignatureImpl(context.getModel(), element);
297         }
298     }
299
300     public static class EncryptBeforeSigningFactory extends ElementFactory {
301         @Override JavaDoc
302         public Set JavaDoc<QName JavaDoc> getElementQNames() {
303             return Collections.singleton(SecurityPolicyQName.ENCRYPTBEFORESIGNING.getQName());
304         }
305         public <C extends WSDLComponent> C create(WSDLComponent context, Class JavaDoc<C> type) {
306             return type.cast(new EncryptBeforeSigningImpl(context.getModel()));
307         }
308         @Override JavaDoc
309         public WSDLComponent create(WSDLComponent context, Element JavaDoc element) {
310             return new EncryptBeforeSigningImpl(context.getModel(), element);
311         }
312     }
313     
314     public static class SignedElementsFactory extends ElementFactory {
315         @Override JavaDoc
316         public Set JavaDoc<QName JavaDoc> getElementQNames() {
317             return Collections.singleton(SecurityPolicyQName.SIGNEDELEMENTS.getQName());
318         }
319         public <C extends WSDLComponent> C create(WSDLComponent context, Class JavaDoc<C> type) {
320             return type.cast(new SignedElementsImpl(context.getModel()));
321         }
322         @Override JavaDoc
323         public WSDLComponent create(WSDLComponent context, Element JavaDoc element) {
324             return new SignedElementsImpl(context.getModel(), element);
325         }
326     }
327
328     public static class SignedPartsFactory extends ElementFactory {
329         @Override JavaDoc
330         public Set JavaDoc<QName JavaDoc> getElementQNames() {
331             return Collections.singleton(SecurityPolicyQName.SIGNEDPARTS.getQName());
332         }
333         public <C extends WSDLComponent> C create(WSDLComponent context, Class JavaDoc<C> type) {
334             return type.cast(new SignedPartsImpl(context.getModel()));
335         }
336         @Override JavaDoc
337         public WSDLComponent create(WSDLComponent context, Element JavaDoc element) {
338             return new SignedPartsImpl(context.getModel(), element);
339         }
340     }
341
342     public static class EncryptedElementsFactory extends ElementFactory {
343         @Override JavaDoc
344         public Set JavaDoc<QName JavaDoc> getElementQNames() {
345             return Collections.singleton(SecurityPolicyQName.ENCRYPTEDELEMENTS.getQName());
346         }
347         public <C extends WSDLComponent> C create(WSDLComponent context, Class JavaDoc<C> type) {
348             return type.cast(new EncryptedElementsImpl(context.getModel()));
349         }
350         @Override JavaDoc
351         public WSDLComponent create(WSDLComponent context, Element JavaDoc element) {
352             return new EncryptedElementsImpl(context.getModel(), element);
353         }
354     }
355
356     public static class EncryptedPartsFactory extends ElementFactory {
357         @Override JavaDoc
358         public Set JavaDoc<QName JavaDoc> getElementQNames() {
359             return Collections.singleton(SecurityPolicyQName.ENCRYPTEDPARTS.getQName());
360         }
361         public <C extends WSDLComponent> C create(WSDLComponent context, Class JavaDoc<C> type) {
362             return type.cast(new EncryptedPartsImpl(context.getModel()));
363         }
364         @Override JavaDoc
365         public WSDLComponent create(WSDLComponent context, Element JavaDoc element) {
366             return new EncryptedPartsImpl(context.getModel(), element);
367         }
368     }
369
370     public static class HeaderFactory extends ElementFactory {
371         @Override JavaDoc
372         public Set JavaDoc<QName JavaDoc> getElementQNames() {
373             return Collections.singleton(SecurityPolicyQName.HEADER.getQName());
374         }
375         public <C extends WSDLComponent> C create(WSDLComponent context, Class JavaDoc<C> type) {
376             return type.cast(new HeaderImpl(context.getModel()));
377         }
378         @Override JavaDoc
379         public WSDLComponent create(WSDLComponent context, Element JavaDoc element) {
380             return new HeaderImpl(context.getModel(), element);
381         }
382     }
383
384     public static class BodyFactory extends ElementFactory {
385         @Override JavaDoc
386         public Set JavaDoc<QName JavaDoc> getElementQNames() {
387             return Collections.singleton(SecurityPolicyQName.BODY.getQName());
388         }
389         public <C extends WSDLComponent> C create(WSDLComponent context, Class JavaDoc<C> type) {
390             return type.cast(new BodyImpl(context.getModel()));
391         }
392         @Override JavaDoc
393         public WSDLComponent create(WSDLComponent context, Element JavaDoc element) {
394             return new BodyImpl(context.getModel(), element);
395         }
396     }
397
398     public static class XPathFactory extends ElementFactory {
399         @Override JavaDoc
400         public Set JavaDoc<QName JavaDoc> getElementQNames() {
401             return Collections.singleton(SecurityPolicyQName.XPATH.getQName());
402         }
403         public <C extends WSDLComponent> C create(WSDLComponent context, Class JavaDoc<C> type) {
404             return type.cast(new XPathImpl(context.getModel()));
405         }
406         @Override JavaDoc
407         public WSDLComponent create(WSDLComponent context, Element JavaDoc element) {
408             return new XPathImpl(context.getModel(), element);
409         }
410     }
411     
412    public static class TransportBindingFactory extends ElementFactory {
413         @Override JavaDoc
414         public Set JavaDoc<QName JavaDoc> getElementQNames() {
415             return Collections.singleton(SecurityPolicyQName.TRANSPORTBINDING.getQName());
416         }
417         public <C extends WSDLComponent> C create(WSDLComponent context, Class JavaDoc<C> type) {
418             return type.cast(new TransportBindingImpl(context.getModel()));
419         }
420         @Override JavaDoc
421         public WSDLComponent create(WSDLComponent context, Element JavaDoc element) {
422             return new TransportBindingImpl(context.getModel(), element);
423         }
424     }
425
426    public static class SymmetricBindingFactory extends ElementFactory {
427         @Override JavaDoc
428         public Set JavaDoc<QName JavaDoc> getElementQNames() {
429             return Collections.singleton(SecurityPolicyQName.SYMMETRICBINDING.getQName());
430         }
431         public <C extends WSDLComponent> C create(WSDLComponent context, Class JavaDoc<C> type) {
432             return type.cast(new SymmetricBindingImpl(context.getModel()));
433         }
434         @Override JavaDoc
435         public WSDLComponent create(WSDLComponent context, Element JavaDoc element) {
436             return new SymmetricBindingImpl(context.getModel(), element);
437         }
438     }
439
440    public static class AsymmetricBindingFactory extends ElementFactory {
441         @Override JavaDoc
442         public Set JavaDoc<QName JavaDoc> getElementQNames() {
443             return Collections.singleton(SecurityPolicyQName.ASYMMETRICBINDING.getQName());
444         }
445         public <C extends WSDLComponent> C create(WSDLComponent context, Class JavaDoc<C> type) {
446             return type.cast(new AsymmetricBindingImpl(context.getModel()));
447         }
448         @Override JavaDoc
449         public WSDLComponent create(WSDLComponent context, Element JavaDoc element) {
450             return new AsymmetricBindingImpl(context.getModel(), element);
451         }
452     }
453
454    public static class LayoutFactory extends ElementFactory {
455         @Override JavaDoc
456         public Set JavaDoc<QName JavaDoc> getElementQNames() {
457             return Collections.singleton(SecurityPolicyQName.LAYOUT.getQName());
458         }
459         public <C extends WSDLComponent> C create(WSDLComponent context, Class JavaDoc<C> type) {
460             return type.cast(new LayoutImpl(context.getModel()));
461         }
462         @Override JavaDoc
463         public WSDLComponent create(WSDLComponent context, Element JavaDoc element) {
464             return new LayoutImpl(context.getModel(), element);
465         }
466     }
467    
468    public static class StrictFactory extends ElementFactory {
469         @Override JavaDoc
470         public Set JavaDoc<QName JavaDoc> getElementQNames() {
471             return Collections.singleton(SecurityPolicyQName.STRICT.getQName());
472         }
473         public <C extends WSDLComponent> C create(WSDLComponent context, Class JavaDoc<C> type) {
474             return type.cast(new StrictImpl(context.getModel()));
475         }
476         @Override JavaDoc
477         public WSDLComponent create(WSDLComponent context, Element JavaDoc element) {
478             return new StrictImpl(context.getModel(), element);
479         }
480     }
481
482    public static class LaxFactory extends ElementFactory {
483         @Override JavaDoc
484         public Set JavaDoc<QName JavaDoc> getElementQNames() {
485             return Collections.singleton(SecurityPolicyQName.LAX.getQName());
486         }
487         public <C extends WSDLComponent> C create(WSDLComponent context, Class JavaDoc<C> type) {
488             return type.cast(new LaxImpl(context.getModel()));
489         }
490         @Override JavaDoc
491         public WSDLComponent create(WSDLComponent context, Element JavaDoc element) {
492             return new LaxImpl(context.getModel(), element);
493         }
494     }
495
496    public static class LaxTsFirstFactory extends ElementFactory {
497         @Override JavaDoc
498         public Set JavaDoc<QName JavaDoc> getElementQNames() {
499             return Collections.singleton(SecurityPolicyQName.LAXTSFIRST.getQName());
500         }
501         public <C extends WSDLComponent> C create(WSDLComponent context, Class JavaDoc<C> type) {
502             return type.cast(new LaxTsFirstImpl(context.getModel()));
503         }
504         @Override JavaDoc
505         public WSDLComponent create(WSDLComponent context, Element JavaDoc element) {
506             return new LaxTsFirstImpl(context.getModel(), element);
507         }
508     }
509
510    public static class LaxTsLastFactory extends ElementFactory {
511         @Override JavaDoc
512         public Set JavaDoc<QName JavaDoc> getElementQNames() {
513             return Collections.singleton(SecurityPolicyQName.LAXTSLAST.getQName());
514         }
515         public <C extends WSDLComponent> C create(WSDLComponent context, Class JavaDoc<C> type) {
516             return type.cast(new LaxTsLastImpl(context.getModel()));
517         }
518         @Override JavaDoc
519         public WSDLComponent create(WSDLComponent context, Element JavaDoc element) {
520             return new LaxTsLastImpl(context.getModel(), element);
521         }
522     }
523
524    public static class RequiredElementsFactory extends ElementFactory {
525         @Override JavaDoc
526         public Set JavaDoc<QName JavaDoc> getElementQNames() {
527             return Collections.singleton(SecurityPolicyQName.REQUIREDELEMENTS.getQName());
528         }
529         public <C extends WSDLComponent> C create(WSDLComponent context, Class JavaDoc<C> type) {
530             return type.cast(new RequiredElementsImpl(context.getModel()));
531         }
532         @Override JavaDoc
533         public WSDLComponent create(WSDLComponent context, Element JavaDoc element) {
534             return new RequiredElementsImpl(context.getModel(), element);
535         }
536     }
537
538    public static class BootstrapPolicyFactory extends ElementFactory {
539         @Override JavaDoc
540         public Set JavaDoc<QName JavaDoc> getElementQNames() {
541             return Collections.singleton(SecurityPolicyQName.BOOTSTRAPPOLICY.getQName());
542         }
543         public <C extends WSDLComponent> C create(WSDLComponent context, Class JavaDoc<C> type) {
544             return type.cast(new BootstrapPolicyImpl(context.getModel()));
545         }
546         @Override JavaDoc
547         public WSDLComponent create(WSDLComponent context, Element JavaDoc element) {
548             return new BootstrapPolicyImpl(context.getModel(), element);
549         }
550     }
551 }
552
Popular Tags