Source Code Cross Referenced for FacesWebContext.java in  » Library » Apache-commons-chain-1.1-src » org » apache » commons » chain » web » faces » 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 » Library » Apache commons chain 1.1 src » org.apache.commons.chain.web.faces 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         * Copyright 1999-2004 The Apache Software Foundation
003:         *
004:         * Licensed under the Apache License, Version 2.0 (the "License");
005:         * you may not use this file except in compliance with the License.
006:         * You may obtain a copy of the License at
007:         *
008:         *     http://www.apache.org/licenses/LICENSE-2.0
009:         *
010:         * Unless required by applicable law or agreed to in writing, software
011:         * distributed under the License is distributed on an "AS IS" BASIS,
012:         * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
013:         * See the License for the specific language governing permissions and
014:         * limitations under the License.
015:         */
016:        package org.apache.commons.chain.web.faces;
017:
018:        import java.util.Map;
019:        import javax.faces.context.FacesContext;
020:        import org.apache.commons.chain.web.WebContext;
021:
022:        /**
023:         * <p>Concrete implementation of {@link WebContext} suitable for use in
024:         * JavaServer Faces apps.  The abstract methods are mapped to the appropriate
025:         * collections of the underlying <code>FacesContext</code> instance
026:         * that is passed to the constructor (or the initialize method).</p>
027:         *
028:         * @author Craig R. McClanahan
029:         * @version $Revision: 411948 $ $Date: 2006-06-06 00:29:02 +0100 (Tue, 06 Jun 2006) $
030:         */
031:
032:        public class FacesWebContext extends WebContext {
033:
034:            // ------------------------------------------------------------ Constructors
035:
036:            /**
037:             * <p>Construct an uninitialized {@link FacesWebContext} instance.</p>
038:             */
039:            public FacesWebContext() {
040:            }
041:
042:            /**
043:             * <p>Construct a {@link FacesWebContext} instance that is initialized
044:             * with the specified JavaServer Faces API objects.</p>
045:             *
046:             * @param context The <code>FacesContext</code> for this request
047:             */
048:            public FacesWebContext(FacesContext context) {
049:
050:                initialize(context);
051:
052:            }
053:
054:            // ------------------------------------------------------ Instance Variables
055:
056:            /**
057:             * <p>The <code>FacesContext</code> instance for the request represented
058:             * by this {@link WebContext}.</p>
059:             */
060:            private FacesContext context = null;
061:
062:            // ---------------------------------------------------------- Public Methods
063:
064:            /**
065:             * <p>Return the <code>FacesContext</code> instance for the request
066:             * associated with this {@link FacesWebContext}.</p>
067:             *
068:             * @return The <code>FacesContext</code> for this request
069:             */
070:            public FacesContext getContext() {
071:
072:                return (this .context);
073:
074:            }
075:
076:            /**
077:             * <p>Initialize (or reinitialize) this {@link FacesWebContext} instance
078:             * for the specified JavaServer Faces API objects.</p>
079:             *
080:             * @param context The <code>FacesContext</code> for this request
081:             */
082:            public void initialize(FacesContext context) {
083:
084:                this .context = context;
085:
086:            }
087:
088:            /**
089:             * <p>Release references to allocated resources acquired in
090:             * <code>initialize()</code> of via subsequent processing.  After this
091:             * method is called, subsequent calls to any other method than
092:             * <code>initialize()</code> will return undefined results.</p>
093:             */
094:            public void release() {
095:
096:                context = null;
097:
098:            }
099:
100:            // ------------------------------------------------------ WebContext Methods
101:
102:            /**
103:             * See the {@link WebContext}'s Javadoc.
104:             *
105:             * @return Application scope Map.
106:             */
107:            public Map getApplicationScope() {
108:
109:                return (context.getExternalContext().getApplicationMap());
110:
111:            }
112:
113:            /**
114:             * See the {@link WebContext}'s Javadoc.
115:             *
116:             * @return Header values Map.
117:             */
118:            public Map getHeader() {
119:
120:                return (context.getExternalContext().getRequestHeaderMap());
121:
122:            }
123:
124:            /**
125:             * See the {@link WebContext}'s Javadoc.
126:             *
127:             * @return Header values Map.
128:             */
129:            public Map getHeaderValues() {
130:
131:                return (context.getExternalContext()
132:                        .getRequestHeaderValuesMap());
133:
134:            }
135:
136:            /**
137:             * See the {@link WebContext}'s Javadoc.
138:             *
139:             * @return Initialization parameter Map.
140:             */
141:            public Map getInitParam() {
142:
143:                return (context.getExternalContext().getInitParameterMap());
144:
145:            }
146:
147:            /**
148:             * See the {@link WebContext}'s Javadoc.
149:             *
150:             * @return Request parameter Map.
151:             */
152:            public Map getParam() {
153:
154:                return (context.getExternalContext().getRequestParameterMap());
155:
156:            }
157:
158:            /**
159:             * See the {@link WebContext}'s Javadoc.
160:             *
161:             * @return Request parameter Map.
162:             */
163:            public Map getParamValues() {
164:
165:                return (context.getExternalContext()
166:                        .getRequestParameterValuesMap());
167:
168:            }
169:
170:            /**
171:             * See the {@link WebContext}'s Javadoc.
172:             *
173:             * @return Map of Cookies.
174:             * @since Chain 1.1
175:             */
176:            public Map getCookies() {
177:
178:                return (context.getExternalContext().getRequestCookieMap());
179:
180:            }
181:
182:            /**
183:             * See the {@link WebContext}'s Javadoc.
184:             *
185:             * @return Request scope Map.
186:             */
187:            public Map getRequestScope() {
188:
189:                return (context.getExternalContext().getRequestMap());
190:
191:            }
192:
193:            /**
194:             * See the {@link WebContext}'s Javadoc.
195:             *
196:             * @return Session scope Map.
197:             */
198:            public Map getSessionScope() {
199:
200:                return (context.getExternalContext().getSessionMap());
201:
202:            }
203:
204:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.