Source Code Cross Referenced for __GenPortlet__.java in  » Portal » Open-Portal » __PACKAGE__ » 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 » __PACKAGE__ 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        package __PACKAGE__;
002:
003:        import java.io.IOException;
004:        import java.util.ResourceBundle;
005:
006:        import javax.portlet.GenericPortlet;
007:        import javax.portlet.PortletConfig;
008:        import javax.portlet.PortletRequest;
009:        import javax.portlet.ActionRequest;
010:        import javax.portlet.ActionResponse;
011:        import javax.portlet.PortletException;
012:        import javax.portlet.RenderRequest;
013:        import javax.portlet.RenderResponse;
014:
015:        /**
016:         * The <CODE>GenericPortlet</CODE> class provides a default implementation
017:         * for the <CODE>Portlet</CODE> interface. 
018:         * <p>
019:         * It is recommended not to extend the Portlet interface directly. 
020:         * Rather, a portlet should derive
021:         * from this or any other derived class and use the provided helper
022:         * methods for the different modes.
023:         */
024:        public class __NAME__ extends GenericPortlet {
025:
026:            public __NAME__() {
027:            }
028:
029:            /**
030:             * Optional init should call GenericPortlet.init() to register config. 
031:             *
032:              public void init (PortletConfig config) throws PortletException
033:              {
034:                  super(config);
035:              }
036:             */
037:
038:            public void processAction(ActionRequest request,
039:                    ActionResponse actionResponse) throws PortletException,
040:                    java.io.IOException {
041:            }
042:
043:            /*
044:             * superclass getTitle() uses resource bundle string "javax.portlet.title".
045:            public String getTitle(PortletRequest request) {
046:            }
047:             */
048:
049:            /**
050:             * The default implementation of render() routes the request
051:             * to a set of helper methods based on the portlet mode.
052:             *
053:            public void render (PortletRequest request,
054:            	      RenderResponse response)
055:              throws PortletException, java.io.IOException
056:            {
057:              response.setTitle(getTitle(request));
058:              WindowState state = request.getWindowState();
059:              
060:              if ( ! state.equals(WindowState.MINIMIZED)) {
061:                PortletMode mode = request.getPortletMode();
062:                if (mode.equals(PortletMode.VIEW)) {
063:            doView (request, response);
064:                }
065:                else if (mode.equals(PortletMode.EDIT)) {
066:            doEdit (request, response);
067:                }
068:                else if (mode.equals(PortletMode.HELP)) {
069:            doHelp (request, response);
070:                }
071:                else {
072:            doCustom (request, response);
073:                }
074:              }
075:            }
076:             **/
077:
078:            /**
079:             * Helper method to serve up the mandatory VIEW mode.
080:             * <p>
081:             * The default implementation throws an exception.
082:             *
083:             * @param    request
084:             *           the portlet request
085:             * @param    response
086:             *           the render response
087:             *
088:             * @exception PortletException
089:             *                   if the portlet cannot fulfilling the request
090:             * @exception  UnavailableException 	
091:             *                   if the portlet is unavailable to perform render
092:             * @exception  PortletSecurityException  
093:             *                   if the portlet cannot fullfill this request because of security reasons
094:             * @exception IOException
095:             *                   if the streaming causes an I/O problem
096:             *
097:             */
098:
099:            protected void doView(RenderRequest request, RenderResponse response)
100:                    throws PortletException, java.io.IOException {
101:                response.setContentType("text/html");
102:                response.getWriter().write("VIEW CONTENT\n");
103:            }
104:
105:            /**
106:             * Helper method to serve up the EDIT mode.
107:             * <p>
108:             * The default implementation throws an exception.
109:             *
110:             * @param    request
111:             *           the portlet request
112:             * @param    response
113:             *           the render response
114:             *
115:             * @exception PortletException
116:             *                   if the portlet cannot fulfilling the request
117:             * @exception  UnavailableException 	
118:             *                   if the portlet is unavailable to perform render
119:             * @exception  PortletSecurityException  
120:             *                   if the portlet cannot fullfill this request because of security reasons
121:             * @exception IOException
122:             *                   if the streaming causes an I/O problem
123:             *
124:             */
125:
126:            protected void doEdit(RenderRequest request, RenderResponse response)
127:                    throws PortletException, java.io.IOException {
128:                response.setContentType("text/html");
129:                response.getWriter().write("EDIT CONTENT\n");
130:            }
131:
132:            /**
133:             * Helper method to serve up the HELP mode.
134:             * <p>
135:             * The default implementation throws an exception.
136:             *
137:             * @param    request
138:             *           the portlet request
139:             * @param    response
140:             *           the render response
141:             *
142:             * @exception PortletException
143:             *                   if the portlet cannot fulfilling the request
144:             * @exception  UnavailableException 	
145:             *                   if the portlet is unavailable to perform render
146:             * @exception  PortletSecurityException  
147:             *                   if the portlet cannot fullfill this request because of security reasons
148:             * @exception IOException
149:             *                   if the streaming causes an I/O problem
150:             */
151:
152:            protected void doHelp(RenderRequest request, RenderResponse response)
153:                    throws PortletException, java.io.IOException {
154:                response.setContentType("text/html");
155:                response.getWriter().write("HELP CONTENT\n");
156:            }
157:
158:            /**
159:             * Helper method to serve up the custom modes.
160:             * <p>
161:             * The default implementation throws an exception.
162:             *
163:             * @param    request
164:             *           the portlet request
165:             * @param    response
166:             *           the render response
167:             *
168:             * @exception PortletException
169:             *                   if the portlet cannot fulfilling the request
170:             * @exception  UnavailableException 	
171:             *                   if the portlet is unavailable to perform render
172:             * @exception  PortletSecurityException  
173:             *                   if the portlet cannot fullfill this request because of security reasons
174:             * @exception IOException
175:             *                   if the streaming causes an I/O problem
176:             */
177:
178:            protected void doCustom(PortletRequest request,
179:                    RenderResponse response) throws PortletException,
180:                    java.io.IOException {
181:                response.setContentType("text/html");
182:                response.getWriter().write("CUSTOM CONTENT\n");
183:            }
184:
185:            /**
186:             * Called by the portlet container to indicate to a portlet that the portlet 
187:             * is being taken out of service.
188:             *
189:             * The default implementation does nothing.
190:             * 
191:              public void destroy ()
192:              {
193:              }
194:             *
195:             */
196:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.