📄 portletcontext.html
字号:
<!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.4.2) on Wed Jul 19 18:22:43 EDT 2006 --><TITLE>PortletContext (IBM WebSphere Portal Version 6.0.0.0 API Docs)</TITLE><META NAME="keywords" CONTENT="org.apache.jetspeed.portlet.PortletContext interface"><LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../stylesheet.css" TITLE="Style"><SCRIPT type="text/javascript">function windowTitle(){ parent.document.title="PortletContext (IBM WebSphere Portal Version 6.0.0.0 API Docs)";}</SCRIPT></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=3 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> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <A HREF="#main"><FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../serialized-form.html"><FONT CLASS="NavBarFont1"><B>Serialized</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> </TR></TABLE></TD><TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM></EM></TD></TR><TR><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../../org/apache/jetspeed/portlet/PortletConfig.html" title="interface in org.apache.jetspeed.portlet"><B>PREV CLASS</B></A> <A HREF="../../../../org/apache/jetspeed/portlet/PortletData.html" title="interface in org.apache.jetspeed.portlet"><B>NEXT CLASS</B></A></FONT></TD><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../../index.html" target="_top"><B>FRAMES</B></A> <A HREF="PortletContext.html" target="_top"><B>NO FRAMES</B></A> <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: NESTED | FIELD | CONSTR | <A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL: FIELD | CONSTR | <A HREF="#method_detail">METHOD</A></FONT></TD></TR></TABLE><A NAME="skip-navbar_top"></A><!-- ========= END OF TOP NAVBAR ========= --><HR><A NAME="main"></A><!-- ======== START OF CLASS DATA ======== --><H2><FONT SIZE="-1">org.apache.jetspeed.portlet</FONT><BR>Interface PortletContext</H2><DL><DT><B>All Superinterfaces:</B> <DD>javax.servlet.ServletContext</DD></DL><HR><B>Deprecated.</B> <I>since 6.0. Support of the IBM portlet API may be removed in a future release of WebSphere Portal. Use of the Java Portlet API (javax.portlet) is recommended instead.</I><P><DL><DT>public interface <B>PortletContext</B><DT>extends javax.servlet.ServletContext</DL><P>The <CODE>PortletContext</CODE> interface defines a portlet's view of the web application within which each portlet is running. The <CODE>PortletContext</CODE> also allows a portlet to access resources available to it. Using the context, a portlet can access the portlet log, and obtain URL references to resources. <p> The scope of a portlet context is an entire web application (abstract porlet application) as for the correcponding servlet context. There is one portlet context per weba application per JVM.<P><P><DL><DT><B>Since:</B></DT> <DD>4.1</DD></DL><HR><P><!-- ======== NESTED CLASS SUMMARY ======== --><!-- =========== FIELD SUMMARY =========== --><!-- ======== CONSTRUCTOR SUMMARY ======== --><!-- ========== 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> java.lang.Object</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../org/apache/jetspeed/portlet/PortletContext.html#getAttribute(java.lang.String)">getAttribute</A></B>(java.lang.String name)</CODE><BR> <B>Deprecated.</B> Returns the attribute value with the given name, or <CODE>null</CODE> if no such attribute exists.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> java.util.Enumeration</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../org/apache/jetspeed/portlet/PortletContext.html#getAttributeNames()">getAttributeNames</A></B>()</CODE><BR> <B>Deprecated.</B> Returns an enumeration of the attribute names that this portlet context is aware of.</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="../../../../org/apache/jetspeed/portlet/PortletContext.html#getContainerInfo()">getContainerInfo</A></B>()</CODE><BR> <B>Deprecated.</B> Returns the name and version of the portlet container which the portlet is running 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="../../../../org/apache/jetspeed/portlet/PortletContext.html#getInitParameter(java.lang.String)">getInitParameter</A></B>(java.lang.String name)</CODE><BR> <B>Deprecated.</B> Returns the value of the context-wide initialization parameter with the given name, or <CODE>null</CODE> if the parameter does not exist.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> java.util.Enumeration</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../org/apache/jetspeed/portlet/PortletContext.html#getInitParameterNames()">getInitParameterNames</A></B>()</CODE><BR> <B>Deprecated.</B> Returns the names of this contexts initialization parameters as an enumeration, or an empty enumeration if this context has no initialization parameters.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../../../org/apache/jetspeed/portlet/PortletLog.html" title="interface in org.apache.jetspeed.portlet">PortletLog</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../../org/apache/jetspeed/portlet/PortletContext.html#getLog()">getLog</A></B>()</CODE><BR> <B>Deprecated.</B> Returns the portlet log which allows the portlet to write debug, informational, warning, or error messages to a log.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../org/apache/jetspeed/portlet/PortletContext.html#getMajorVersion()">getMajorVersion</A></B>()</CODE><BR> <B>Deprecated.</B> Returns the major version of the Portlet API that this portlet container supports.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../org/apache/jetspeed/portlet/PortletContext.html#getMinorVersion()">getMinorVersion</A></B>()</CODE><BR> <B>Deprecated.</B> Returns the minor version of the Portlet API that this portlet container supports.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> java.io.InputStream</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../org/apache/jetspeed/portlet/PortletContext.html#getResourceAsStream(java.lang.String)">getResourceAsStream</A></B>(java.lang.String path)</CODE><BR> <B>Deprecated.</B> Returns the resource located at the given path as an <CODE>InputStream</CODE> object.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> java.io.InputStream</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../org/apache/jetspeed/portlet/PortletContext.html#getResourceAsStream(java.lang.String, org.apache.jetspeed.portlet.Client, java.util.Locale)">getResourceAsStream</A></B>(java.lang.String path, <A HREF="../../../../org/apache/jetspeed/portlet/Client.html" title="interface in org.apache.jetspeed.portlet">Client</A> client, java.util.Locale locale)</CODE><BR> <B>Deprecated.</B> Returns the resource located at the given path as an <CODE>InputStream</CODE> object.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../../../org/apache/jetspeed/portlet/service/PortletService.html" title="interface in org.apache.jetspeed.portlet.service">PortletService</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../../org/apache/jetspeed/portlet/PortletContext.html#getService(java.lang.Class)">getService</A></B>(java.lang.Class service)</CODE><BR> <B>Deprecated.</B> This function looks up a portlet service with the given classname.</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="../../../../org/apache/jetspeed/portlet/PortletContext.html#getText(java.lang.String, java.lang.String, java.util.Locale)">getText</A></B>(java.lang.String bundle, java.lang.String key, java.util.Locale locale)</CODE><BR> <B>Deprecated.</B> Returns the localized text resource with the given key and using the given locale.</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="../../../../org/apache/jetspeed/portlet/PortletContext.html#include(java.lang.String, org.apache.jetspeed.portlet.PortletRequest, org.apache.jetspeed.portlet.PortletResponse)">include</A></B>(java.lang.String path, <A HREF="../../../../org/apache/jetspeed/portlet/PortletRequest.html" title="interface in org.apache.jetspeed.portlet">PortletRequest</A> request, <A HREF="../../../../org/apache/jetspeed/portlet/PortletResponse.html" title="interface in org.apache.jetspeed.portlet">PortletResponse</A> response)</CODE><BR> <B>Deprecated.</B> Allows the portlet to delegate the rendering to another resource as specified by the given path.</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="../../../../org/apache/jetspeed/portlet/PortletContext.html#removeAttribute(java.lang.String)">removeAttribute</A></B>(java.lang.String name)</CODE><BR> <B>Deprecated.</B> Removes the attribute with the given name.</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="../../../../org/apache/jetspeed/portlet/PortletContext.html#send(java.lang.String, org.apache.jetspeed.portlet.DefaultPortletMessage)">send</A></B>(java.lang.String portletName, org.apache.jetspeed.portlet.DefaultPortletMessage message)</CODE><BR> <B>Deprecated.</B> Sends the given message to all portlets on the same page that have the given name regardless of the portlet application.</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="../../../../org/apache/jetspeed/portlet/PortletContext.html#send(java.lang.String, org.apache.jetspeed.portlet.PortletMessage)">send</A></B>(java.lang.String portletName, org.apache.jetspeed.portlet.PortletMessage message)</CODE><BR> <B>Deprecated.</B> Sends the given message to all portlets in the same portlet application on the same page that have the given name.</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="../../../../org/apache/jetspeed/portlet/PortletContext.html#send(java.lang.String, org.apache.jetspeed.portlet.PortletMessage, org.apache.jetspeed.portlet.PortletRequest)">send</A></B>(java.lang.String portletName, org.apache.jetspeed.portlet.PortletMessage message, <A HREF="../../../../org/apache/jetspeed/portlet/PortletRequest.html" title="interface in org.apache.jetspeed.portlet">PortletRequest</A> request)</CODE><BR> <B>Deprecated.</B> <I>since Version 1.1</I></TD>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -