⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 genericportlet.html.svn-base

📁 portal越来越流行了
💻 SVN-BASE
📖 第 1 页 / 共 5 页
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><!--NewPage--><HTML><HEAD><!-- Generated by javadoc (build 1.5.0) on Wed Feb 06 17:53:05 CET 2008 --><TITLE>GenericPortlet</TITLE><META NAME="keywords" CONTENT="javax.portlet.GenericPortlet class"><LINK REL ="stylesheet" TYPE="text/css" HREF="../../stylesheet.css" TITLE="Style"><SCRIPT type="text/javascript">function windowTitle(){    parent.document.title="GenericPortlet";}</SCRIPT><NOSCRIPT></NOSCRIPT></HEAD><BODY BGCOLOR="white" onload="windowTitle();"><!-- ========= START OF TOP NAVBAR ======= --><A NAME="navbar_top"><!-- --></A><A HREF="#skip-navbar_top" title="Skip navigation links"></A><TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""><TR><TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"><A NAME="navbar_top_firstrow"><!-- --></A><TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">  <TR ALIGN="center" VALIGN="top">  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="class-use/GenericPortlet.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>  </TR></TABLE></TD><TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM></EM></TD></TR><TR><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">&nbsp;<A HREF="../../javax/portlet/EventResponse.html" title="interface in javax.portlet"><B>PREV CLASS</B></A>&nbsp;&nbsp;<A HREF="../../javax/portlet/MimeResponse.html" title="interface in javax.portlet"><B>NEXT CLASS</B></A></FONT></TD><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">  <A HREF="../../index.html?javax/portlet/GenericPortlet.html" target="_top"><B>FRAMES</B></A>  &nbsp;&nbsp;<A HREF="GenericPortlet.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;&nbsp;<SCRIPT type="text/javascript">  <!--  if(window==top) {    document.writeln('<A HREF="../../allclasses-noframe.html"><B>All Classes</B></A>');  }  //--></SCRIPT><NOSCRIPT>  <A HREF="../../allclasses-noframe.html"><B>All Classes</B></A></NOSCRIPT></FONT></TD></TR><TR><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">  SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD></TR></TABLE><A NAME="skip-navbar_top"></A><!-- ========= END OF TOP NAVBAR ========= --><HR><!-- ======== START OF CLASS DATA ======== --><H2><FONT SIZE="-1">javax.portlet</FONT><BR>Class GenericPortlet</H2><PRE>java.lang.Object  <IMG SRC="../../resources/inherit.gif" ALT="extended by "><B>javax.portlet.GenericPortlet</B></PRE><DL><DT><B>All Implemented Interfaces:</B> <DD><A HREF="../../javax/portlet/EventPortlet.html" title="interface in javax.portlet">EventPortlet</A>, <A HREF="../../javax/portlet/Portlet.html" title="interface in javax.portlet">Portlet</A>, <A HREF="../../javax/portlet/PortletConfig.html" title="interface in javax.portlet">PortletConfig</A>, <A HREF="../../javax/portlet/ResourceServingPortlet.html" title="interface in javax.portlet">ResourceServingPortlet</A></DD></DL><HR><DL><DT><PRE>public abstract class <B>GenericPortlet</B><DT>extends java.lang.Object<DT>implements <A HREF="../../javax/portlet/Portlet.html" title="interface in javax.portlet">Portlet</A>, <A HREF="../../javax/portlet/PortletConfig.html" title="interface in javax.portlet">PortletConfig</A>, <A HREF="../../javax/portlet/EventPortlet.html" title="interface in javax.portlet">EventPortlet</A>, <A HREF="../../javax/portlet/ResourceServingPortlet.html" title="interface in javax.portlet">ResourceServingPortlet</A></DL></PRE><P>The <CODE>GenericPortlet</CODE> class provides a default implementation for the <CODE>Portlet</CODE> interface. <p> It provides an abstract class to be subclassed to create portlets. A subclass of <CODE>GenericPortlet</CODE> should either use one of the following annotations: <ul> <li><code>@ProcessAction</code></li> <li><code>@ProcessEvent</code></li> <li><code>@RenderMode</code></li> </ul> or override at least one method, usually one of the following: <ul> <li>processAction, to handle action requests</li> <li>doView, to handle render requests when in VIEW mode</li> <li>doEdit, to handle render requests when in EDIT mode</li> <li>doHelp, to handle render request when in HELP mode</li> <li>init and destroy, to manage resources that are held for the life of the servlet</li> </ul> <p> Normally there is no need to override the render or the doDispatch methods. Render handles render requests setting the title of the portlet in the response and invoking doDispatch. doDispatch dispatches the request to one of the doView, doEdit or doHelp method depending on the portlet mode indicated in the request. <p> Portlets typically run on multithreaded servers, so please note that a portlet must handle concurrent requests and be careful to synchronize access to shared resources. Shared resources include in-memory data such as instance or class variables and external objects such as files, database connections, and network connections.<P><P><HR><P><!-- ======== CONSTRUCTOR SUMMARY ======== --><A NAME="constructor_summary"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"><B>Constructor Summary</B></FONT></TH></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><B><A HREF="../../javax/portlet/GenericPortlet.html#GenericPortlet()">GenericPortlet</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Does nothing.</TD></TR></TABLE>&nbsp;<!-- ========== METHOD SUMMARY =========== --><A NAME="method_summary"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"><B>Method Summary</B></FONT></TH></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/portlet/GenericPortlet.html#destroy()">destroy</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Called by the portlet container to indicate to a portlet that the portlet is being taken out of service.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected &nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/portlet/GenericPortlet.html#doDispatch(javax.portlet.RenderRequest, javax.portlet.RenderResponse)">doDispatch</A></B>(<A HREF="../../javax/portlet/RenderRequest.html" title="interface in javax.portlet">RenderRequest</A>&nbsp;request,           <A HREF="../../javax/portlet/RenderResponse.html" title="interface in javax.portlet">RenderResponse</A>&nbsp;response)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The default implementation of this method routes the render request to:  method annotated with <code>@RenderMode</name> and the name of the       portlet mode   a set of helper methods depending on the current portlet mode the portlet                 is currently in.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected &nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/portlet/GenericPortlet.html#doEdit(javax.portlet.RenderRequest, javax.portlet.RenderResponse)">doEdit</A></B>(<A HREF="../../javax/portlet/RenderRequest.html" title="interface in javax.portlet">RenderRequest</A>&nbsp;request,       <A HREF="../../javax/portlet/RenderResponse.html" title="interface in javax.portlet">RenderResponse</A>&nbsp;response)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Helper method to serve up the <code>edit</code> mode.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected &nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/portlet/GenericPortlet.html#doHeaders(javax.portlet.RenderRequest, javax.portlet.RenderResponse)">doHeaders</A></B>(<A HREF="../../javax/portlet/RenderRequest.html" title="interface in javax.portlet">RenderRequest</A>&nbsp;request,          <A HREF="../../javax/portlet/RenderResponse.html" title="interface in javax.portlet">RenderResponse</A>&nbsp;response)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Used by the render method to set the response properties and headers.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected &nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/portlet/GenericPortlet.html#doHelp(javax.portlet.RenderRequest, javax.portlet.RenderResponse)">doHelp</A></B>(<A HREF="../../javax/portlet/RenderRequest.html" title="interface in javax.portlet">RenderRequest</A>&nbsp;request,       <A HREF="../../javax/portlet/RenderResponse.html" title="interface in javax.portlet">RenderResponse</A>&nbsp;response)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Helper method to serve up the <code>help</code> mode.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected &nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/portlet/GenericPortlet.html#doView(javax.portlet.RenderRequest, javax.portlet.RenderResponse)">doView</A></B>(<A HREF="../../javax/portlet/RenderRequest.html" title="interface in javax.portlet">RenderRequest</A>&nbsp;request,       <A HREF="../../javax/portlet/RenderResponse.html" title="interface in javax.portlet">RenderResponse</A>&nbsp;response)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Helper method to serve up the mandatory <code>view</code> mode.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;java.util.Map&lt;java.lang.String,java.lang.String[]&gt;</CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/portlet/GenericPortlet.html#getContainerRuntimeOptions()">getContainerRuntimeOptions</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the container runtime options and values for this portlet.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;java.lang.String</CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/portlet/GenericPortlet.html#getDefaultNamespace()">getDefaultNamespace</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the default namespace for events and public parameters.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;java.lang.String</CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/portlet/GenericPortlet.html#getInitParameter(java.lang.String)">getInitParameter</A></B>(java.lang.String&nbsp;name)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns a String containing the value of the named initialization        * parameter, or null if the parameter does not exist.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;java.util.Enumeration&lt;java.lang.String&gt;</CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/portlet/GenericPortlet.html#getInitParameterNames()">getInitParameterNames</A></B>()</CODE>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -