001: /*
002: * $Id: RequestSecurityTokenResponseImpl.java,v 1.1 2007/08/23 12:40:56 shyam_rao Exp $
003: */
004:
005: /*
006: * The contents of this file are subject to the terms
007: * of the Common Development and Distribution License
008: * (the License). You may not use this file except in
009: * compliance with the License.
010: *
011: * You can obtain a copy of the license at
012: * https://glassfish.dev.java.net/public/CDDLv1.0.html.
013: * See the License for the specific language governing
014: * permissions and limitations under the License.
015: *
016: * When distributing Covered Code, include this CDDL
017: * Header Notice in each file and include the License file
018: * at https://glassfish.dev.java.net/public/CDDLv1.0.html.
019: * If applicable, add the following below the CDDL Header,
020: * with the fields enclosed by brackets [] replaced by
021: * you own identifying information:
022: * "Portions Copyrighted [year] [name of copyright owner]"
023: *
024: * Copyright 2006 Sun Microsystems Inc. All Rights Reserved
025: */
026:
027: package com.sun.xml.ws.security.trust.impl.wssx.elements;
028:
029: import java.util.List;
030: import java.util.Map;
031:
032: import java.net.URI;
033:
034: import com.sun.xml.ws.policy.impl.bindings.AppliesTo;
035: import com.sun.xml.ws.policy.Policy;
036: import com.sun.xml.ws.policy.impl.bindings.PolicyReference;
037: import javax.xml.bind.JAXBElement;
038: import javax.xml.namespace.QName;
039:
040: import com.sun.xml.ws.api.security.trust.WSTrustException;
041: import com.sun.xml.ws.security.trust.WSTrustConstants;
042:
043: import com.sun.xml.ws.security.trust.elements.*;
044: import com.sun.xml.ws.security.trust.elements.Entropy;
045: import com.sun.xml.ws.security.trust.elements.Lifetime;
046:
047: import com.sun.xml.ws.security.trust.elements.RequestSecurityTokenResponse;
048: import com.sun.xml.ws.security.trust.impl.wssx.bindings.AllowPostdatingType;
049: import com.sun.xml.ws.security.trust.impl.wssx.bindings.AuthenticatorType;
050: import com.sun.xml.ws.security.trust.impl.wssx.bindings.BinaryExchangeType;
051: import com.sun.xml.ws.security.trust.impl.wssx.bindings.DelegateToType;
052: import com.sun.xml.ws.security.trust.impl.wssx.bindings.EncryptionType;
053: import com.sun.xml.ws.security.trust.impl.wssx.bindings.RequestSecurityTokenResponseType;
054: import com.sun.xml.ws.security.trust.impl.wssx.bindings.EntropyType;
055: import com.sun.xml.ws.security.trust.impl.wssx.bindings.LifetimeType;
056: import com.sun.xml.ws.security.trust.impl.wssx.bindings.RequestedReferenceType;
057: import com.sun.xml.ws.security.trust.impl.wssx.bindings.RequestedProofTokenType;
058: import com.sun.xml.ws.security.trust.impl.wssx.bindings.RequestedSecurityTokenType;
059: import com.sun.xml.ws.security.trust.impl.wssx.bindings.RequestedTokenCancelledType;
060:
061: import com.sun.xml.ws.security.trust.impl.wssx.bindings.ObjectFactory;
062: import com.sun.xml.ws.security.trust.impl.wssx.bindings.OnBehalfOfType;
063: import com.sun.xml.ws.security.trust.impl.wssx.bindings.ProofEncryptionType;
064: import com.sun.xml.ws.security.trust.impl.wssx.bindings.RenewingType;
065: import com.sun.xml.ws.security.trust.impl.wssx.bindings.SignChallengeType;
066: import com.sun.xml.ws.security.trust.impl.wssx.bindings.StatusType;
067: import com.sun.xml.ws.security.trust.impl.wssx.bindings.UseKeyType;
068:
069: /**
070: * Implementation of a RequestSecurityTokenResponse.
071: *
072: * @author Manveen Kaur
073: */
074: public class RequestSecurityTokenResponseImpl extends
075: RequestSecurityTokenResponseType implements
076: RequestSecurityTokenResponse {
077:
078: private URI tokenType = null;
079:
080: private long keySize = 0;
081:
082: private URI keyType = null;
083: private URI computedKeyAlgorithm = null;
084: private URI signatureAlgorithm = null;
085: private URI encryptionAlgorithm = null;
086: private URI canonAlgorithm = null;
087:
088: private Lifetime lifetime = null;
089: private Entropy entropy = null;
090: private AppliesTo appliesTo = null;
091: private Authenticator authenticator = null;
092: private UseKey useKey = null;
093: private ProofEncryption proofEncryption = null;
094: private Encryption encryption = null;
095: private DelegateTo delegateTo = null;
096:
097: private OnBehalfOf obo = null;
098: private RequestedSecurityToken requestedSecToken = null;
099: private RequestedProofToken requestedProofToken = null;
100: private RequestedAttachedReference requestedAttachedReference = null;
101: private RequestedUnattachedReference requestedUnattachedReference = null;
102:
103: private URI signWith = null;
104: private URI encryptWith = null;
105: private URI authenticationType = null;
106:
107: private SignChallenge signChallenge = null;
108: private SignChallengeResponse signChallengeRes = null;
109:
110: private boolean forwardable = true;
111: private boolean delegatable = false;
112:
113: private Issuer issuer = null;
114: private Renewing renewable = null;
115:
116: private BinaryExchange binaryExchange = null;
117: private AllowPostdating apd = null;
118: private Status status = null;
119:
120: private Policy policy = null;
121: private PolicyReference policyRef = null;
122:
123: private RequestedTokenCancelled rtc = null;
124:
125: public RequestSecurityTokenResponseImpl() {
126: // default empty constructor
127: }
128:
129: public RequestSecurityTokenResponseImpl(URI tokenType, URI context,
130: RequestedSecurityToken token, AppliesTo scopes,
131: RequestedAttachedReference attached,
132: RequestedUnattachedReference unattached,
133: RequestedProofToken proofToken, Entropy entropy,
134: Lifetime lifetime, Status status) {
135:
136: setTokenType(tokenType);
137: if (context != null)
138: setContext(context.toString());
139: if (token != null)
140: setRequestedSecurityToken(token);
141: if (attached != null)
142: setRequestedAttachedReference(attached);
143: if (unattached != null)
144: setRequestedUnattachedReference(unattached);
145: if (scopes != null)
146: setAppliesTo(scopes);
147: if (proofToken != null)
148: setRequestedProofToken(proofToken);
149: if (entropy != null)
150: setEntropy(entropy);
151: if (lifetime != null)
152: setLifetime(lifetime);
153: if (status != null)
154: setStatus(status);
155: }
156:
157: public URI getTokenType() {
158: return tokenType;
159: }
160:
161: public void setTokenType(URI tokenType) {
162: if (tokenType != null) {
163: this .tokenType = tokenType;
164: JAXBElement<String> ttElement = (new ObjectFactory())
165: .createTokenType(tokenType.toString());
166: getAny().add(ttElement);
167: }
168: }
169:
170: public Map<QName, String> getOtherAttributes() {
171: return getOtherAttributes();
172: }
173:
174: public Lifetime getLifetime() {
175: return lifetime;
176: }
177:
178: public void setLifetime(Lifetime lifetime) {
179: this .lifetime = lifetime;
180: JAXBElement<LifetimeType> ltElement = (new ObjectFactory())
181: .createLifetime((LifetimeType) lifetime);
182: getAny().add(ltElement);
183: }
184:
185: public RequestedTokenCancelled getRequestedTokenCancelled() {
186: return this .rtc;
187: }
188:
189: public void setRequestedTokenCancelled(RequestedTokenCancelled rtc) {
190: this .rtc = rtc;
191: JAXBElement<RequestedTokenCancelledType> rtcElement = (new ObjectFactory())
192: .createRequestedTokenCancelled((RequestedTokenCancelledType) rtc);
193: getAny().add(rtcElement);
194: }
195:
196: public Status getStatus() {
197: return status;
198: }
199:
200: public void setStatus(Status status) {
201: this .status = status;
202: JAXBElement<StatusType> sElement = (new ObjectFactory())
203: .createStatus((StatusType) status);
204: getAny().add(sElement);
205: }
206:
207: public Entropy getEntropy() {
208: return entropy;
209: }
210:
211: public void setEntropy(Entropy entropy) {
212: this .entropy = entropy;
213: JAXBElement<EntropyType> etElement = (new ObjectFactory())
214: .createEntropy((EntropyType) entropy);
215: getAny().add(etElement);
216: }
217:
218: public List<Object> getAny() {
219: return super .getAny();
220: }
221:
222: public String getContext() {
223: return getContext();
224: }
225:
226: public void setAppliesTo(AppliesTo appliesTo) {
227: getAny().add(appliesTo);
228: this .appliesTo = appliesTo;
229: }
230:
231: public AppliesTo getAppliesTo() {
232: return appliesTo;
233: }
234:
235: public void setOnBehalfOf(OnBehalfOf onBehalfOf) {
236: obo = onBehalfOf;
237: }
238:
239: public OnBehalfOf getOnBehalfOf() {
240: return obo;
241: }
242:
243: public void setIssuer(Issuer issuer) {
244: this .issuer = issuer;
245: // JAXBElement<EndpointReferenceImpl> eprType =
246: // (new com.sun.xml.ws.security.trust.impl.bindings.ObjectFactory()).createIssuer((EndpointReferenceImpl)issuer);
247: // getAny().add(eprType);
248: }
249:
250: public Issuer getIssuer() {
251: return issuer;
252: }
253:
254: public void setRenewable(Renewing renew) {
255: renewable = renew;
256: JAXBElement<RenewingType> renewType = (new ObjectFactory())
257: .createRenewing((RenewingType) renew);
258: getAny().add(renewType);
259: }
260:
261: public Renewing getRenewable() {
262: return renewable;
263: }
264:
265: public void setSignChallenge(SignChallenge challenge) {
266: signChallenge = challenge;
267: JAXBElement<SignChallengeType> challengeType = (new ObjectFactory())
268: .createSignChallenge((SignChallengeType) challenge);
269: getAny().add(challengeType);
270: }
271:
272: public SignChallenge getSignChallenge() {
273: return signChallenge;
274: }
275:
276: public void setBinaryExchange(BinaryExchange exchange) {
277: binaryExchange = exchange;
278: JAXBElement<BinaryExchangeType> exchangeType = (new ObjectFactory())
279: .createBinaryExchange((BinaryExchangeType) exchange);
280: getAny().add(exchangeType);
281: }
282:
283: public BinaryExchange getBinaryExchange() {
284: return binaryExchange;
285: }
286:
287: public void setAuthenticationType(URI uri) {
288: this .authenticationType = uri;
289: JAXBElement<String> atElement = (new ObjectFactory())
290: .createAuthenticationType(uri.toString());
291: getAny().add(atElement);
292: }
293:
294: public URI getAuthenticationType() {
295: return authenticationType;
296: }
297:
298: public void setKeyType(URI keytype) throws WSTrustException {
299: if (keytype == null
300: || !(keytype.toString().equalsIgnoreCase(
301: RequestSecurityToken.PUBLIC_KEY_TYPE) || keytype
302: .toString()
303: .equalsIgnoreCase(
304: RequestSecurityToken.SYMMETRIC_KEY_TYPE)))
305: throw new WSTrustException("Invalid KeyType");
306: else {
307: this .keyType = keytype;
308: JAXBElement<String> ktElement = (new ObjectFactory())
309: .createKeyType(keyType.toString());
310: getAny().add(ktElement);
311: }
312: }
313:
314: public URI getKeyType() {
315: return keyType;
316: }
317:
318: public void setKeySize(long size) {
319: keySize = size;
320: JAXBElement<Long> ksElement = (new ObjectFactory())
321: .createKeySize(size);
322: getAny().add(ksElement);
323: }
324:
325: public long getKeySize() {
326: return keySize;
327: }
328:
329: public void setSignatureAlgorithm(URI algorithm) {
330: signatureAlgorithm = algorithm;
331: JAXBElement<String> signElement = (new ObjectFactory())
332: .createSignatureAlgorithm(algorithm.toString());
333: getAny().add(signElement);
334: }
335:
336: public URI getSignatureAlgorithm() {
337: return signatureAlgorithm;
338: }
339:
340: public void setEncryptionAlgorithm(URI algorithm) {
341: encryptionAlgorithm = algorithm;
342: JAXBElement<String> encElement = (new ObjectFactory())
343: .createEncryptionAlgorithm(algorithm.toString());
344: getAny().add(encElement);
345: }
346:
347: public URI getEncryptionAlgorithm() {
348: return encryptionAlgorithm;
349: }
350:
351: public void setCanonicalizationAlgorithm(URI algorithm) {
352: canonAlgorithm = algorithm;
353: JAXBElement<String> canonElement = (new ObjectFactory())
354: .createCanonicalizationAlgorithm(algorithm.toString());
355: getAny().add(canonElement);
356: }
357:
358: public URI getCanonicalizationAlgorithm() {
359: return canonAlgorithm;
360: }
361:
362: public void setUseKey(UseKey useKey) {
363: this .useKey = useKey;
364: JAXBElement<UseKeyType> ukElement = (new ObjectFactory())
365: .createUseKey((UseKeyType) useKey);
366: getAny().add(ukElement);
367: }
368:
369: public UseKey getUseKey() {
370: return useKey;
371: }
372:
373: public void setProofEncryption(ProofEncryption proofEncryption) {
374: this .proofEncryption = proofEncryption;
375: JAXBElement<ProofEncryptionType> proofElement = (new ObjectFactory())
376: .createProofEncryption((ProofEncryptionType) proofEncryption);
377: getAny().add(proofElement);
378: }
379:
380: public ProofEncryption getProofEncryption() {
381: return proofEncryption;
382: }
383:
384: public void setComputedKeyAlgorithm(URI algorithm) {
385: if (algorithm != null) {
386: String ckaString = algorithm.toString();
387: if (!ckaString.equalsIgnoreCase(WSTrustConstants.CK_HASH)
388: && !ckaString
389: .equalsIgnoreCase(WSTrustConstants.CK_PSHA1)) {
390: throw new RuntimeException(
391: "Invalid Computed Key Algorithm specified");
392: }
393: computedKeyAlgorithm = algorithm;
394: JAXBElement<String> ckaElement = (new ObjectFactory())
395: .createComputedKeyAlgorithm(ckaString);
396: getAny().add(ckaElement);
397: }
398: }
399:
400: public URI getComputedKeyAlgorithm() {
401: return computedKeyAlgorithm;
402: }
403:
404: public void setEncryption(Encryption enc) {
405: this .encryption = enc;
406: JAXBElement<EncryptionType> encElement = (new ObjectFactory())
407: .createEncryption((EncryptionType) enc);
408: getAny().add(encElement);
409: }
410:
411: public Encryption getEncryption() {
412: return encryption;
413: }
414:
415: public void setSignWith(URI algorithm) {
416: signWith = algorithm;
417: JAXBElement<String> sElement = (new ObjectFactory())
418: .createSignWith(algorithm.toString());
419: getAny().add(sElement);
420: }
421:
422: public URI getSignWith() {
423: return signWith;
424: }
425:
426: public void setEncryptWith(URI algorithm) {
427: encryptWith = algorithm;
428: JAXBElement<String> sElement = (new ObjectFactory())
429: .createEncryptWith(algorithm.toString());
430: getAny().add(sElement);
431: }
432:
433: public URI getEncryptWith() {
434: return encryptWith;
435: }
436:
437: public void setDelegateTo(DelegateTo to) {
438: this .delegateTo = to;
439: JAXBElement<DelegateToType> dtElement = (new ObjectFactory())
440: .createDelegateTo((DelegateToType) to);
441: getAny().add(dtElement);
442: }
443:
444: public DelegateTo getDelegateTo() {
445: return delegateTo;
446: }
447:
448: public void setForwardable(boolean flag) {
449: forwardable = flag;
450: JAXBElement<Boolean> forward = (new ObjectFactory())
451: .createForwardable(flag);
452: getAny().add(forward);
453: }
454:
455: public boolean getForwardable() {
456: return forwardable;
457: }
458:
459: public void setDelegatable(boolean flag) {
460: this .delegatable = flag;
461: JAXBElement<Boolean> del = (new ObjectFactory())
462: .createDelegatable(flag);
463: getAny().add(del);
464: }
465:
466: public boolean getDelegatable() {
467: return delegatable;
468: }
469:
470: public void setPolicy(Policy policy) {
471: this .policy = policy;
472: getAny().add(policy);
473: }
474:
475: public Policy getPolicy() {
476: return policy;
477: }
478:
479: public void setPolicyReference(PolicyReference policyRef) {
480: this .policyRef = policyRef;
481: getAny().add(policyRef);
482: }
483:
484: public PolicyReference getPolicyReference() {
485: return policyRef;
486: }
487:
488: public AllowPostdating getAllowPostdating() {
489: return apd;
490: }
491:
492: public void setAllowPostdating(AllowPostdating allowPostdating) {
493: apd = allowPostdating;
494: JAXBElement<AllowPostdatingType> allowPd = (new ObjectFactory())
495: .createAllowPostdating((AllowPostdatingType) apd);
496: getAny().add(allowPd);
497: }
498:
499: public void setSignChallengeResponse(SignChallengeResponse challenge) {
500: signChallengeRes = challenge;
501: JAXBElement<SignChallengeType> challengeType = (new ObjectFactory())
502: .createSignChallengeResponse((SignChallengeType) challenge);
503: getAny().add(challengeType);
504: }
505:
506: public SignChallengeResponse getSignChallengeResponse() {
507: return signChallengeRes;
508: }
509:
510: public void setAuthenticator(Authenticator authenticator) {
511: this .authenticator = authenticator;
512: JAXBElement<AuthenticatorType> authType = (new ObjectFactory())
513: .createAuthenticator((AuthenticatorType) authenticator);
514: getAny().add(authType);
515: }
516:
517: public Authenticator getAuthenticator() {
518: return authenticator;
519: }
520:
521: public void setRequestedProofToken(RequestedProofToken proofToken) {
522: requestedProofToken = proofToken;
523: JAXBElement<RequestedProofTokenType> pElement = (new ObjectFactory())
524: .createRequestedProofToken((RequestedProofTokenType) proofToken);
525: getAny().add(pElement);
526: }
527:
528: public RequestedProofToken getRequestedProofToken() {
529: return requestedProofToken;
530: }
531:
532: public void setRequestedSecurityToken(
533: RequestedSecurityToken securityToken) {
534: requestedSecToken = securityToken;
535: JAXBElement<RequestedSecurityTokenType> rstElement = (new ObjectFactory())
536: .createRequestedSecurityToken((RequestedSecurityTokenType) securityToken);
537:
538: getAny().add(rstElement);
539: }
540:
541: public RequestedSecurityToken getRequestedSecurityToken() {
542: return requestedSecToken;
543: }
544:
545: public void setRequestedAttachedReference(
546: RequestedAttachedReference reference) {
547: requestedAttachedReference = reference;
548: JAXBElement<RequestedReferenceType> raElement = (new ObjectFactory())
549: .createRequestedAttachedReference((RequestedReferenceType) reference);
550: getAny().add(raElement);
551: }
552:
553: public RequestedAttachedReference getRequestedAttachedReference() {
554: return requestedAttachedReference;
555: }
556:
557: public void setRequestedUnattachedReference(
558: RequestedUnattachedReference reference) {
559: requestedUnattachedReference = reference;
560: JAXBElement<RequestedReferenceType> raElement = (new ObjectFactory())
561: .createRequestedUnattachedReference((RequestedReferenceType) reference);
562: getAny().add(raElement);
563: }
564:
565: public RequestedUnattachedReference getRequestedUnattachedReference() {
566: return requestedUnattachedReference;
567: }
568:
569: public RequestSecurityTokenResponseImpl(
570: RequestSecurityTokenResponseType rstrType) throws Exception {
571:
572: this .context = rstrType.getContext();
573: List<Object> list = rstrType.getAny();
574: for (int i = 0; i < list.size(); i++) {
575:
576: if (list.get(i) instanceof AppliesTo) {
577: setAppliesTo((AppliesTo) list.get(i));
578: continue;
579: }
580:
581: if (list.get(i) instanceof JAXBElement) {
582:
583: JAXBElement obj = (JAXBElement) list.get(i);
584:
585: String local = obj.getName().getLocalPart();
586: if (local.equalsIgnoreCase("KeySize")) {
587: setKeySize((Long) obj.getValue());
588: } else if (local.equalsIgnoreCase("KeyType")) {
589: setKeyType(new URI((String) obj.getValue()));
590: } else if (local
591: .equalsIgnoreCase("ComputedKeyAlgorithm")) {
592: setComputedKeyAlgorithm(new URI((String) obj
593: .getValue()));
594: } else if (local.equalsIgnoreCase("TokenType")) {
595: setTokenType(new URI((String) obj.getValue()));
596: } else if (local.equalsIgnoreCase("AuthenticationType")) {
597: setAuthenticationType(new URI((String) obj
598: .getValue()));
599: } else if (local.equalsIgnoreCase("Lifetime")) {
600: LifetimeType ltType = (LifetimeType) obj.getValue();
601: setLifetime(new LifetimeImpl(ltType));
602: } else if (local.equalsIgnoreCase("Entropy")) {
603: EntropyType eType = (EntropyType) obj.getValue();
604: setEntropy(new EntropyImpl(eType));
605: } else if (local.equalsIgnoreCase("Forwardable")) {
606: setForwardable((Boolean) obj.getValue());
607: } else if (local.equalsIgnoreCase("Delegatable")) {
608: setDelegatable((Boolean) obj.getValue());
609: } else if (local.equalsIgnoreCase("SignWith")) {
610: setSignWith(new URI((String) obj.getValue()));
611: } else if (local.equalsIgnoreCase("EncryptWith")) {
612: setEncryptWith(new URI((String) obj.getValue()));
613: } else if (local.equalsIgnoreCase("SignatureAlgorithm")) {
614: setSignatureAlgorithm(new URI((String) obj
615: .getValue()));
616: } else if (local
617: .equalsIgnoreCase("EncryptionAlgorithm")) {
618: setEncryptionAlgorithm(new URI((String) obj
619: .getValue()));
620: } else if (local
621: .equalsIgnoreCase("CanonicalizationAlgorithm")) {
622: setCanonicalizationAlgorithm(new URI((String) obj
623: .getValue()));
624: } else if (local.equalsIgnoreCase("AllowPostdating")) {
625: setAllowPostdating(new AllowPostdatingImpl());
626: } else if (local.equalsIgnoreCase("SignChallenge")) {
627: setSignChallenge(new SignChallengeImpl());
628: } else if (local
629: .equalsIgnoreCase("SignChallengeResponse")) {
630: setSignChallengeResponse(new SignChallengeResponseImpl());
631: } else if (local.equalsIgnoreCase("BinaryExchange")) {
632: BinaryExchangeType bcType = (BinaryExchangeType) obj
633: .getValue();
634: setBinaryExchange(new BinaryExchangeImpl(bcType));
635: } else if (local.equalsIgnoreCase("Issuer")) {
636: // EndpointReferenceImpl isType = (EndpointReferenceImpl)obj.getValue();
637: // setIssuer(new IssuerImpl(isType));
638: } else if (local.equalsIgnoreCase("Authenticator")) {
639: AuthenticatorType aType = (AuthenticatorType) obj
640: .getValue();
641: setAuthenticator(new AuthenticatorImpl(aType));
642: } else if (local.equalsIgnoreCase("Renewing")) {
643: setRenewable(new RenewingImpl());
644: } else if (local.equalsIgnoreCase("ProofEncryption")) {
645: ProofEncryptionType peType = (ProofEncryptionType) obj
646: .getValue();
647: setProofEncryption(new ProofEncryptionImpl(peType));
648: } else if (local.equalsIgnoreCase("Policy")) {
649: setPolicy((Policy) obj.getValue());
650: } else if (local.equalsIgnoreCase("PolicyReference")) {
651: setPolicyReference((PolicyReference) obj.getValue());
652: } else if (local.equalsIgnoreCase("AppliesTo")) {
653: setAppliesTo((AppliesTo) obj.getValue());
654: } else if (local.equalsIgnoreCase("OnBehalfOf")) {
655: this .obo = (OnBehalfOf) obj.getValue();
656: } else if (local.equalsIgnoreCase("Encryption")) {
657: EncryptionType encType = (EncryptionType) obj
658: .getValue();
659: setEncryption(new EncryptionImpl(encType));
660: } else if (local.equalsIgnoreCase("UseKey")) {
661: UseKeyType ukType = (UseKeyType) obj.getValue();
662: setUseKey(new UseKeyImpl(ukType));
663: } else if (local.equalsIgnoreCase("Status")) {
664: setStatus((Status) obj.getValue());
665: } else if (local.equalsIgnoreCase("DelegateTo")) {
666: DelegateToType dtType = (DelegateToType) obj
667: .getValue();
668: setDelegateTo(new DelegateToImpl(dtType));
669: } else if (local
670: .equalsIgnoreCase("RequestedProofToken")) {
671: RequestedProofTokenType rptType = (RequestedProofTokenType) obj
672: .getValue();
673: setRequestedProofToken(new RequestedProofTokenImpl(
674: rptType));
675: } else if (local
676: .equalsIgnoreCase("RequestedSecurityToken")) {
677: RequestedSecurityTokenType rdstType = (RequestedSecurityTokenType) obj
678: .getValue();
679: setRequestedSecurityToken(new RequestedSecurityTokenImpl(
680: rdstType));
681: } else if (local
682: .equalsIgnoreCase("RequestedAttachedReference")) {
683: RequestedReferenceType rarType = (RequestedReferenceType) obj
684: .getValue();
685: setRequestedAttachedReference(new RequestedAttachedReferenceImpl(
686: rarType));
687: } else if (local
688: .equalsIgnoreCase("RequestedUnattachedReference")) {
689: RequestedReferenceType rarType = (RequestedReferenceType) obj
690: .getValue();
691: setRequestedUnattachedReference(new RequestedUnattachedReferenceImpl(
692: rarType));
693: } else if (local
694: .equalsIgnoreCase("RequestedTokenCancelled")) {
695: setRequestedTokenCancelled(new RequestedTokenCancelledImpl());
696: }
697: }
698: }
699: }
700:
701: }
|