Source Code Cross Referenced for RenderRequestImpl.java in  » Portal » Open-Portal » com » sun » portal » portlet » impl » 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 » Portal » Open Portal » com.sun.portal.portlet.impl 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         * Copyright 2002 Sun Microsystems, Inc. All 
003:         * rights reserved. Use of this product is subject 
004:         * to license terms. Federal Acquisitions: 
005:         * Commercial Software -- Government Users 
006:         * Subject to Standard License Terms and 
007:         * Conditions. 
008:         * 
009:         * Sun, Sun Microsystems, the Sun logo, and Sun ONE 
010:         * are trademarks or registered trademarks of Sun Microsystems, 
011:         * Inc. in the United States and other countries. 
012:         */
013:        package com.sun.portal.portlet.impl;
014:
015:        import java.util.Map;
016:        import java.util.Collections;
017:        import java.util.logging.Logger;
018:
019:        import javax.servlet.http.HttpServletRequest;
020:        import javax.servlet.http.HttpServletResponse;
021:
022:        import javax.portlet.PortletContext;
023:        import javax.portlet.PortalContext;
024:        import javax.portlet.PortletMode;
025:        import javax.portlet.WindowState;
026:        import javax.portlet.RenderResponse;
027:
028:        import com.sun.portal.portletappengine.PortletAppEngineUtils;
029:
030:        import com.sun.portal.portletcontainercommon.PortletContainerRenderRequest;
031:        import com.sun.portal.portletcontainercommon.PortletContainerRenderResponse;
032:        import com.sun.portal.portletcontainercommon.descriptor.PortletDescriptor;
033:
034:        /**
035:         * This class provides implementation of the RenderRequest interface.
036:         */
037:        public class RenderRequestImpl extends PortletRequestImpl implements 
038:                javax.portlet.RenderRequest {
039:            // Global variables
040:            private PortletContainerRenderRequest _pContReq;
041:            private PortletContainerRenderResponse _pContRes;
042:
043:            /**
044:             * Initialize the global variables.
045:             * <P>
046:             * @param req          The <code>HttpServletRequest</code> of the PAE
047:             * @param res          The <code>HttpServletResponse</code> of the PAE
048:             * @param pContReq     The <code>PortletContainerRequest</code>
049:             * @param logger       The <code>Logger</code> object
050:             */
051:            void init(HttpServletRequest req, HttpServletResponse res,
052:                    PortletContainerRenderRequest pContReq,
053:                    PortletContainerRenderResponse pContRes,
054:                    PortletContext context, PortalContext portalContext,
055:                    PortletDescriptor pDescriptor, Logger logger) {
056:
057:                _pContReq = pContReq;
058:                _pContRes = pContRes;
059:                super .init(req, res, pContReq, pContRes, context,
060:                        portalContext, pDescriptor, logger);
061:
062:            }
063:
064:            /**
065:             * Clears the global variables.
066:             */
067:            void clear() {
068:                _pContReq = null;
069:                _pContRes = null;
070:                super .clear();
071:            }
072:
073:            /** 
074:             * Returns a <code>Map</code> of the parameters of this request.
075:             * Request parameters are extra information sent with the request.  
076:             * The returned parameters are "x-www-form-urlencoded" decoded.
077:             * <p>
078:             * The values in the returned <code>Map</code> are from type
079:             * String array (<code>String[]</code>).
080:             * <p>
081:             * If no parameters exist this method returns <code>null</code>.
082:             *
083:             * @return an immutable java.util.Map containing parameter names as 
084:             * keys and parameter values as map values. The keys in the parameter
085:             * map are of type String. The values in the parameter map are of type
086:             * String array (<code>String[]</code>).
087:             *
088:             */
089:            public java.util.Map getParameterMap() {
090:                Map map = _pContReq.getRenderParameters();
091:
092:                return Collections.unmodifiableMap(map);
093:            }
094:
095:            /**
096:             * Returns the current mode of the portlet.
097:             *
098:             * @return   the portlet mode
099:             */
100:            public PortletMode getPortletMode() {
101:                return PortletAppEngineUtils.getPortletMode(_pContReq
102:                        .getChannelMode());
103:            }
104:
105:            /**
106:             * Returns the current window state of the portlet.
107:             *
108:             * @return   the window state
109:             */
110:
111:            public WindowState getWindowState() {
112:                return PortletAppEngineUtils.getWindowState(_pContReq
113:                        .getWindowState());
114:            }
115:
116:            /**
117:             *
118:             * Returns the value of the specified client request property                    * as a <code>String</code>. If the request did not include a property
119:             * of the specified name, this method returns <code>null</code>.
120:             *
121:             * A portlet can access portal/portlet-container specific properties
122:             * through this method and, if available, the
123:             * headers of the HTTP client request.
124:             * <p>
125:             * This method should only be used if the
126:             * property has only one value. If the property might have
127:             * more than one value, use {@link #getProperties}.
128:             * <p>
129:             * If this method is used with a multivalued
130:             * parameter, the value returned is equal to the first value
131:             * in the enumeration returned by <code>getProperties</code>.
132:             *
133:             * @param name        a <code>String</code> specifying the
134:             *                    property name
135:             *
136:             * @return            a <code>String</code> containing the
137:             *                    value of the requested
138:             *                    property, or <code>null</code>
139:             *                    if the request does not
140:             *                    have a property of that name
141:             * @exception  java.lang.IllegalArgumentException
142:             *                            if name is <code>null</code>.
143:             */
144:
145:            public String getProperty(String name) {
146:                if (name == null) {
147:                    throw new IllegalArgumentException(
148:                            "Property name should not be null.");
149:                }
150:
151:                String retVal = null;
152:
153:                if (name.equals(RenderResponse.EXPIRATION_CACHE)) {
154:                    if (_pContRes.getExpiration() != PortletDescriptor.EXPIRATION_CACHE_NOT_DEFINED) {
155:                        retVal = Integer.toString(_pContRes.getExpiration());
156:                    }
157:                } else {
158:                    retVal = super.getProperty(name);
159:                }
160:                return retVal;
161:
162:            }
163:
164:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.