📄 genericportlet.html.svn-base
字号:
<BR> Returns the names of the portlet initialization parameters as an Enumeration of String objects, or an empty Enumeration if the portlet has no initialization parameters.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected java.util.Collection<<A HREF="../../javax/portlet/PortletMode.html" title="class in javax.portlet">PortletMode</A>></CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/portlet/GenericPortlet.html#getNextPossiblePortletModes(javax.portlet.RenderRequest)">getNextPossiblePortletModes</A></B>(<A HREF="../../javax/portlet/RenderRequest.html" title="interface in javax.portlet">RenderRequest</A> request)</CODE><BR> Used by the render method to set the next possible portlet modes.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../javax/portlet/PortletConfig.html" title="interface in javax.portlet">PortletConfig</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/portlet/GenericPortlet.html#getPortletConfig()">getPortletConfig</A></B>()</CODE><BR> Returns the PortletConfig object of this portlet.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../javax/portlet/PortletContext.html" title="interface in javax.portlet">PortletContext</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/portlet/GenericPortlet.html#getPortletContext()">getPortletContext</A></B>()</CODE><BR> Returns the <code>PortletContext</code> of the portlet application the portlet is in.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> java.lang.String</CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/portlet/GenericPortlet.html#getPortletName()">getPortletName</A></B>()</CODE><BR> Returns the name of this portlet.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> java.util.Enumeration<javax.xml.namespace.QName></CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/portlet/GenericPortlet.html#getProcessingEventQNames()">getProcessingEventQNames</A></B>()</CODE><BR> Returns the QNames of the processing events supported by the portlet as an <code>Enumeration</code> of <code>QName</code> objects, or an empty <code>Enumeration</code> if the portlet has not defined any processing events.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> java.util.Enumeration<java.lang.String></CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/portlet/GenericPortlet.html#getPublicRenderParameterNames()">getPublicRenderParameterNames</A></B>()</CODE><BR> Returns the names of the public render parameters supported by the portlet as an <code>Enumeration</code> of String objects, or an empty <code>Enumeration</code> if the portlet has no public render parameters.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> java.util.Enumeration<javax.xml.namespace.QName></CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/portlet/GenericPortlet.html#getPublishingEventQNames()">getPublishingEventQNames</A></B>()</CODE><BR> Returns the QNames of the publishing events supported by the portlet as an <code>Enumeration</code> of <code>QName</code> objects, or an empty <code>Enumeration</code> if the portlet has not defined any publishing events.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> java.util.ResourceBundle</CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/portlet/GenericPortlet.html#getResourceBundle(java.util.Locale)">getResourceBundle</A></B>(java.util.Locale locale)</CODE><BR> Gets the resource bundle for the given locale based on the resource bundle defined in the deployment descriptor with <code>resource-bundle</code> tag or the inlined resources defined in the deployment descriptor.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> java.util.Enumeration<java.util.Locale></CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/portlet/GenericPortlet.html#getSupportedLocales()">getSupportedLocales</A></B>()</CODE><BR> Returns the locales supported by the portlet as an <code>Enumeration</code> of <code>Locale</code> objects, or an empty <code>Enumeration</code> if the portlet has not defined any supported locales.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected java.lang.String</CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/portlet/GenericPortlet.html#getTitle(javax.portlet.RenderRequest)">getTitle</A></B>(<A HREF="../../javax/portlet/RenderRequest.html" title="interface in javax.portlet">RenderRequest</A> request)</CODE><BR> Used by the render method to get the title.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/portlet/GenericPortlet.html#init()">init</A></B>()</CODE><BR> A convenience method which can be overridden so that there's no need to call <code>super.init(config)</code>.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/portlet/GenericPortlet.html#init(javax.portlet.PortletConfig)">init</A></B>(<A HREF="../../javax/portlet/PortletConfig.html" title="interface in javax.portlet">PortletConfig</A> config)</CODE><BR> Called by the portlet container to indicate to a portlet that the portlet is being placed into service.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/portlet/GenericPortlet.html#processAction(javax.portlet.ActionRequest, javax.portlet.ActionResponse)">processAction</A></B>(<A HREF="../../javax/portlet/ActionRequest.html" title="interface in javax.portlet">ActionRequest</A> request, <A HREF="../../javax/portlet/ActionResponse.html" title="interface in javax.portlet">ActionResponse</A> response)</CODE><BR> Called by the portlet container to allow the portlet to process an action request.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/portlet/GenericPortlet.html#processEvent(javax.portlet.EventRequest, javax.portlet.EventResponse)">processEvent</A></B>(<A HREF="../../javax/portlet/EventRequest.html" title="interface in javax.portlet">EventRequest</A> request, <A HREF="../../javax/portlet/EventResponse.html" title="interface in javax.portlet">EventResponse</A> response)</CODE><BR> The default implementation tries to dispatch to a method annotated with <code>@ProcessEvent</name> that matches the event name or, if no such method is found just sets the current render parameters on the response.<br> Note that the annotated methods needs to be public in order to be allowed to be called by <code>GenericPortlet</code>.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/portlet/GenericPortlet.html#render(javax.portlet.RenderRequest, javax.portlet.RenderResponse)">render</A></B>(<A HREF="../../javax/portlet/RenderRequest.html" title="interface in javax.portlet">RenderRequest</A> request, <A HREF="../../javax/portlet/RenderResponse.html" title="interface in javax.portlet">RenderResponse</A> response)</CODE><BR> The default implementation of this method sets the headers using the <code>doHeaders</code> method, sets the title using the <code>getTitle</code> method and invokes the <code>doDispatch</code> method.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/portlet/GenericPortlet.html#serveResource(javax.portlet.ResourceRequest, javax.portlet.ResourceResponse)">serveResource</A></B>(<A HREF="../../javax/portlet/ResourceRequest.html" title="interface in javax.portlet">ResourceRequest</A> request, <A HREF="../../javax/portlet/ResourceResponse.html" title="interface in javax.portlet">ResourceResponse</A> response)</CODE><BR> Default resource serving.</TD></TR></TABLE> <A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"><TH ALIGN="left"><B>Methods inherited from class java.lang.Object</B></TH></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</CODE></TD></TR></TABLE> <P><!-- ========= CONSTRUCTOR DETAIL ======== --><A NAME="constructor_detail"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"><B>Constructor Detail</B></FONT></TH></TR></TABLE><A NAME="GenericPortlet()"><!-- --></A><H3>GenericPortlet</H3><PRE>public <B>GenericPortlet</B>()</PRE><DL><DD>Does nothing.<P></DL><!-- ============ METHOD DETAIL ========== --><A NAME="method_detail"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"><B>Method Detail</B></FONT></TH></TR></TABLE><A NAME="init(javax.portlet.PortletConfig)"><!-- --></A><H3>init</H3><PRE>public void <B>init</B>(<A HREF="../../javax/portlet/PortletConfig.html" title="interface in javax.portlet">PortletConfig</A> config) throws <A HREF="../../javax/portlet/PortletException.html" title="class in javax.portlet">PortletException</A></PRE><DL><DD>Called by the portlet container to indicate to a portlet that the portlet is being placed into service. <p> The default implementation stores the <code>PortletConfig</code> object and checks for annotated methods with the annotations <ul> <li>@ProcessAction</li> <li>@ProcessEvent</li> <li>@RenderMode</li> </ul> and stores these in a hashmap for later dispatching. <p> The portlet container calls the <code>init</code> method exactly once after instantiating the portlet. The <code>init</code> method must complete successfully before the portlet can receive any requests. <p> The portlet container cannot place the portlet into service if the <code>init</code> method does one of the following: <ol> <li>it throws a <code>PortletException</code> <li>it does not return within a time period defined by the Web server </ol><P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../javax/portlet/Portlet.html#init(javax.portlet.PortletConfig)">init</A></CODE> in interface <CODE><A HREF="../../javax/portlet/Portlet.html" title="interface in javax.portlet">Portlet</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>config</CODE> - a <code>PortletConfig</code> object containing the portlet configuration and initialization parameters<DT><B>Throws:</B><DD><CODE><A HREF="../../javax/portlet/PortletException.html" title="class in javax.portlet">PortletException</A></CODE> - if an exception has occurred that interferes with the portlet normal operation.<DD><CODE><A HREF="../../javax/portlet/UnavailableException.html" title="class in javax.portlet">UnavailableException</A></CODE> - if the portlet cannot perform the initialization at this time.</DL></DD></DL><HR><A NAME="init()"><!-- --></A><H3>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -