Source Code Cross Referenced for RequestSecurityTokenImpl.java in  » 6.0-JDK-Modules-com.sun » wsit » com » sun » xml » ws » security » trust » impl » wssx » elements » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » 6.0 JDK Modules com.sun » wsit » com.sun.xml.ws.security.trust.impl.wssx.elements 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         * $Id: RequestSecurityTokenImpl.java,v 1.1 2007/08/23 12:40:55 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:
031:        import java.net.URI;
032:        import java.net.URISyntaxException;
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:
039:        import com.sun.xml.ws.security.trust.WSTrustConstants;
040:        import com.sun.xml.ws.api.security.trust.WSTrustException;
041:
042:        import com.sun.xml.ws.security.trust.elements.*;
043:        import com.sun.xml.ws.api.security.trust.Claims;
044:        import com.sun.xml.ws.security.trust.elements.Entropy;
045:        import com.sun.xml.ws.security.trust.elements.Lifetime;
046:        import com.sun.xml.ws.security.trust.elements.Participants;
047:
048:        import com.sun.xml.ws.security.trust.elements.RequestSecurityToken;
049:        import com.sun.xml.ws.security.trust.impl.wssx.bindings.AllowPostdatingType;
050:        import com.sun.xml.ws.security.trust.impl.wssx.bindings.BinaryExchangeType;
051:        import com.sun.xml.ws.security.trust.impl.wssx.bindings.CancelTargetType;
052:        import com.sun.xml.ws.security.trust.impl.wssx.bindings.RequestSecurityTokenType;
053:        import com.sun.xml.ws.security.trust.impl.wssx.bindings.LifetimeType;
054:        import com.sun.xml.ws.security.trust.impl.wssx.bindings.EntropyType;
055:        import com.sun.xml.ws.security.trust.impl.wssx.bindings.ClaimsType;
056:        import com.sun.xml.ws.security.trust.impl.wssx.bindings.DelegateToType;
057:        import com.sun.xml.ws.security.trust.impl.wssx.bindings.EncryptionType;
058:        import com.sun.xml.ws.security.trust.impl.wssx.bindings.OnBehalfOfType;
059:        import com.sun.xml.ws.security.trust.impl.wssx.bindings.ObjectFactory;
060:        import com.sun.xml.ws.security.trust.impl.wssx.bindings.ParticipantsType;
061:        import com.sun.xml.ws.security.trust.impl.wssx.bindings.ProofEncryptionType;
062:        import com.sun.xml.ws.security.trust.impl.wssx.bindings.RenewTargetType;
063:        import com.sun.xml.ws.security.trust.impl.wssx.bindings.RenewingType;
064:        import com.sun.xml.ws.security.trust.impl.wssx.bindings.SignChallengeType;
065:        import com.sun.xml.ws.security.trust.impl.wssx.bindings.UseKeyType;
066:
067:        /**
068:         * Implementation of the RequestSecurityToken interface.
069:         *
070:         * @author Manveen Kaur
071:         */
072:        public class RequestSecurityTokenImpl extends RequestSecurityTokenType
073:                implements  RequestSecurityToken {
074:
075:            private Claims claims = null;
076:            private Participants participants = null;
077:            private URI tokenType = null;
078:
079:            private URI requestType = null;
080:
081:            private long keySize = 0;
082:            private URI keyType = null;
083:            private URI computedKeyAlgorithm = null;
084:
085:            private URI signWith = null;
086:            private URI encryptWith = null;
087:            private URI authenticationType = null;
088:            private URI signatureAlgorithm = null;
089:            private URI encryptionAlgorithm = null;
090:            private URI canonAlgorithm = null;
091:
092:            private Lifetime lifetime = null;
093:            private Entropy entropy = null;
094:            private AppliesTo appliesTo = null;
095:            private OnBehalfOf obo = null;
096:            private SignChallenge signChallenge = null;
097:            private Encryption encryption = null;
098:            private UseKey useKey = null;
099:            private DelegateTo delegateTo = null;
100:            private RenewTarget renewTarget = null;
101:            private CancelTarget cancelTarget = null;
102:
103:            private AllowPostdating apd = null;
104:            private BinaryExchange binaryExchange = null;
105:            private Issuer issuer = null;
106:            private Renewing renewable = null;
107:            private ProofEncryption proofEncryption = null;
108:
109:            private boolean forwardable = true;
110:            private boolean delegatable = false;
111:
112:            private Policy policy = null;
113:            private PolicyReference policyRef = null;
114:
115:            public RequestSecurityTokenImpl() {
116:                setRequestType(URI.create(WSTrustConstants.ISSUE_REQUEST));
117:            }
118:
119:            public RequestSecurityTokenImpl(URI tokenType, URI requestType) {
120:                setTokenType(tokenType);
121:                setRequestType(requestType);
122:            }
123:
124:            public RequestSecurityTokenImpl(URI tokenType, URI requestType,
125:                    URI context, AppliesTo scopes, Claims claims,
126:                    Entropy entropy, Lifetime lt, URI algorithm) {
127:                setTokenType(tokenType);
128:                setRequestType(requestType);
129:                if (context != null) {
130:                    setContext(context.toString());
131:                }
132:                if (scopes != null) {
133:                    setAppliesTo(scopes);
134:                }
135:                if (claims != null) {
136:                    setClaims(claims);
137:                }
138:                if (entropy != null)
139:                    setEntropy(entropy);
140:                if (lt != null)
141:                    setLifetime(lt);
142:                if (algorithm != null)
143:                    setComputedKeyAlgorithm(algorithm);
144:            }
145:
146:            public RequestSecurityTokenImpl(URI tokenType, URI requestType,
147:                    URI context, RenewTarget target, AllowPostdating apd,
148:                    Renewing renewingInfo) {
149:                setTokenType(tokenType);
150:                setRequestType(requestType);
151:                if (context != null) {
152:                    setContext(context.toString());
153:                }
154:                if (context != null) {
155:                    setContext(context.toString());
156:                }
157:                if (target != null) {
158:                    setRenewTarget(target);
159:                }
160:                if (apd != null) {
161:                    setAllowPostdating(apd);
162:                }
163:                if (renewingInfo != null) {
164:                    setRenewable(renewingInfo);
165:                }
166:            }
167:
168:            public RequestSecurityTokenImpl(URI tokenType, URI requestType,
169:                    CancelTarget cancel) {
170:                setTokenType(tokenType);
171:                setRequestType(requestType);
172:                setCancelTarget(cancel);
173:            }
174:
175:            public String getContext() {
176:                return super .getContext();
177:            }
178:
179:            public void setClaims(Claims claims) {
180:                this .claims = claims;
181:                JAXBElement<ClaimsType> cElement = (new ObjectFactory())
182:                        .createClaims((ClaimsType) claims);
183:                getAny().add(cElement);
184:            }
185:
186:            public Claims getClaims() {
187:                return claims;
188:            }
189:
190:            public void setCancelTarget(CancelTarget cTarget) {
191:                this .cancelTarget = cTarget;
192:                JAXBElement<CancelTargetType> ctElement = (new ObjectFactory())
193:                        .createCancelTarget((CancelTargetType) cTarget);
194:                getAny().add(ctElement);
195:            }
196:
197:            public CancelTarget getCancelTarget() {
198:                return cancelTarget;
199:            }
200:
201:            public void setRenewTarget(RenewTarget target) {
202:                this .renewTarget = target;
203:                JAXBElement<RenewTargetType> rElement = (new ObjectFactory())
204:                        .createRenewTarget((RenewTargetType) target);
205:                getAny().add(rElement);
206:            }
207:
208:            public RenewTarget getRenewTarget() {
209:                return renewTarget;
210:            }
211:
212:            public void setParticipants(Participants participants) {
213:                this .participants = participants;
214:                JAXBElement<ParticipantsType> rElement = (new ObjectFactory())
215:                        .createParticipants((ParticipantsType) participants);
216:                getAny().add(rElement);
217:            }
218:
219:            public Participants getParticipants() {
220:                return participants;
221:            }
222:
223:            public URI getTokenType() {
224:                return tokenType;
225:            }
226:
227:            public void setTokenType(URI tokenType) {
228:                if (tokenType != null) {
229:                    this .tokenType = tokenType;
230:                    JAXBElement<String> ttElement = (new ObjectFactory())
231:                            .createTokenType(tokenType.toString());
232:                    getAny().add(ttElement);
233:                }
234:            }
235:
236:            public URI getRequestType() {
237:                return requestType;
238:            }
239:
240:            public void setRequestType(URI requestType) {
241:                if (requestType == null) {
242:                    throw new RuntimeException("RequestType cannot be null");
243:                }
244:                String rtString = requestType.toString();
245:                if (!rtString.equalsIgnoreCase(WSTrustConstants.ISSUE_REQUEST)
246:                        && !rtString
247:                                .equalsIgnoreCase(WSTrustConstants.CANCEL_REQUEST)
248:                        && !rtString
249:                                .equalsIgnoreCase(WSTrustConstants.KEY_EXCHANGE_REQUEST)
250:                        && !rtString
251:                                .equalsIgnoreCase(WSTrustConstants.RENEW_REQUEST)
252:                        && !rtString
253:                                .equalsIgnoreCase(WSTrustConstants.VALIDATE_REQUEST)) {
254:                    throw new RuntimeException("Invalid Request Type specified");
255:                }
256:                this .requestType = requestType;
257:                JAXBElement<String> rtElement = (new ObjectFactory())
258:                        .createRequestType(rtString);
259:                getAny().add(rtElement);
260:            }
261:
262:            public Lifetime getLifetime() {
263:                return lifetime;
264:            }
265:
266:            public void setLifetime(Lifetime lifetime) {
267:                this .lifetime = lifetime;
268:                JAXBElement<LifetimeType> ltElement = (new ObjectFactory())
269:                        .createLifetime((LifetimeType) lifetime);
270:                getAny().add(ltElement);
271:            }
272:
273:            public Entropy getEntropy() {
274:                return entropy;
275:            }
276:
277:            public void setEntropy(Entropy entropy) {
278:                this .entropy = entropy;
279:                JAXBElement<EntropyType> etElement = (new ObjectFactory())
280:                        .createEntropy((EntropyType) entropy);
281:                getAny().add(etElement);
282:            }
283:
284:            public void setAppliesTo(AppliesTo appliesTo) {
285:                getAny().add(appliesTo);
286:                this .appliesTo = appliesTo;
287:            }
288:
289:            public AppliesTo getAppliesTo() {
290:                return appliesTo;
291:            }
292:
293:            public void setOnBehalfOf(OnBehalfOf onBehalfOf) {
294:                obo = onBehalfOf;
295:            }
296:
297:            public OnBehalfOf getOnBehalfOf() {
298:                return obo;
299:            }
300:
301:            public void setIssuer(Issuer issuer) {
302:                this .issuer = issuer;
303:                //        JAXBElement<EndpointReferenceImpl> eprType =
304:                //                (new com.sun.xml.ws.security.trust.impl.wssx.bindings.ObjectFactory()).createIssuer((EndpointReferenceImpl)issuer);
305:                //        getAny().add(eprType);
306:            }
307:
308:            public Issuer getIssuer() {
309:                return issuer;
310:            }
311:
312:            public void setRenewable(Renewing renew) {
313:                renewable = renew;
314:                JAXBElement<RenewingType> renewType = (new ObjectFactory())
315:                        .createRenewing((RenewingType) renew);
316:                getAny().add(renewType);
317:            }
318:
319:            public Renewing getRenewable() {
320:                return renewable;
321:            }
322:
323:            public void setSignChallenge(SignChallenge challenge) {
324:                signChallenge = challenge;
325:                JAXBElement<SignChallengeType> challengeType = (new ObjectFactory())
326:                        .createSignChallenge((SignChallengeType) challenge);
327:                getAny().add(challengeType);
328:            }
329:
330:            public SignChallenge getSignChallenge() {
331:                return signChallenge;
332:            }
333:
334:            public void setBinaryExchange(BinaryExchange exchange) {
335:                binaryExchange = exchange;
336:                JAXBElement<BinaryExchangeType> exchangeType = (new ObjectFactory())
337:                        .createBinaryExchange((BinaryExchangeType) exchange);
338:                getAny().add(exchangeType);
339:            }
340:
341:            public BinaryExchange getBinaryExchange() {
342:                return binaryExchange;
343:            }
344:
345:            public void setAuthenticationType(URI uri) {
346:                this .authenticationType = uri;
347:                JAXBElement<String> atElement = (new ObjectFactory())
348:                        .createAuthenticationType(uri.toString());
349:                getAny().add(atElement);
350:            }
351:
352:            public URI getAuthenticationType() {
353:                return authenticationType;
354:            }
355:
356:            public void setKeyType(URI keytype) throws WSTrustException {
357:
358:                //if (keytype == null || ! (keytype.toString().equalsIgnoreCase(RequestSecurityToken.PUBLIC_KEY_TYPE)
359:                // || keytype.toString().equalsIgnoreCase(RequestSecurityToken.SYMMETRIC_KEY_TYPE) )){
360:                //  throw new WSTrustException("Invalid KeyType");
361:                // }
362:                // else {
363:                this .keyType = keytype;
364:                JAXBElement<String> ktElement = (new ObjectFactory())
365:                        .createKeyType(keyType.toString());
366:                getAny().add(ktElement);
367:                // }
368:            }
369:
370:            public URI getKeyType() {
371:                return keyType;
372:            }
373:
374:            public void setKeySize(long size) {
375:                keySize = size;
376:                JAXBElement<Long> ksElement = (new ObjectFactory())
377:                        .createKeySize(size);
378:                getAny().add(ksElement);
379:            }
380:
381:            public long getKeySize() {
382:                return keySize;
383:            }
384:
385:            public void setSignatureAlgorithm(URI algorithm) {
386:                signatureAlgorithm = algorithm;
387:                JAXBElement<String> signElement = (new ObjectFactory())
388:                        .createSignatureAlgorithm(algorithm.toString());
389:                getAny().add(signElement);
390:            }
391:
392:            public URI getSignatureAlgorithm() {
393:                return signatureAlgorithm;
394:            }
395:
396:            public void setEncryptionAlgorithm(URI algorithm) {
397:                encryptionAlgorithm = algorithm;
398:                JAXBElement<String> encElement = (new ObjectFactory())
399:                        .createEncryptionAlgorithm(algorithm.toString());
400:                getAny().add(encElement);
401:            }
402:
403:            public URI getEncryptionAlgorithm() {
404:                return encryptionAlgorithm;
405:            }
406:
407:            public void setCanonicalizationAlgorithm(URI algorithm) {
408:                canonAlgorithm = algorithm;
409:                JAXBElement<String> canonElement = (new ObjectFactory())
410:                        .createCanonicalizationAlgorithm(algorithm.toString());
411:                getAny().add(canonElement);
412:            }
413:
414:            public URI getCanonicalizationAlgorithm() {
415:                return canonAlgorithm;
416:            }
417:
418:            public void setUseKey(UseKey useKey) {
419:                this .useKey = useKey;
420:                JAXBElement<UseKeyType> ukElement = (new ObjectFactory())
421:                        .createUseKey((UseKeyType) useKey);
422:                getAny().add(ukElement);
423:            }
424:
425:            public UseKey getUseKey() {
426:                return useKey;
427:            }
428:
429:            public void setProofEncryption(ProofEncryption proofEncryption) {
430:                this .proofEncryption = proofEncryption;
431:                JAXBElement<ProofEncryptionType> proofElement = (new ObjectFactory())
432:                        .createProofEncryption((ProofEncryptionType) proofEncryption);
433:                getAny().add(proofElement);
434:            }
435:
436:            public ProofEncryption getProofEncryption() {
437:                return proofEncryption;
438:            }
439:
440:            public void setComputedKeyAlgorithm(URI algorithm) {
441:                if (algorithm != null) {
442:                    String ckaString = algorithm.toString();
443:                    if (!ckaString.equalsIgnoreCase(WSTrustConstants.CK_HASH)
444:                            && !ckaString
445:                                    .equalsIgnoreCase(WSTrustConstants.CK_PSHA1)) {
446:                        throw new RuntimeException(
447:                                "Invalid Computed Key Algorithm specified");
448:                    }
449:                    computedKeyAlgorithm = algorithm;
450:                    JAXBElement<String> ckaElement = (new ObjectFactory())
451:                            .createComputedKeyAlgorithm(ckaString);
452:                    getAny().add(ckaElement);
453:                }
454:            }
455:
456:            public URI getComputedKeyAlgorithm() {
457:                return computedKeyAlgorithm;
458:            }
459:
460:            public void setEncryption(Encryption enc) {
461:                this .encryption = enc;
462:                JAXBElement<EncryptionType> encElement = (new ObjectFactory())
463:                        .createEncryption((EncryptionType) enc);
464:                getAny().add(encElement);
465:            }
466:
467:            public Encryption getEncryption() {
468:                return encryption;
469:            }
470:
471:            public void setSignWith(URI algorithm) {
472:                signWith = algorithm;
473:                JAXBElement<String> sElement = (new ObjectFactory())
474:                        .createSignWith(algorithm.toString());
475:                getAny().add(sElement);
476:            }
477:
478:            public URI getSignWith() {
479:                return signWith;
480:            }
481:
482:            public void setEncryptWith(URI algorithm) {
483:                encryptWith = algorithm;
484:                JAXBElement<String> sElement = (new ObjectFactory())
485:                        .createEncryptWith(algorithm.toString());
486:                getAny().add(sElement);
487:            }
488:
489:            public URI getEncryptWith() {
490:                return encryptWith;
491:            }
492:
493:            public void setDelegateTo(DelegateTo to) {
494:                this .delegateTo = to;
495:                JAXBElement<DelegateToType> dtElement = (new ObjectFactory())
496:                        .createDelegateTo((DelegateToType) to);
497:                getAny().add(dtElement);
498:            }
499:
500:            public DelegateTo getDelegateTo() {
501:                return delegateTo;
502:            }
503:
504:            public void setForwardable(boolean flag) {
505:                forwardable = flag;
506:                JAXBElement<Boolean> forward = (new ObjectFactory())
507:                        .createForwardable(flag);
508:                getAny().add(forward);
509:            }
510:
511:            public boolean getForwardable() {
512:                return forwardable;
513:            }
514:
515:            public void setDelegatable(boolean flag) {
516:                delegatable = flag;
517:                JAXBElement<Boolean> del = (new ObjectFactory())
518:                        .createDelegatable(flag);
519:                getAny().add(del);
520:            }
521:
522:            public boolean getDelegatable() {
523:                return delegatable;
524:            }
525:
526:            public void setPolicy(Policy policy) {
527:                this .policy = policy;
528:                getAny().add(policy);
529:            }
530:
531:            public Policy getPolicy() {
532:                return policy;
533:            }
534:
535:            public void setPolicyReference(PolicyReference policyRef) {
536:                this .policyRef = policyRef;
537:                getAny().add(policyRef);
538:            }
539:
540:            public PolicyReference getPolicyReference() {
541:                return policyRef;
542:            }
543:
544:            public AllowPostdating getAllowPostdating() {
545:                return apd;
546:            }
547:
548:            public void setAllowPostdating(AllowPostdating allowPostdating) {
549:                apd = allowPostdating;
550:                JAXBElement<AllowPostdatingType> allowPd = (new ObjectFactory())
551:                        .createAllowPostdating((AllowPostdatingType) apd);
552:                getAny().add(allowPd);
553:            }
554:
555:            public RequestSecurityTokenImpl(RequestSecurityTokenType rstType)
556:                    throws Exception {
557:                this .context = rstType.getContext();
558:                List<Object> list = rstType.getAny();
559:                for (int i = 0; i < list.size(); i++) {
560:                    if (list.get(i) instanceof  AppliesTo) {
561:                        setAppliesTo((AppliesTo) list.get(i));
562:                        continue;
563:                    }
564:                    if (list.get(i) instanceof  JAXBElement) {
565:                        JAXBElement obj = (JAXBElement) list.get(i);
566:
567:                        String local = obj.getName().getLocalPart();
568:                        if (local.equalsIgnoreCase("RequestType")) {
569:                            setRequestType(new URI((String) obj.getValue()));
570:                        } else if (local.equalsIgnoreCase("KeySize")) {
571:                            setKeySize((Long) obj.getValue());
572:                        } else if (local.equalsIgnoreCase("KeyType")) {
573:                            setKeyType(new URI((String) obj.getValue()));
574:                        } else if (local
575:                                .equalsIgnoreCase("ComputedKeyAlgorithm")) {
576:                            setComputedKeyAlgorithm(new URI((String) obj
577:                                    .getValue()));
578:                        } else if (local.equalsIgnoreCase("TokenType")) {
579:                            setTokenType(new URI((String) obj.getValue()));
580:                        } else if (local.equalsIgnoreCase("AuthenticationType")) {
581:                            setAuthenticationType(new URI((String) obj
582:                                    .getValue()));
583:                        } else if (local.equalsIgnoreCase("Lifetime")) {
584:                            LifetimeType ltType = (LifetimeType) obj.getValue();
585:                            setLifetime(new LifetimeImpl(ltType.getCreated(),
586:                                    ltType.getExpires()));
587:                        } else if (local.equalsIgnoreCase("Entropy")) {
588:                            EntropyType eType = (EntropyType) obj.getValue();
589:                            setEntropy(new EntropyImpl(eType));
590:                        } else if (local.equalsIgnoreCase("Forwardable")) {
591:                            setForwardable((Boolean) obj.getValue());
592:                        } else if (local.equalsIgnoreCase("Delegatable")) {
593:                            setDelegatable((Boolean) obj.getValue());
594:                        } else if (local.equalsIgnoreCase("SignWith")) {
595:                            setSignWith(new URI((String) obj.getValue()));
596:                        } else if (local.equalsIgnoreCase("EncryptWith")) {
597:                            setEncryptWith(new URI((String) obj.getValue()));
598:                        } else if (local.equalsIgnoreCase("SignatureAlgorithm")) {
599:                            setSignatureAlgorithm(new URI((String) obj
600:                                    .getValue()));
601:                        } else if (local
602:                                .equalsIgnoreCase("EncryptionAlgorithm")) {
603:                            setEncryptionAlgorithm(new URI((String) obj
604:                                    .getValue()));
605:                        } else if (local
606:                                .equalsIgnoreCase("CanonicalizationAlgorithm")) {
607:                            setCanonicalizationAlgorithm(new URI((String) obj
608:                                    .getValue()));
609:                        } else if (local.equalsIgnoreCase("AllowPostdating")) {
610:                            setAllowPostdating(new AllowPostdatingImpl());
611:                        } else if (local.equalsIgnoreCase("SignChallenge")) {
612:                            setSignChallenge(new SignChallengeImpl());
613:                        } else if (local.equalsIgnoreCase("BinaryExchange")) {
614:                            BinaryExchangeType bcType = (BinaryExchangeType) obj
615:                                    .getValue();
616:                            setBinaryExchange(new BinaryExchangeImpl(bcType));
617:                        } else if (local.equalsIgnoreCase("Issuer")) {
618:                            //                    EndpointReferenceImpl isType = (EndpointReferenceImpl)obj.getValue();
619:                            //                    setIssuer(new IssuerImpl(isType));
620:                        } else if (local.equalsIgnoreCase("Claims")) {
621:                            ClaimsType cType = (ClaimsType) obj.getValue();
622:                            setClaims(new ClaimsImpl(cType));
623:                        } else if (local.equalsIgnoreCase("Participants")) {
624:                            ParticipantsType psType = (ParticipantsType) obj
625:                                    .getValue();
626:                            setParticipants(new ParticipantsImpl(psType));
627:                        } else if (local.equalsIgnoreCase("Renewing")) {
628:                            setRenewable(new RenewingImpl());
629:                        } else if (local.equalsIgnoreCase("ProofEncryption")) {
630:                            ProofEncryptionType peType = (ProofEncryptionType) obj
631:                                    .getValue();
632:                            setProofEncryption(new ProofEncryptionImpl(peType));
633:                        } else if (local.equalsIgnoreCase("Policy")) {
634:                            setPolicy((Policy) obj.getValue());
635:                        } else if (local.equalsIgnoreCase("PolicyReference")) {
636:                            setPolicyReference((PolicyReference) obj.getValue());
637:                        } else if (local.equalsIgnoreCase("AppliesTo")) {
638:                            setAppliesTo((AppliesTo) obj.getValue());
639:                        } else if (local.equalsIgnoreCase("OnBehalfOf")) {
640:                            OnBehalfOfType oboType = (OnBehalfOfType) obj
641:                                    .getValue();
642:                            setOnBehalfOf(new OnBehalfOfImpl(oboType));
643:                        } else if (local.equalsIgnoreCase("Encryption")) {
644:                            EncryptionType encType = (EncryptionType) obj
645:                                    .getValue();
646:                            setEncryption(new EncryptionImpl(encType));
647:                        } else if (local.equalsIgnoreCase("UseKey")) {
648:                            UseKeyType ukType = (UseKeyType) obj.getValue();
649:                            setUseKey(new UseKeyImpl(ukType));
650:                        } else if (local.equalsIgnoreCase("DelegateTo")) {
651:                            DelegateToType dtType = (DelegateToType) obj
652:                                    .getValue();
653:                            setDelegateTo(new DelegateToImpl(dtType));
654:                        } else if (local.equalsIgnoreCase("RenewTarget")) {
655:                            RenewTargetType rtType = (RenewTargetType) obj
656:                                    .getValue();
657:                            setRenewTarget(new RenewTargetImpl(rtType));
658:                        } else if (local.equalsIgnoreCase("CancelTarget")) {
659:                            CancelTargetType ctType = (CancelTargetType) obj
660:                                    .getValue();
661:                            setCancelTarget(new CancelTargetImpl(ctType));
662:                        } else if (local.equalsIgnoreCase("AppliesTo")) {
663:                            setAppliesTo((AppliesTo) obj.getValue());
664:                        }
665:                    }
666:                }
667:            }
668:        }
w___w__w___.j__a_v_a___2s.___c__o_m__ | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.