📄 portletcontext.html.svn-base
字号:
<DT><B>Throws:</B><DD><CODE>java.net.MalformedURLException</CODE> - if the pathname is not given in the correct form</DL></DD></DL><HR><A NAME="getAttribute(java.lang.String)"><!-- --></A><H3>getAttribute</H3><PRE>java.lang.Object <B>getAttribute</B>(java.lang.String name)</PRE><DL><DD>Returns the portlet container attribute with the given name, or null if there is no attribute by that name. An attribute allows a portlet container to give the portlet additional information not already provided by this interface. A list of supported attributes can be retrieved using <code>getAttributeNames</code>. <p>The attribute is returned as a <code>java.lang.Object</code> or some subclass. Attribute names should follow the same convention as package names. The Java Portlet API specification reserves names matching <code>java.*</code>, <code>javax.*</code>, and <code>sun.*</code>.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>name</CODE> - a <code>String</code> specifying the name of the attribute<DT><B>Returns:</B><DD>an <code>Object</code> containing the value of the attribute, or <code>null</code> if no attribute exists matching the given name<DT><B>Throws:</B><DD><CODE>java.lang.IllegalArgumentException</CODE> - if name is <code>null</code>.<DT><B>See Also:</B><DD><A HREF="../../javax/portlet/PortletContext.html#getAttributeNames()"><CODE>getAttributeNames()</CODE></A></DL></DD></DL><HR><A NAME="getAttributeNames()"><!-- --></A><H3>getAttributeNames</H3><PRE>java.util.Enumeration<java.lang.String> <B>getAttributeNames</B>()</PRE><DL><DD>Returns an <code>Enumeration</code> containing the attribute names available within this portlet context, or an empty <code>Enumeration</code> if no attributes are available. Use the <A HREF="../../javax/portlet/PortletContext.html#getAttribute(java.lang.String)"><CODE>getAttribute(java.lang.String)</CODE></A> method with an attribute name to get the value of an attribute.<P><DD><DL><DT><B>Returns:</B><DD>an <code>Enumeration</code> of attribute names<DT><B>See Also:</B><DD><A HREF="../../javax/portlet/PortletContext.html#getAttribute(java.lang.String)"><CODE>getAttribute(java.lang.String)</CODE></A></DL></DD></DL><HR><A NAME="getInitParameter(java.lang.String)"><!-- --></A><H3>getInitParameter</H3><PRE>java.lang.String <B>getInitParameter</B>(java.lang.String name)</PRE><DL><DD>Returns a String containing the value of the named context-wide initialization parameter, or <code>null</code> if the parameter does not exist. This method provides configuration information which may be useful for an entire "portlet application".<P><DD><DL><DT><B>Parameters:</B><DD><CODE>name</CODE> - a <code>String</code> containing the name of the requested parameter<DT><B>Returns:</B><DD>a <code>String</code> containing the value of the initialization parameter, or <code>null</code> if the parameter does not exist.<DT><B>Throws:</B><DD><CODE>java.lang.IllegalArgumentException</CODE> - if name is <code>null</code>.<DT><B>See Also:</B><DD><A HREF="../../javax/portlet/PortletContext.html#getInitParameterNames()"><CODE>getInitParameterNames()</CODE></A></DL></DD></DL><HR><A NAME="getInitParameterNames()"><!-- --></A><H3>getInitParameterNames</H3><PRE>java.util.Enumeration<java.lang.String> <B>getInitParameterNames</B>()</PRE><DL><DD>Returns the names of the context initialization parameters as an <code>Enumeration</code> of String objects, or an empty Enumeration if the context has no initialization parameters.<P><DD><DL><DT><B>Returns:</B><DD>an <code>Enumeration</code> of <code>String</code> objects containing the names of the context initialization parameters<DT><B>See Also:</B><DD><A HREF="../../javax/portlet/PortletContext.html#getInitParameter(java.lang.String)"><CODE>getInitParameter(java.lang.String)</CODE></A></DL></DD></DL><HR><A NAME="log(java.lang.String)"><!-- --></A><H3>log</H3><PRE>void <B>log</B>(java.lang.String msg)</PRE><DL><DD>Writes the specified message to a portlet log file, usually an event log. The name and type of the portlet log file is specific to the portlet container. <p> This method mapps to the <code>ServletContext.log</code> method. The portlet container may in addition log this message in a portlet container specific log file.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>msg</CODE> - a <code>String</code> specifying the message to be written to the log file</DL></DD></DL><HR><A NAME="log(java.lang.String, java.lang.Throwable)"><!-- --></A><H3>log</H3><PRE>void <B>log</B>(java.lang.String message, java.lang.Throwable throwable)</PRE><DL><DD>Writes an explanatory message and a stack trace for a given Throwable exception to the portlet log file. The name and type of the portlet log file is specific to the portlet container, usually an event log. <p> This method is mapped to the <code>ServletContext.log</code> method. The portlet container may in addition log this message in a portlet container specific log file.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>message</CODE> - a <code>String</code> that describes the error or exception<DD><CODE>throwable</CODE> - the <code>Throwable</code> error or exception</DL></DD></DL><HR><A NAME="removeAttribute(java.lang.String)"><!-- --></A><H3>removeAttribute</H3><PRE>void <B>removeAttribute</B>(java.lang.String name)</PRE><DL><DD>Removes the attribute with the given name from the portlet context. After removal, subsequent calls to <A HREF="../../javax/portlet/PortletContext.html#getAttribute(java.lang.String)"><CODE>getAttribute(java.lang.String)</CODE></A> to retrieve the attribute's value will return <code>null</code>.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>name</CODE> - a <code>String</code> specifying the name of the attribute to be removed<DT><B>Throws:</B><DD><CODE>java.lang.IllegalArgumentException</CODE> - if name is <code>null</code>.</DL></DD></DL><HR><A NAME="setAttribute(java.lang.String, java.lang.Object)"><!-- --></A><H3>setAttribute</H3><PRE>void <B>setAttribute</B>(java.lang.String name, java.lang.Object object)</PRE><DL><DD>Binds an object to a given attribute name in this portlet context. If the name specified is already used for an attribute, this method removes the old attribute and binds the name to the new attribute. <p> If a null value is passed, the effect is the same as calling <code>removeAttribute()</code>. <p>Attribute names should follow the same convention as package names. The Java Portlet API specification reserves names matching <code>java.*</code>, <code>javax.*</code>, and <code>sun.*</code>.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>name</CODE> - a <code>String</code> specifying the name of the attribute<DD><CODE>object</CODE> - an <code>Object</code> representing the attribute to be bound<DT><B>Throws:</B><DD><CODE>java.lang.IllegalArgumentException</CODE> - if name is <code>null</code>.</DL></DD></DL><HR><A NAME="getPortletContextName()"><!-- --></A><H3>getPortletContextName</H3><PRE>java.lang.String <B>getPortletContextName</B>()</PRE><DL><DD>Returns the name of this portlet application correponding to this PortletContext as specified in the <code>web.xml</code> deployment descriptor for this web application by the <code>display-name</code> element.<P><DD><DL><DT><B>Returns:</B><DD>The name of the web application or null if no name has been declared in the deployment descriptor.</DL></DD></DL><HR><A NAME="getContainerRuntimeOptions()"><!-- --></A><H3>getContainerRuntimeOptions</H3><PRE>java.util.Enumeration<java.lang.String> <B>getContainerRuntimeOptions</B>()</PRE><DL><DD>Returns the container container runtime options keys supported by this portlet container.<P><DD><DL><DT><B>Returns:</B><DD>container runtime options keys supported by this container as String values.<DT><B>Since:</B></DT> <DD>2.0</DD></DL></DD></DL><!-- ========= END OF CLASS DATA ========= --><HR><!-- ======= START OF BOTTOM NAVBAR ====== --><A NAME="navbar_bottom"><!-- --></A><A HREF="#skip-navbar_bottom" 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_bottom_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"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/PortletContext.html"><FONT CLASS="NavBarFont1"><B>Use</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="../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../index-files/index-1.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="../../javax/portlet/PortletConfig.html" title="interface in javax.portlet"><B>PREV CLASS</B></A> <A HREF="../../javax/portlet/PortletException.html" title="class in javax.portlet"><B>NEXT CLASS</B></A></FONT></TD><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../index.html?javax/portlet/PortletContext.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_bottom"></A><!-- ======== END OF BOTTOM NAVBAR ======= --><HR></BODY></HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -