Source Code Cross Referenced for AuthzDecisionStatement.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) 


001:        /*
002:         * $Id: AuthzDecisionStatement.java,v 1.3 2007/01/08 16:05:59 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.wss.saml.assertion.saml20.jaxb20;
028:
029:        import com.sun.xml.wss.saml.SAMLException;
030:        import com.sun.xml.wss.logging.LogDomainConstants;
031:        import com.sun.xml.wss.saml.internal.saml20.jaxb20.AuthzDecisionStatementType;
032:        import com.sun.xml.wss.saml.internal.saml20.jaxb20.DecisionType;
033:        import com.sun.xml.wss.saml.util.SAML20JAXBUtil;
034:        import org.w3c.dom.Element;
035:
036:        import java.util.List;
037:        import java.util.logging.Logger;
038:
039:        import javax.xml.bind.JAXBContext;
040:
041:        /**
042:         *The <code>AuthzDecisionStatement</code> element supplies a statement
043:         *by the issuer that the request for access by the specified subject to the
044:         *specified resource has resulted in the specified decision on the basis of
045:         * some optionally specified evidence.
046:         */
047:        public class AuthzDecisionStatement extends AuthzDecisionStatementType
048:                implements  com.sun.xml.wss.saml.AuthnDecisionStatement {
049:
050:            protected static final Logger log = Logger.getLogger(
051:                    LogDomainConstants.WSS_API_DOMAIN,
052:                    LogDomainConstants.WSS_API_DOMAIN_BUNDLE);
053:
054:            /**
055:             *Default constructor
056:             */
057:            protected AuthzDecisionStatement() {
058:                super ();
059:            }
060:
061:            /**
062:             * Constructs an <code>AuthorizationStatement</code> element from an
063:             * existing XML block.
064:             *
065:             * @param element representing a DOM tree element
066:             * @exception SAMLException if there is an error in the sender or in
067:             *            the element definition.
068:             */
069:            public static AuthzDecisionStatementType fromElement(Element element)
070:                    throws SAMLException {
071:                try {
072:                    JAXBContext jc = SAML20JAXBUtil.getJAXBContext();
073:
074:                    javax.xml.bind.Unmarshaller u = jc.createUnmarshaller();
075:                    return (AuthzDecisionStatementType) u.unmarshal(element);
076:                } catch (Exception ex) {
077:                    throw new SAMLException(ex.getMessage());
078:                }
079:            }
080:
081:            private void setAction(List action) {
082:                this .action = action;
083:            }
084:
085:            /**
086:             * Constructs an instance of <code>AuthzDecisionStatement</code>.
087:             *
088:             * @param subject (required) A Subject object
089:             * @param resource (required) A String identifying the resource to which
090:             *        access authorization is sought.
091:             * @param decision (required) The decision rendered by the issuer with
092:             *        respect to the specified resource. The value is of the
093:             *        <code>DecisionType</code> simple type.
094:             * @param action (required) A List of Action objects specifying the set of
095:             *        actions authorized to be performed on the specified resource.
096:             * @param evidence (optional) An Evidence object representing a set of
097:             *        assertions that the issuer replied on in making decisions.
098:             * @exception SAMLException if there is an error in the sender.
099:             */
100:            public AuthzDecisionStatement(String resource, String decision,
101:                    List action, Evidence evidence) {
102:
103:                setResource(resource);
104:                setDecision(DecisionType.fromValue(decision));
105:                setAction(action);
106:                setEvidence(evidence);
107:            }
108:        }
www__.__ja__v___a_2s.__co___m_ | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.