Source Code Cross Referenced for __Portlet__.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:        /**
002:         * Copyright 2003 Sun Microsystems, Inc.  All rights reserved.
003:         * Use is subject to license terms.
004:         */package __PACKAGE__;
005:
006:        import java.io.IOException;
007:
008:        import javax.portlet.Portlet;
009:        import javax.portlet.PortletConfig;
010:        import javax.portlet.PortletException;
011:        import javax.portlet.PortletRequest;
012:        import javax.portlet.ActionRequest;
013:        import javax.portlet.ActionResponse;
014:        import javax.portlet.RenderRequest;
015:        import javax.portlet.RenderResponse;
016:
017:        /**
018:         * The <CODE>Portlet</CODE> interface is used by the portlet container to
019:         * invoke the portlets. Every portlet has to implement this interface,
020:         * either by directly implementing it, or by using an existing class 
021:         * implementing the Portlet interface.
022:         * <P>
023:         * A portlet is a Java technology based web component, managed by a portlet container, that
024:         * processes requests and generates dynamic content. Portlets are used by portals as
025:         * pluggable user interface components that provide a presentation layer to Information
026:         * Systems.
027:         * <p>
028:         * The content generated by a portlet is called a fragment. A fragment is a piece of
029:         * markup (e.g. HTML, XHTML, WML) adhering to certain rules and can be aggregated
030:         * with other fragments to form a complete document. The content of a portlet is normally
031:         * aggregated with the content of other portlets to form the portal page. The lifecycle of a
032:         * portlet is managed by the portlet container.
033:         * <P>
034:         * The portlet container instanciates portlets, manages their lifecycle 
035:         * and invoking them to process requests. The lifecycle consists of:
036:         * <ul>
037:         * <li>initializing the portlet using using the <code>init</code> method
038:         * <li>request processsing
039:         * <li>taking the portlet out of service using the <code>destroy</code> method
040:         * </ul>
041:         * <p>
042:         * Request processing is divided into two types:
043:         * <ul>
044:         * <li>action requests handled through the <code>processAction</code> method, 
045:         *     to perform actions targeted to the portlet
046:         * <li>render requests handled through the <code>render</code> method, 
047:         *     to perform the render operation
048:         * </ul>
049:         */
050:        public class __NAME__ implements  Portlet {
051:
052:            public __NAME__() {
053:            }
054:
055:            /**
056:             * Calle_d by the portlet container to indicate to a portlet that the 
057:             * portlet is being placed into service.
058:             *
059:             * <p>The portlet container calls the <code>init</code>
060:             * method exactly once after instantiating the portlet.
061:             * The <code>init</code> method must complete successfully
062:             * before the portlet can receive any requests.
063:             *
064:             * <p>The portlet container cannot place the portlet into service
065:             * if the <code>init</code> method
066:             * <ol>
067:             * <li>Throws a <code>PortletException</code>
068:             * <li>Does not return within a time period defined by the portlet container.
069:             * </ol>
070:             *
071:             *
072:             * @param config			a <code>PortletConfig</code> object 
073:             *					containing the portlet's
074:             * 					configuration and initialization parameters
075:             *
076:             * @exception PortletException 	if an exception has occurred that
077:             *					interferes with the portlet's normal
078:             *					operation.
079:             * @exception UnavailableException 	if the portlet is unavailable to perform init
080:             *
081:             *
082:             */
083:
084:            public void init(PortletConfig config) throws PortletException {
085:            }
086:
087:            /**
088:             * Notifies this portlet that a client request is triggered by an action URL to 
089:             * this portlet.
090:             * <p>
091:             * Typically, in response to an action request, a portlet updates state 
092:             * based on the information sent in the action request parameters.
093:             * In an action the portlet may:
094:             * <ul>
095:             * <il>issue a redirect
096:             * <il>change its window state
097:             * <il>change its portlet mode
098:             * <il>change its persistent state
099:             * <il>set render parameters
100:             * </ul>
101:             * <p>
102:             * This method is only called if the portlet has created
103:             * an action URL with <code>RenderResponse.createActionURL()</code>.
104:             * <p>
105:             * A client request triggered by an action URL translates into one 
106:             * action request and many render requests, one per portlet in the portal page.
107:             * The action processing must be finished before the render requests
108:             * can be issued.
109:             *
110:             * @param request
111:             *                 the portlet request
112:             * @param actionResponse
113:             *                 the action response
114:             * @exception  PortletException
115:             *                   if the portlet has problems fulfilling the
116:             *                   request
117:             * @exception  UnavailableException 	
118:             *                   if the portlet is unavailable to perform processAction
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:            public void processAction(ActionRequest request,
125:                    ActionResponse actionResponse) throws PortletException,
126:                    java.io.IOException {
127:            }
128:
129:            /**
130:             * Notifies this portlet to generate its markup using the 
131:             * given request/response pair. Depending
132:             * on the the current state and the requesting client device, 
133:             * the markup might differ.
134:             * <p>
135:             * The state of a portlet may include, but is not restricted to:
136:             * <ul>
137:             * <il>the window state
138:             * <il>the portlet portlet mode
139:             * <il>render parameter
140:             * <il>request attributes
141:             * <il>preference data
142:             * <il>session data
143:             * </ul>
144:             *
145:             * @param   request
146:             *          the portlet request
147:             * @param   response
148:             *          the render response
149:             *
150:             * @exception   PortletException
151:             *              if the portlet has problems fulfilling the
152:             *              rendering request
153:             * @exception  UnavailableException 	
154:             *                   if the portlet is unavailable to perform render
155:             * @exception  PortletSecurityException  
156:             *                   if the portlet cannot fullfill this request because of security reasons
157:             * @exception   IOException
158:             *              if the streaming causes an I/O problem
159:             */
160:
161:            public void render(RenderRequest request, RenderResponse response)
162:                    throws PortletException, java.io.IOException {
163:            }
164:
165:            /**
166:             *
167:             * Called by the portlet container to indicate to a portlet that the
168:             * portlet is being taken out of service.  
169:             * <p>
170:             * Before the portlet container calls the destroy method, it should 
171:             * allow any threads that are currently processing requests within 
172:             * the portlet object to complete execution. To avoid
173:             * waiting forever, the portlet container can optionally wait for 
174:             * a predefined time before destroying the portlet object.
175:             *
176:             * <p>This method enables the portlet to do the following:
177:             * <ul>
178:             * <li>clean up any resources that it holds (for example, memory,
179:             * file handles, threads) 
180:             * <li>make sure that any persistent state is
181:             * synchronized with the portlet current state in memory.
182:             * </ul>
183:             */
184:
185:            public void destroy() {
186:            }
187:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.