Source Code Cross Referenced for NameID.java in  » 6.0-JDK-Modules-com.sun » xws-security » com » sun » xml » wss » saml » assertion » saml20 » jaxb20 » 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 » xws security » com.sun.xml.wss.saml.assertion.saml20.jaxb20 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


01:        /*
02:         * $Id: NameID.java,v 1.3 2007/01/08 16:05:59 shyam_rao Exp $
03:         */
04:
05:        /*
06:         * The contents of this file are subject to the terms
07:         * of the Common Development and Distribution License
08:         * (the License).  You may not use this file except in
09:         * compliance with the License.
10:         * 
11:         * You can obtain a copy of the license at
12:         * https://glassfish.dev.java.net/public/CDDLv1.0.html.
13:         * See the License for the specific language governing
14:         * permissions and limitations under the License.
15:         * 
16:         * When distributing Covered Code, include this CDDL
17:         * Header Notice in each file and include the License file
18:         * at https://glassfish.dev.java.net/public/CDDLv1.0.html.
19:         * If applicable, add the following below the CDDL Header,
20:         * with the fields enclosed by brackets [] replaced by
21:         * you own identifying information:
22:         * "Portions Copyrighted [year] [name of copyright owner]"
23:         * 
24:         * Copyright 2006 Sun Microsystems Inc. All Rights Reserved
25:         */
26:
27:        package com.sun.xml.wss.saml.assertion.saml20.jaxb20;
28:
29:        import com.sun.xml.wss.saml.SAMLException;
30:
31:        import com.sun.xml.wss.logging.LogDomainConstants;
32:        import com.sun.xml.wss.saml.internal.saml20.jaxb20.NameIDType;
33:        import com.sun.xml.wss.saml.util.SAML20JAXBUtil;
34:        import java.util.logging.Logger;
35:
36:        import javax.xml.bind.JAXBContext;
37:
38:        /**
39:         *The NameID element specifies a <code>Subject</code> by a combination
40:         * of a name and a security domain governing the name of the <code>Subject</code>.
41:         */
42:        public class NameID extends NameIDType implements 
43:                com.sun.xml.wss.saml.NameID {
44:
45:            protected static final Logger log = Logger.getLogger(
46:                    LogDomainConstants.WSS_API_DOMAIN,
47:                    LogDomainConstants.WSS_API_DOMAIN_BUNDLE);
48:
49:            /**
50:             * Constructs a <code>NameIdentifer</code> element from an existing XML
51:             * block.
52:             *
53:             * @param NameIDElement A <code>org.w3c.dom.Element</code>
54:             *        representing DOM tree for <code>NameID</code> object
55:             * @exception SAMLException if it could not process the
56:             *            <code>org.w3c.dom.Element</code> properly, implying that there
57:             *            is an error in the sender or in the element definition.
58:             */
59:            public static NameIDType fromElement(org.w3c.dom.Element element)
60:                    throws SAMLException {
61:                try {
62:                    JAXBContext jc = SAML20JAXBUtil.getJAXBContext();
63:
64:                    javax.xml.bind.Unmarshaller u = jc.createUnmarshaller();
65:                    return (NameIDType) u.unmarshal(element);
66:                } catch (Exception ex) {
67:                    throw new SAMLException(ex.getMessage());
68:                }
69:            }
70:
71:            /**
72:             * Constructs a <code>NameQualifier</code> instance.
73:             *
74:             * @param name The string representing the name of the Subject
75:             * @param nameQualifier The security or administrative domain that qualifies
76:             *        the name of the <code>Subject</code>. This is optional could be
77:             *        null or "".
78:             * @param format The syntax used to describe the name of the
79:             *        <code>Subject</code>. This optional, could be null or "".
80:             * @exception SAMLException if the input has an error.
81:             */
82:            public NameID(String name, String nameQualifier, String format) {
83:                if (name != null)
84:                    setValue(name);
85:
86:                if (nameQualifier != null)
87:                    setNameQualifier(nameQualifier);
88:
89:                if (format != null)
90:                    setFormat(format);
91:            }
92:        }
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.