Source Code Cross Referenced for PortletContextImpl.java in  » Portal » stringbeans-3.5 » com » nabhinc » portal » container » 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 » stringbeans 3.5 » com.nabhinc.portal.container 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /* 
002:         * (C) Copyright 2000 - 2003 Nabh Information Systems, Inc. 
003:         * 
004:         * This program is free software; you can redistribute it and/or
005:         * modify it under the terms of the GNU General Public License 
006:         * as published by the Free Software Foundation; either version 2
007:         * of the License, or (at your option) any later version.
008:         * 
009:         * This program is distributed in the hope that it will be useful,
010:         * but WITHOUT ANY WARRANTY; without even the implied warranty of 
011:         * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
012:         * GNU General Public License for more details.
013:         * 
014:         * You should have received a copy of the GNU General Public License
015:         * along with this program; if not, write to the Free Software 
016:         * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
017:         * 
018:         */
019:
020:        package com.nabhinc.portal.container;
021:
022:        import java.io.File;
023:        import java.io.InputStream;
024:        import java.net.MalformedURLException;
025:        import java.net.URL;
026:        import java.util.Enumeration;
027:        import java.util.Set;
028:
029:        import javax.portlet.PortletContext;
030:        import javax.portlet.PortletRequestDispatcher;
031:        import javax.servlet.ServletContext;
032:
033:        import com.nabhinc.util.StringUtil;
034:
035:        /**
036:         * 
037:         *
038:         * @author Padmanabh dabke
039:         * (c) 2003 Nabh Information Systems, Inc. All Rights Reserved.
040:         */
041:        public class PortletContextImpl implements  PortletContext {
042:
043:            protected ServletContext pciServletContext = null;
044:            private String pciServerInfo = null;
045:            private String pciRootDir = null;
046:
047:            public PortletContextImpl(ServletContext sContext,
048:                    String serverInfo, String rootDir) {
049:                pciServletContext = sContext;
050:                pciRootDir = rootDir;
051:            }
052:
053:            public ServletContext getServletContext() {
054:                return pciServletContext;
055:            }
056:
057:            /* (non-Javadoc)
058:             * @see javax.portlet.PortletContext#getServerInfo()
059:             */
060:            public String getServerInfo() {
061:                return pciServerInfo;
062:            }
063:
064:            /* (non-Javadoc)
065:             * @see javax.portlet.PortletContext#getRequestDispatcher(java.lang.String)
066:             */
067:            public PortletRequestDispatcher getRequestDispatcher(String path) {
068:                return new PortletRequestDispatcherImpl(pciServletContext
069:                        .getRequestDispatcher(path), path);
070:            }
071:
072:            /* (non-Javadoc)
073:             * @see javax.portlet.PortletContext#getNamedDispatcher(java.lang.String)
074:             */
075:            public PortletRequestDispatcher getNamedDispatcher(String name) {
076:                return new PortletRequestDispatcherImpl(pciServletContext
077:                        .getNamedDispatcher(name), name);
078:            }
079:
080:            /* (non-Javadoc)
081:             * @see javax.portlet.PortletContext#getResourceAsStream(java.lang.String)
082:             */
083:            public InputStream getResourceAsStream(String path) {
084:                return pciServletContext.getResourceAsStream(path);
085:            }
086:
087:            /* (non-Javadoc)
088:             * @see javax.portlet.PortletContext#getMajorVersion()
089:             */
090:            public int getMajorVersion() {
091:                return 1;
092:            }
093:
094:            /* (non-Javadoc)
095:             * @see javax.portlet.PortletContext#getMinorVersion()
096:             */
097:            public int getMinorVersion() {
098:                return 0;
099:            }
100:
101:            /* (non-Javadoc)
102:             * @see javax.portlet.PortletContext#getMimeType(java.lang.String)
103:             */
104:            public String getMimeType(String file) {
105:                return pciServletContext.getMimeType(file);
106:            }
107:
108:            /* (non-Javadoc)
109:             * @see javax.portlet.PortletContext#getRealPath(java.lang.String)
110:             */
111:            public String getRealPath(String path) {
112:                if (pciRootDir == null)
113:                    return pciServletContext.getRealPath(path);
114:                String realPath = null;
115:                if (path.startsWith("/")) {
116:                    realPath = pciRootDir + path;
117:                } else {
118:                    realPath = pciRootDir + File.separator + path;
119:                }
120:                realPath = StringUtil.replacePathSeparator(realPath);
121:                return realPath;
122:            }
123:
124:            /* (non-Javadoc)
125:             * @see javax.portlet.PortletContext#getResourcePaths(java.lang.String)
126:             */
127:            public Set getResourcePaths(String path) {
128:                return pciServletContext.getResourcePaths(path);
129:            }
130:
131:            /* (non-Javadoc)
132:             * @see javax.portlet.PortletContext#getResource(java.lang.String)
133:             */
134:            public URL getResource(String path) throws MalformedURLException {
135:                return pciServletContext.getResource(path);
136:            }
137:
138:            /* (non-Javadoc)
139:             * @see javax.portlet.PortletContext#getAttribute(java.lang.String)
140:             */
141:            public Object getAttribute(String name) {
142:                return pciServletContext.getAttribute(name);
143:            }
144:
145:            /* (non-Javadoc)
146:             * @see javax.portlet.PortletContext#getAttributeNames()
147:             */
148:            public Enumeration getAttributeNames() {
149:                return pciServletContext.getAttributeNames();
150:            }
151:
152:            /* (non-Javadoc)
153:             * @see javax.portlet.PortletContext#getInitParameter(java.lang.String)
154:             */
155:            public String getInitParameter(String name) {
156:                return pciServletContext.getInitParameter(name);
157:            }
158:
159:            /* (non-Javadoc)
160:             * @see javax.portlet.PortletContext#getInitParameterNames()
161:             */
162:            public Enumeration getInitParameterNames() {
163:                return pciServletContext.getInitParameterNames();
164:            }
165:
166:            /* (non-Javadoc)
167:             * @see javax.portlet.PortletContext#log(java.lang.String)
168:             */
169:            public void log(String msg) {
170:                pciServletContext.log(msg);
171:
172:            }
173:
174:            /* (non-Javadoc)
175:             * @see javax.portlet.PortletContext#log(java.lang.String, java.lang.Throwable)
176:             */
177:            public void log(String message, Throwable throwable) {
178:                pciServletContext.log(message, throwable);
179:
180:            }
181:
182:            /* (non-Javadoc)
183:             * @see javax.portlet.PortletContext#removeAttribute(java.lang.String)
184:             */
185:            public void removeAttribute(String name) {
186:                pciServletContext.removeAttribute(name);
187:
188:            }
189:
190:            /* (non-Javadoc)
191:             * @see javax.portlet.PortletContext#setAttribute(java.lang.String, java.lang.Object)
192:             */
193:            public void setAttribute(String name, Object object) {
194:                pciServletContext.setAttribute(name, object);
195:
196:            }
197:
198:            /* (non-Javadoc)
199:             * @see javax.portlet.PortletContext#getPortletContextName()
200:             */
201:            public String getPortletContextName() {
202:                return pciServletContext.getServletContextName();
203:            }
204:
205:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.