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


001:        /*
002:         * $Id: DynamicApplicationContext.java,v 1.3 2006/09/29 12:04:53 kumarjayanti 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.impl.configuration;
028:
029:        import java.util.HashMap;
030:
031:        import com.sun.xml.wss.impl.policy.StaticPolicyContext;
032:        import com.sun.xml.wss.impl.policy.DynamicPolicyContext;
033:
034:        /**
035:         * Represents a concrete SecurityPolicy identifier context resolved at runtime,
036:         * An XWS-Security <code>DynamicPolicyCallback</code> is passed an instance of
037:         * a <code>DynamicApplicationContext</code>. A callback Handler handling 
038:         * DynamicPolicyCallback can make use of information in this context
039:         * to dynamically determine the Security policy applicable for a request/response
040:         */
041:        public class DynamicApplicationContext extends DynamicPolicyContext {
042:
043:            private String messageIdentifier = "";
044:            private boolean inBoundMessage = false;
045:
046:            private StaticPolicyContext context = null;
047:
048:            /**
049:             * Create an empty DynamicApplicationContext
050:             */
051:            public DynamicApplicationContext() {
052:            }
053:
054:            /**
055:             * Create a DynamicApplicationContext with an associated 
056:             * StaticPolicyContext <code>context</code>
057:             * @param context the associated StaticPolicyContext
058:             */
059:            public DynamicApplicationContext(StaticPolicyContext context) {
060:                this .context = context;
061:            }
062:
063:            /**
064:             * Set the messageIdentifier for this Message associated with this context
065:             * @param messageIdentifier
066:             */
067:            public void setMessageIdentifier(String messageIdentifier) {
068:                this .messageIdentifier = messageIdentifier;
069:            }
070:
071:            /**
072:             * @return messageIdentifier for the Message associated with this context
073:             */
074:            public String getMessageIdentifier() {
075:                return this .messageIdentifier;
076:            }
077:
078:            /**
079:             * Set the Message direction (inbound/outbound) to which this context corresponds to
080:             * @param inBound flag indicating the direction of the message
081:             */
082:            public void inBoundMessage(boolean inBound) {
083:                this .inBoundMessage = inBound;
084:            }
085:
086:            /**
087:             * @return true if the context is for an inbound message
088:             */
089:            public boolean inBoundMessage() {
090:                return this .inBoundMessage;
091:            }
092:
093:            /**
094:             * set the associated StaticPolicyContext for this context
095:             * @param context StaticPolicyContext
096:             */
097:            public void setStaticPolicyContext(StaticPolicyContext context) {
098:                this .context = context;
099:            }
100:
101:            /**
102:             * @return the associated StaticPolicContext if any, null otherwise
103:             */
104:            public StaticPolicyContext getStaticPolicyContext() {
105:                return context;
106:            }
107:
108:            /**
109:             * @return HashMap of runtime properties in this context
110:             */
111:            public HashMap getRuntimeProperties() {
112:                return properties;
113:            }
114:
115:            /**
116:             * equals operator
117:             * @param ctx DynamicApplicationContext with which to compare for equality
118:             * @return true if ctx is equal to this DynamicApplicationContext
119:             */
120:            public boolean equals(DynamicApplicationContext ctx) {
121:                boolean b1 = getStaticPolicyContext().equals(
122:                        ctx.getStaticPolicyContext());
123:                if (!b1)
124:                    return false;
125:
126:                boolean b2 = (messageIdentifier.equalsIgnoreCase(ctx
127:                        .getMessageIdentifier()) && inBoundMessage == ctx.inBoundMessage);
128:                if (!b2)
129:                    return false;
130:
131:                return true;
132:            }
133:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.