Source Code Cross Referenced for PortletAdapter.java in  » Portal » jportlet » net » sf » jportlet » portlet » 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 » jportlet » net.sf.jportlet.portlet 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         * Created on Mar 20, 2003
003:         */
004:        package net.sf.jportlet.portlet;
005:
006:        import java.io.IOException;
007:
008:        import java.util.Locale;
009:
010:        /**
011:         * The <code>PortletAdapter</code> provides a default implementation for the
012:         * {@link net.sf.jportlet.portlet.Portlet} interface.
013:         * <p>
014:         * It is recommended not to extend the {@link net.sf.jportlet.portlet.Portlet} interface directly.
015:         * Rather, a portlet should derive from this or any other derived class,
016:         * because changes in the Portlet interface are then mostly likely to be catched
017:         * by the default implementation, rather than breaking your portlet implementation
018:         *
019:         * @author <a href="mailto:tchbansi@sourceforge.net">Herve Tchepannou</a>
020:         */
021:        public class PortletAdapter extends Portlet {
022:            //~ Methods ----------------------------------------------------------------
023:
024:            /**
025:             * Renders the portlet in {@link net.sf.jportlet.portlet.Portlet.Model.CONFIGURE} mode
026:             * @param request
027:             * @param response
028:             * @throws PortletException
029:             * @throws IOException
030:             */
031:            protected void doConfigure(PortletRequest request,
032:                    PortletResponse response) throws PortletException,
033:                    IOException {
034:            }
035:
036:            /**
037:             * Renders the portlet in {@link net.sf.jportlet.portlet.Portlet.Model.EDIT} mode
038:             * @param request
039:             * @param response
040:             * @throws PortletException
041:             * @throws IOException
042:             */
043:            protected void doEdit(PortletRequest request,
044:                    PortletResponse response) throws PortletException,
045:                    IOException {
046:            }
047:
048:            /**
049:             * Renders the portlet in {@link net.sf.jportlet.portlet.Portlet.Model.HELP} mode
050:             * @param request
051:             * @param response
052:             * @throws PortletException
053:             * @throws IOException
054:             */
055:            protected void doHelp(PortletRequest request,
056:                    PortletResponse response) throws PortletException,
057:                    IOException {
058:            }
059:
060:            /**
061:             * Renders the portlet in {@link net.sf.jportlet.portlet.Portlet.Model.VIEW} mode
062:             * @param request
063:             * @param response
064:             * @throws PortletException
065:             * @throws IOException
066:             */
067:            protected void doView(PortletRequest request,
068:                    PortletResponse response) throws PortletException,
069:                    IOException {
070:            }
071:
072:            /**
073:             * @see net.sf.jportlet.portlet.Portlet#getLastModified(net.sf.jportlet.portlet.PortletRequest)
074:             */
075:            public long getLastModified(PortletRequest request) {
076:                return -1;
077:            }
078:
079:            public PortletLog getLog() {
080:                return getPortletContext().getLog();
081:            }
082:
083:            /**
084:             * @return PortletContext
085:             */
086:            public PortletContext getPortletContext() {
087:                return getPortletConfig().getPortletContext();
088:            }
089:
090:            /**
091:             * Returns the value of a localized text.
092:             * This method call {@link PortletContext#getText(java.lang.String, java.util.Locale)}
093:             */
094:            public String getText(String key, Locale locale) {
095:                getLog().debug("getText(" + key + "," + locale + ")");
096:                return getPortletContext().getText(key, locale);
097:            }
098:
099:            /**
100:             * Include a file into the {@link PortletResponse}.
101:             * This method call {@link PortletContext#include(java.lang.String, net.sf.jportlet.portlet.PortletRequest, net.sf.jportlet.portlet.PortletResponse)}
102:             */
103:            public void include(String path, PortletRequest request,
104:                    PortletResponse response) throws PortletException,
105:                    IOException {
106:                getPortletContext().include(path, request, response);
107:            }
108:
109:            /**
110:             * @see net.sf.jportlet.portlet.Portlet#login(net.sf.jportlet.portlet.PortletRequest)
111:             */
112:            public void login(PortletRequest request) throws PortletException {
113:            }
114:
115:            /**
116:             * @see net.sf.jportlet.portlet.Portlet#logout(net.sf.jportlet.portlet.PortletRequest)
117:             */
118:            public void logout(PortletRequest request) throws PortletException {
119:            }
120:
121:            public void service(PortletRequest request, PortletResponse response)
122:                    throws PortletException, IOException {
123:                Mode mode = request.getMode();
124:
125:                if (mode == Mode.VIEW) {
126:                    doView(request, response);
127:                } else if (mode == Mode.EDIT) {
128:                    doEdit(request, response);
129:                } else if (mode == Mode.CONFIGURE) {
130:                    doConfigure(request, response);
131:                } else if (mode == Mode.HELP) {
132:                    doHelp(request, response);
133:                } else {
134:                    throw new PortletException("Mode not supported: " + mode);
135:                }
136:            }
137:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.