1 19 20 package org.netbeans.modules.websvc.wsitmodelext.security.tokens; 21 22 import org.netbeans.modules.websvc.wsitmodelext.security.tokens.impl.*; 23 import org.netbeans.modules.xml.wsdl.model.WSDLComponent; 24 import org.netbeans.modules.xml.wsdl.model.spi.ElementFactory; 25 import org.w3c.dom.Element ; 26 27 import javax.xml.namespace.QName ; 28 import java.util.Collections ; 29 import java.util.Set ; 30 31 public class TokenFactories { 32 33 public static class SupportingTokensFactory extends ElementFactory { 34 @Override 35 public Set <QName > getElementQNames() { 36 return Collections.singleton(TokensQName.SUPPORTINGTOKENS.getQName()); 37 } 38 public <C extends WSDLComponent> C create(WSDLComponent context, Class <C> type) { 39 return type.cast(new SupportingTokensImpl(context.getModel())); 40 } 41 @Override 42 public WSDLComponent create(WSDLComponent context, Element element) { 43 return new SupportingTokensImpl(context.getModel(), element); 44 } 45 } 46 47 public static class SignedSupportingTokensFactory extends ElementFactory { 48 @Override 49 public Set <QName > getElementQNames() { 50 return Collections.singleton(TokensQName.SIGNEDSUPPORTINGTOKENS.getQName()); 51 } 52 public <C extends WSDLComponent> C create(WSDLComponent context, Class <C> type) { 53 return type.cast(new SignedSupportingTokensImpl(context.getModel())); 54 } 55 @Override 56 public WSDLComponent create(WSDLComponent context, Element element) { 57 return new SignedSupportingTokensImpl(context.getModel(), element); 58 } 59 } 60 61 public static class EndorsingSupportingTokensFactory extends ElementFactory { 62 @Override 63 public Set <QName > getElementQNames() { 64 return Collections.singleton(TokensQName.ENDORSINGSUPPORTINGTOKENS.getQName()); 65 } 66 public <C extends WSDLComponent> C create(WSDLComponent context, Class <C> type) { 67 return type.cast(new EndorsingSupportingTokensImpl(context.getModel())); 68 } 69 @Override 70 public WSDLComponent create(WSDLComponent context, Element element) { 71 return new EndorsingSupportingTokensImpl(context.getModel(), element); 72 } 73 } 74 75 public static class SignedEndorsingSupportingTokensFactory extends ElementFactory { 76 @Override 77 public Set <QName > getElementQNames() { 78 return Collections.singleton(TokensQName.SIGNEDENDORSINGSUPPORTINGTOKENS.getQName()); 79 } 80 public <C extends WSDLComponent> C create(WSDLComponent context, Class <C> type) { 81 return type.cast(new SignedEndorsingSupportingTokensImpl(context.getModel())); 82 } 83 @Override 84 public WSDLComponent create(WSDLComponent context, Element element) { 85 return new SignedEndorsingSupportingTokensImpl(context.getModel(), element); 86 } 87 } 88 89 public static class HttpsTokenFactory extends ElementFactory { 90 @Override 91 public Set <QName > getElementQNames() { 92 return Collections.singleton(TokensQName.HTTPSTOKEN.getQName()); 93 } 94 public <C extends WSDLComponent> C create(WSDLComponent context, Class <C> type) { 95 return type.cast(new HttpsTokenImpl(context.getModel())); 96 } 97 @Override 98 public WSDLComponent create(WSDLComponent context, Element element) { 99 return new HttpsTokenImpl(context.getModel(), element); 100 } 101 } 102 103 public static class InitiatorTokenFactory extends ElementFactory { 104 @Override 105 public Set <QName > getElementQNames() { 106 return Collections.singleton(TokensQName.INITIATORTOKEN.getQName()); 107 } 108 public <C extends WSDLComponent> C create(WSDLComponent context, Class <C> type) { 109 return type.cast(new InitiatorTokenImpl(context.getModel())); 110 } 111 @Override 112 public WSDLComponent create(WSDLComponent context, Element element) { 113 return new InitiatorTokenImpl(context.getModel(), element); 114 } 115 } 116 117 public static class SignatureTokenFactory extends ElementFactory { 118 @Override 119 public Set <QName > getElementQNames() { 120 return Collections.singleton(TokensQName.SIGNATURETOKEN.getQName()); 121 } 122 public <C extends WSDLComponent> C create(WSDLComponent context, Class <C> type) { 123 return type.cast(new SignatureTokenImpl(context.getModel())); 124 } 125 @Override 126 public WSDLComponent create(WSDLComponent context, Element element) { 127 return new SignatureTokenImpl(context.getModel(), element); 128 } 129 } 130 131 public static class EncryptionTokenFactory extends ElementFactory { 132 @Override 133 public Set <QName > getElementQNames() { 134 return Collections.singleton(TokensQName.ENCRYPTIONTOKEN.getQName()); 135 } 136 public <C extends WSDLComponent> C create(WSDLComponent context, Class <C> type) { 137 return type.cast(new EncryptionTokenImpl(context.getModel())); 138 } 139 @Override 140 public WSDLComponent create(WSDLComponent context, Element element) { 141 return new EncryptionTokenImpl(context.getModel(), element); 142 } 143 } 144 145 public static class IssuedTokenFactory extends ElementFactory { 146 @Override 147 public Set <QName > getElementQNames() { 148 return Collections.singleton(TokensQName.ISSUEDTOKEN.getQName()); 149 } 150 public <C extends WSDLComponent> C create(WSDLComponent context, Class <C> type) { 151 return type.cast(new IssuedTokenImpl(context.getModel())); 152 } 153 @Override 154 public WSDLComponent create(WSDLComponent context, Element element) { 155 return new IssuedTokenImpl(context.getModel(), element); 156 } 157 } 158 159 public static class KerberosTokenFactory extends ElementFactory { 160 @Override 161 public Set <QName > getElementQNames() { 162 return Collections.singleton(TokensQName.KERBEROSTOKEN.getQName()); 163 } 164 public <C extends WSDLComponent> C create(WSDLComponent context, Class <C> type) { 165 return type.cast(new KerberosTokenImpl(context.getModel())); 166 } 167 @Override 168 public WSDLComponent create(WSDLComponent context, Element element) { 169 return new KerberosTokenImpl(context.getModel(), element); 170 } 171 } 172 173 public static class ProtectionTokenFactory extends ElementFactory { 174 @Override 175 public Set <QName > getElementQNames() { 176 return Collections.singleton(TokensQName.PROTECTIONTOKEN.getQName()); 177 } 178 public <C extends WSDLComponent> C create(WSDLComponent context, Class <C> type) { 179 return type.cast(new ProtectionTokenImpl(context.getModel())); 180 } 181 @Override 182 public WSDLComponent create(WSDLComponent context, Element element) { 183 return new ProtectionTokenImpl(context.getModel(), element); 184 } 185 } 186 187 public static class TransportTokenFactory extends ElementFactory { 188 @Override 189 public Set <QName > getElementQNames() { 190 return Collections.singleton(TokensQName.TRANSPORTTOKEN.getQName()); 191 } 192 public <C extends WSDLComponent> C create(WSDLComponent context, Class <C> type) { 193 return type.cast(new TransportTokenImpl(context.getModel())); 194 } 195 @Override 196 public WSDLComponent create(WSDLComponent context, Element element) { 197 return new TransportTokenImpl(context.getModel(), element); 198 } 199 } 200 201 public static class RecipientTokenFactory extends ElementFactory { 202 @Override 203 public Set <QName > getElementQNames() { 204 return Collections.singleton(TokensQName.RECIPIENTTOKEN.getQName()); 205 } 206 public <C extends WSDLComponent> C create(WSDLComponent context, Class <C> type) { 207 return type.cast(new RecipientTokenImpl(context.getModel())); 208 } 209 @Override 210 public WSDLComponent create(WSDLComponent context, Element element) { 211 return new RecipientTokenImpl(context.getModel(), element); 212 } 213 } 214 215 public static class RelTokenFactory extends ElementFactory { 216 @Override 217 public Set <QName > getElementQNames() { 218 return Collections.singleton(TokensQName.RELTOKEN.getQName()); 219 } 220 public <C extends WSDLComponent> C create(WSDLComponent context, Class <C> type) { 221 return type.cast(new RelTokenImpl(context.getModel())); 222 } 223 @Override 224 public WSDLComponent create(WSDLComponent context, Element element) { 225 return new RelTokenImpl(context.getModel(), element); 226 } 227 } 228 229 public static class SamlTokenFactory extends ElementFactory { 230 @Override 231 public Set <QName > getElementQNames() { 232 return Collections.singleton(TokensQName.SAMLTOKEN.getQName()); 233 } 234 public <C extends WSDLComponent> C create(WSDLComponent context, Class <C> type) { 235 return type.cast(new SamlTokenImpl(context.getModel())); 236 } 237 @Override 238 public WSDLComponent create(WSDLComponent context, Element element) { 239 return new SamlTokenImpl(context.getModel(), element); 240 } 241 } 242 243 public static class SecureConversationTokenFactory extends ElementFactory { 244 @Override 245 public Set <QName > getElementQNames() { 246 return Collections.singleton(TokensQName.SECURECONVERSATIONTOKEN.getQName()); 247 } 248 public <C extends WSDLComponent> C create(WSDLComponent context, Class <C> type) { 249 return type.cast(new SecureConversationTokenImpl(context.getModel())); 250 } 251 @Override 252 public WSDLComponent create(WSDLComponent context, Element element) { 253 return new SecureConversationTokenImpl(context.getModel(), element); 254 } 255 } 256 257 public static class SecurityContextTokenFactory extends ElementFactory { 258 @Override 259 public Set <QName > getElementQNames() { 260 return Collections.singleton(TokensQName.SECURITYCONTEXTTOKEN.getQName()); 261 } 262 public <C extends WSDLComponent> C create(WSDLComponent context, Class <C> type) { 263 return type.cast(new SecurityContextTokenImpl(context.getModel())); 264 } 265 @Override 266 public WSDLComponent create(WSDLComponent context, Element element) { 267 return new SecurityContextTokenImpl(context.getModel(), element); 268 } 269 } 270 271 public static class SpnegoContextTokenFactory extends ElementFactory { 272 @Override 273 public Set <QName > getElementQNames() { 274 return Collections.singleton(TokensQName.SPNEGOCONTEXTTOKEN.getQName()); 275 } 276 public <C extends WSDLComponent> C create(WSDLComponent context, Class <C> type) { 277 return type.cast(new SpnegoContextTokenImpl(context.getModel())); 278 } 279 @Override 280 public WSDLComponent create(WSDLComponent context, Element element) { 281 return new SpnegoContextTokenImpl(context.getModel(), element); 282 } 283 } 284 285 public static class UsernameTokenFactory extends ElementFactory { 286 @Override 287 public Set <QName > getElementQNames() { 288 return Collections.singleton(TokensQName.USERNAMETOKEN.getQName()); 289 } 290 public <C extends WSDLComponent> C create(WSDLComponent context, Class <C> type) { 291 return type.cast(new UsernameTokenImpl(context.getModel())); 292 } 293 @Override 294 public WSDLComponent create(WSDLComponent context, Element element) { 295 return new UsernameTokenImpl(context.getModel(), element); 296 } 297 } 298 299 public static class X509TokenFactory extends ElementFactory { 300 @Override 301 public Set <QName > getElementQNames() { 302 return Collections.singleton(TokensQName.X509TOKEN.getQName()); 303 } 304 public <C extends WSDLComponent> C create(WSDLComponent context, Class <C> type) { 305 return type.cast(new X509TokenImpl(context.getModel())); 306 } 307 @Override 308 public WSDLComponent create(WSDLComponent context, Element element) { 309 return new X509TokenImpl(context.getModel(), element); 310 } 311 } 312 313 public static class WssUsernameToken10Factory extends ElementFactory { 314 @Override 315 public Set <QName > getElementQNames() { 316 return Collections.singleton(TokensQName.WSSUSERNAMETOKEN10.getQName()); 317 } 318 public <C extends WSDLComponent> C create(WSDLComponent context, Class <C> type) { 319 return type.cast(new WssUsernameToken10Impl(context.getModel())); 320 } 321 @Override 322 public WSDLComponent create(WSDLComponent context, Element element) { 323 return new WssUsernameToken10Impl(context.getModel(), element); 324 } 325 } 326 327 public static class WssUsernameToken11Factory extends ElementFactory { 328 @Override 329 public Set <QName > getElementQNames() { 330 return Collections.singleton(TokensQName.WSSUSERNAMETOKEN11.getQName()); 331 } 332 public <C extends WSDLComponent> C create(WSDLComponent context, Class <C> type) { 333 return type.cast(new WssUsernameToken11Impl(context.getModel())); 334 } 335 @Override 336 public WSDLComponent create(WSDLComponent context, Element element) { 337 return new WssUsernameToken11Impl(context.getModel(), element); 338 } 339 } 340 341 public static class IssuerFactory extends ElementFactory { 342 @Override 343 public Set <QName > getElementQNames() { 344 return Collections.singleton(TokensQName.ISSUER.getQName()); 345 } 346 public <C extends WSDLComponent> C create(WSDLComponent context, Class <C> type) { 347 return type.cast(new IssuerImpl(context.getModel())); 348 } 349 @Override 350 public WSDLComponent create(WSDLComponent context, Element element) { 351 return new IssuerImpl(context.getModel(), element); 352 } 353 } 354 355 public static class RequireDerivedKeysFactory extends ElementFactory { 356 @Override 357 public Set <QName > getElementQNames() { 358 return Collections.singleton(TokensQName.REQUIREDERIVEDKEYS.getQName()); 359 } 360 public <C extends WSDLComponent> C create(WSDLComponent context, Class <C> type) { 361 return type.cast(new RequireDerivedKeysImpl(context.getModel())); 362 } 363 @Override 364 public WSDLComponent create(WSDLComponent context, Element element) { 365 return new RequireDerivedKeysImpl(context.getModel(), element); 366 } 367 } 368 369 public static class RequireExternalReferenceFactory extends ElementFactory { 370 @Override 371 public Set <QName > getElementQNames() { 372 return Collections.singleton(TokensQName.REQUIREEXTERNALREFERENCE.getQName()); 373 } 374 public <C extends WSDLComponent> C create(WSDLComponent context, Class <C> type) { 375 return type.cast(new RequireExternalReferenceImpl(context.getModel())); 376 } 377 @Override 378 public WSDLComponent create(WSDLComponent context, Element element) { 379 return new RequireExternalReferenceImpl(context.getModel(), element); 380 } 381 } 382 383 public static class RequireInternalReferenceFactory extends ElementFactory { 384 @Override 385 public Set <QName > getElementQNames() { 386 return Collections.singleton(TokensQName.REQUIREINTERNALREFERENCE.getQName()); 387 } 388 public <C extends WSDLComponent> C create(WSDLComponent context, Class <C> type) { 389 return type.cast(new RequireInternalReferenceImpl(context.getModel())); 390 } 391 @Override 392 public WSDLComponent create(WSDLComponent context, Element element) { 393 return new RequireInternalReferenceImpl(context.getModel(), element); 394 } 395 } 396 397 public static class RequireKeyIdentifierReferenceFactory extends ElementFactory { 398 @Override 399 public Set <QName > getElementQNames() { 400 return Collections.singleton(TokensQName.REQUIREKEYIDENTIFIERREFERENCE.getQName()); 401 } 402 public <C extends WSDLComponent> C create(WSDLComponent context, Class <C> type) { 403 return type.cast(new RequireKeyIdentifierReferenceImpl(context.getModel())); 404 } 405 @Override 406 public WSDLComponent create(WSDLComponent context, Element element) { 407 return new RequireKeyIdentifierReferenceImpl(context.getModel(), element); 408 } 409 } 410 411 public static class RequireIssuerSerialReferenceFactory extends ElementFactory { 412 @Override 413 public Set <QName > getElementQNames() { 414 return Collections.singleton(TokensQName.REQUIREISSUERSERIALREFERENCE.getQName()); 415 } 416 public <C extends WSDLComponent> C create(WSDLComponent context, Class <C> type) { 417 return type.cast(new RequireIssuerSerialReferenceImpl(context.getModel())); 418 } 419 @Override 420 public WSDLComponent create(WSDLComponent context, Element element) { 421 return new RequireIssuerSerialReferenceImpl(context.getModel(), element); 422 } 423 } 424 425 public static class RequireThumbprintReferenceFactory extends ElementFactory { 426 @Override 427 public Set <QName > getElementQNames() { 428 return Collections.singleton(TokensQName.REQUIRETHUMBPRINTREFERENCE.getQName()); 429 } 430 public <C extends WSDLComponent> C create(WSDLComponent context, Class <C> type) { 431 return type.cast(new RequireThumbprintReferenceImpl(context.getModel())); 432 } 433 @Override 434 public WSDLComponent create(WSDLComponent context, Element element) { 435 return new RequireThumbprintReferenceImpl(context.getModel(), element); 436 } 437 } 438 439 public static class RequireEmbeddedTokenReferenceFactory extends ElementFactory { 440 @Override 441 public Set <QName > getElementQNames() { 442 return Collections.singleton(TokensQName.REQUIREEMBEDDEDTOKENREFERENCE.getQName()); 443 } 444 public <C extends WSDLComponent> C create(WSDLComponent context, Class <C> type) { 445 return type.cast(new RequireEmbeddedTokenReferenceImpl(context.getModel())); 446 } 447 @Override 448 public WSDLComponent create(WSDLComponent context, Element element) { 449 return new RequireEmbeddedTokenReferenceImpl(context.getModel(), element); 450 } 451 } 452 453 public static class RequireExternalUriReferenceFactory extends ElementFactory { 454 @Override 455 public Set <QName > getElementQNames() { 456 return Collections.singleton(TokensQName.REQUIREEXTERNALURIREFERENCE.getQName()); 457 } 458 public <C extends WSDLComponent> C create(WSDLComponent context, Class <C> type) { 459 return type.cast(new RequireExternalUriReferenceImpl(context.getModel())); 460 } 461 @Override 462 public WSDLComponent create(WSDLComponent context, Element element) { 463 return new RequireExternalUriReferenceImpl(context.getModel(), element); 464 } 465 } 466 467 public static class SC10SecurityContextTokenFactory extends ElementFactory { 468 @Override 469 public Set <QName > getElementQNames() { 470 return Collections.singleton(TokensQName.SC10SECURITYCONTEXTTOKEN.getQName()); 471 } 472 public <C extends WSDLComponent> C create(WSDLComponent context, Class <C> type) { 473 return type.cast(new SC10SecurityContextTokenImpl(context.getModel())); 474 } 475 @Override 476 public WSDLComponent create(WSDLComponent context, Element element) { 477 return new SC10SecurityContextTokenImpl(context.getModel(), element); 478 } 479 } 480 481 public static class WssX509V1Token10Factory extends ElementFactory { 482 @Override 483 public Set <QName > getElementQNames() { 484 return Collections.singleton(TokensQName.WSSX509V1TOKEN10.getQName()); 485 } 486 public <C extends WSDLComponent> C create(WSDLComponent context, Class <C> type) { 487 return type.cast(new WssX509V1Token10Impl(context.getModel())); 488 } 489 @Override 490 public WSDLComponent create(WSDLComponent context, Element element) { 491 return new WssX509V1Token10Impl(context.getModel(), element); 492 } 493 } 494 495 public static class WssX509V3Token10Factory extends ElementFactory { 496 @Override 497 public Set <QName > getElementQNames() { 498 return Collections.singleton(TokensQName.WSSX509V3TOKEN10.getQName()); 499 } 500 public <C extends WSDLComponent> C create(WSDLComponent context, Class <C> type) { 501 return type.cast(new WssX509V3Token10Impl(context.getModel())); 502 } 503 @Override 504 public WSDLComponent create(WSDLComponent context, Element element) { 505 return new WssX509V3Token10Impl(context.getModel(), element); 506 } 507 } 508 509 public static class WssX509Pkcs7Token10Factory extends ElementFactory { 510 @Override 511 public Set <QName > getElementQNames() { 512 return Collections.singleton(TokensQName.WSSX509PKCS7TOKEN10.getQName()); 513 } 514 public <C extends WSDLComponent> C create(WSDLComponent context, Class <C> type) { 515 return type.cast(new WssX509Pkcs7Token10Impl(context.getModel())); 516 } 517 @Override 518 public WSDLComponent create(WSDLComponent context, Element element) { 519 return new WssX509Pkcs7Token10Impl(context.getModel(), element); 520 } 521 } 522 523 public static class WssX509PkiPathV1Token10Factory extends ElementFactory { 524 @Override 525 public Set <QName > getElementQNames() { 526 return Collections.singleton(TokensQName.WSSX509PKIPATHV1TOKEN10.getQName()); 527 } 528 public <C extends WSDLComponent> C create(WSDLComponent context, Class <C> type) { 529 return type.cast(new WssX509PkiPathV1Token10Impl(context.getModel())); 530 } 531 @Override 532 public WSDLComponent create(WSDLComponent context, Element element) { 533 return new WssX509PkiPathV1Token10Impl(context.getModel(), element); 534 } 535 } 536 537 public static class WssX509V1Token11Factory extends ElementFactory { 538 @Override 539 public Set <QName > getElementQNames() { 540 return Collections.singleton(TokensQName.WSSX509V1TOKEN11.getQName()); 541 } 542 public <C extends WSDLComponent> C create(WSDLComponent context, Class <C> type) { 543 return type.cast(new WssX509V1Token11Impl(context.getModel())); 544 } 545 @Override 546 public WSDLComponent create(WSDLComponent context, Element element) { 547 return new WssX509V1Token11Impl(context.getModel(), element); 548 } 549 } 550 551 public static class WssX509V3Token11Factory extends ElementFactory { 552 @Override 553 public Set <QName > getElementQNames() { 554 return Collections.singleton(TokensQName.WSSX509V3TOKEN11.getQName()); 555 } 556 public <C extends WSDLComponent> C create(WSDLComponent context, Class <C> type) { 557 return type.cast(new WssX509V3Token11Impl(context.getModel())); 558 } 559 @Override 560 public WSDLComponent create(WSDLComponent context, Element element) { 561 return new WssX509V3Token11Impl(context.getModel(), element); 562 } 563 } 564 565 public static class WssX509Pkcs7Token11Factory extends ElementFactory { 566 @Override 567 public Set <QName > getElementQNames() { 568 return Collections.singleton(TokensQName.WSSX509PKCS7TOKEN11.getQName()); 569 } 570 public <C extends WSDLComponent> C create(WSDLComponent context, Class <C> type) { 571 return type.cast(new WssX509Pkcs7Token11Impl(context.getModel())); 572 } 573 @Override 574 public WSDLComponent create(WSDLComponent context, Element element) { 575 return new WssX509Pkcs7Token11Impl(context.getModel(), element); 576 } 577 } 578 579 public static class WssX509PkiPathV1Token11Factory extends ElementFactory { 580 @Override 581 public Set <QName > getElementQNames() { 582 return Collections.singleton(TokensQName.WSSX509PKIPATHV1TOKEN11.getQName()); 583 } 584 public <C extends WSDLComponent> C create(WSDLComponent context, Class <C> type) { 585 return type.cast(new WssX509PkiPathV1Token11Impl(context.getModel())); 586 } 587 @Override 588 public WSDLComponent create(WSDLComponent context, Element element) { 589 return new WssX509PkiPathV1Token11Impl(context.getModel(), element); 590 } 591 } 592 593 public static class WssSamlV10Token10Factory extends ElementFactory { 594 @Override 595 public Set <QName > getElementQNames() { 596 return Collections.singleton(TokensQName.WSSSAMLV10TOKEN10.getQName()); 597 } 598 public <C extends WSDLComponent> C create(WSDLComponent context, Class <C> type) { 599 return type.cast(new WssSamlV10Token10Impl(context.getModel())); 600 } 601 @Override 602 public WSDLComponent create(WSDLComponent context, Element element) { 603 return new WssSamlV10Token10Impl(context.getModel(), element); 604 } 605 } 606 607 public static class WssSamlV11Token10Factory extends ElementFactory { 608 @Override 609 public Set <QName > getElementQNames() { 610 return Collections.singleton(TokensQName.WSSSAMLV11TOKEN10.getQName()); 611 } 612 public <C extends WSDLComponent> C create(WSDLComponent context, Class <C> type) { 613 return type.cast(new WssSamlV11Token10Impl(context.getModel())); 614 } 615 @Override 616 public WSDLComponent create(WSDLComponent context, Element element) { 617 return new WssSamlV11Token10Impl(context.getModel(), element); 618 } 619 } 620 621 public static class WssSamlV10Token11Factory extends ElementFactory { 622 @Override 623 public Set <QName > getElementQNames() { 624 return Collections.singleton(TokensQName.WSSSAMLV10TOKEN11.getQName()); 625 } 626 public <C extends WSDLComponent> C create(WSDLComponent context, Class <C> type) { 627 return type.cast(new WssSamlV10Token11Impl(context.getModel())); 628 } 629 @Override 630 public WSDLComponent create(WSDLComponent context, Element element) { 631 return new WssSamlV10Token11Impl(context.getModel(), element); 632 } 633 } 634 635 public static class WssSamlV11Token11Factory extends ElementFactory { 636 @Override 637 public Set <QName > getElementQNames() { 638 return Collections.singleton(TokensQName.WSSSAMLV11TOKEN11.getQName()); 639 } 640 public <C extends WSDLComponent> C create(WSDLComponent context, Class <C> type) { 641 return type.cast(new WssSamlV11Token11Impl(context.getModel())); 642 } 643 @Override 644 public WSDLComponent create(WSDLComponent context, Element element) { 645 return new WssSamlV11Token11Impl(context.getModel(), element); 646 } 647 } 648 649 public static class WssSamlV20Token11Factory extends ElementFactory { 650 @Override 651 public Set <QName > getElementQNames() { 652 return Collections.singleton(TokensQName.WSSSAMLV20TOKEN11.getQName()); 653 } 654 public <C extends WSDLComponent> C create(WSDLComponent context, Class <C> type) { 655 return type.cast(new WssSamlV20Token11Impl(context.getModel())); 656 } 657 @Override 658 public WSDLComponent create(WSDLComponent context, Element element) { 659 return new WssSamlV20Token11Impl(context.getModel(), element); 660 } 661 } 662 663 public static class WssRelV10Token10Factory extends ElementFactory { 664 @Override 665 public Set <QName > getElementQNames() { 666 return Collections.singleton(TokensQName.WSSRELV10TOKEN10.getQName()); 667 } 668 public <C extends WSDLComponent> C create(WSDLComponent context, Class <C> type) { 669 return type.cast(new WssRelV10Token10Impl(context.getModel())); 670 } 671 @Override 672 public WSDLComponent create(WSDLComponent context, Element element) { 673 return new WssRelV10Token10Impl(context.getModel(), element); 674 } 675 } 676 677 public static class WssRelV20Token10Factory extends ElementFactory { 678 @Override 679 public Set <QName > getElementQNames() { 680 return Collections.singleton(TokensQName.WSSRELV20TOKEN10.getQName()); 681 } 682 public <C extends WSDLComponent> C create(WSDLComponent context, Class <C> type) { 683 return type.cast(new WssRelV20Token10Impl(context.getModel())); 684 } 685 @Override 686 public WSDLComponent create(WSDLComponent context, Element element) { 687 return new WssRelV20Token10Impl(context.getModel(), element); 688 } 689 } 690 691 public static class WssRelV10Token11Factory extends ElementFactory { 692 @Override 693 public Set <QName > getElementQNames() { 694 return Collections.singleton(TokensQName.WSSRELV10TOKEN11.getQName()); 695 } 696 public <C extends WSDLComponent> C create(WSDLComponent context, Class <C> type) { 697 return type.cast(new WssRelV10Token11Impl(context.getModel())); 698 } 699 @Override 700 public WSDLComponent create(WSDLComponent context, Element element) { 701 return new WssRelV10Token11Impl(context.getModel(), element); 702 } 703 } 704 705 public static class WssRelV20Token11Factory extends ElementFactory { 706 @Override 707 public Set <QName > getElementQNames() { 708 return Collections.singleton(TokensQName.WSSRELV20TOKEN11.getQName()); 709 } 710 public <C extends WSDLComponent> C create(WSDLComponent context, Class <C> type) { 711 return type.cast(new WssRelV20Token11Impl(context.getModel())); 712 } 713 @Override 714 public WSDLComponent create(WSDLComponent context, Element element) { 715 return new WssRelV20Token11Impl(context.getModel(), element); 716 } 717 } 718 719 public static class WssKerberosV5ApReqToken11Factory extends ElementFactory { 720 @Override 721 public Set <QName > getElementQNames() { 722 return Collections.singleton(TokensQName.WSSKERBEROSV5APREQTOKEN11.getQName()); 723 } 724 public <C extends WSDLComponent> C create(WSDLComponent context, Class <C> type) { 725 return type.cast(new WssKerberosV5ApReqToken11Impl(context.getModel())); 726 } 727 @Override 728 public WSDLComponent create(WSDLComponent context, Element element) { 729 return new WssKerberosV5ApReqToken11Impl(context.getModel(), element); 730 } 731 } 732 733 public static class WssGssKerberosV5ApReqToken11Factory extends ElementFactory { 734 @Override 735 public Set <QName > getElementQNames() { 736 return Collections.singleton(TokensQName.WSSGSSKERBEROSV5APREQTOKEN11.getQName()); 737 } 738 public <C extends WSDLComponent> C create(WSDLComponent context, Class <C> type) { 739 return type.cast(new WssGssKerberosV5ApReqToken11Impl(context.getModel())); 740 } 741 @Override 742 public WSDLComponent create(WSDLComponent context, Element element) { 743 return new WssGssKerberosV5ApReqToken11Impl(context.getModel(), element); 744 } 745 } 746 } 747 | Popular Tags |