📄 portletsession.html
字号:
getUser</H3><PRE>public <A HREF="../../../../org/apache/jetspeed/portlet/User.html" title="interface in org.apache.jetspeed.portlet">User</A> <B>getUser</B>()</PRE><DL><DD><B>Deprecated.</B> <I>use portletRequest.getUser() since version 1.1</I><P><DD>Returns the user object. The user object contains useful information about the user and his or her preferences. <P> If the user has not logged in or does not grant access to the portlet, this method returns <CODE>null</CODE>.<P><DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>the user object</DL></DD></DL><HR><A NAME="getCreationTime()"><!-- --></A><H3>getCreationTime</H3><PRE>public long <B>getCreationTime</B>()</PRE><DL><DD><B>Deprecated.</B> <DD>Returns the point of time that this session was created. Essentially, this will also be the time when the user logged in. The time is returned as the number of milliseconds since January 1, 1970 GMT.<P><DD><DL><DT><B>Specified by:</B><DD><CODE>getCreationTime</CODE> in interface <CODE>javax.servlet.http.HttpSession</CODE></DL></DD><DD><DL><DT><B>Returns:</B><DD>the time of creation</DL></DD></DL><HR><A NAME="getLastAccessedTime()"><!-- --></A><H3>getLastAccessedTime</H3><PRE>public long <B>getLastAccessedTime</B>()</PRE><DL><DD><B>Deprecated.</B> <DD>Returns the point of time that this session was last accessed. The time is returned as the number of milliseconds since January 1, 1970 GMT.<P><DD><DL><DT><B>Specified by:</B><DD><CODE>getLastAccessedTime</CODE> in interface <CODE>javax.servlet.http.HttpSession</CODE></DL></DD><DD><DL><DT><B>Returns:</B><DD>the time of the last access</DL></DD></DL><HR><A NAME="setAttribute(java.lang.String, java.lang.Object)"><!-- --></A><H3>setAttribute</H3><PRE>public void <B>setAttribute</B>(java.lang.String name, java.lang.Object value)</PRE><DL><DD><B>Deprecated.</B> <DD>Associates an attribute with the given name and value with this session. If a portlet needs to communicate information to embedded servlets or JSP, this methods can used carry the information along. <P> The portlet provider should take care that the the namespace of attribute names is not unnecessarily polluted. It is recommended to prefix all attributes the package and class name of the portlet that makes use of this method.<P><DD><DL><DT><B>Specified by:</B><DD><CODE>setAttribute</CODE> in interface <CODE>javax.servlet.http.HttpSession</CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>name</CODE> - the attribute name<DD><CODE>value</CODE> - the attribute value</DL></DD></DL><HR><A NAME="getAttribute(java.lang.String)"><!-- --></A><H3>getAttribute</H3><PRE>public java.lang.Object <B>getAttribute</B>(java.lang.String name)</PRE><DL><DD><B>Deprecated.</B> <DD>Returns the value of the attribute with the given name, or <CODE>null</CODE> if no attribute with the given name exists.<P><DD><DL><DT><B>Specified by:</B><DD><CODE>getAttribute</CODE> in interface <CODE>javax.servlet.http.HttpSession</CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>name</CODE> - the attribute name<DT><B>Returns:</B><DD>the attribute value</DL></DD></DL><HR><A NAME="getAttributeNames()"><!-- --></A><H3>getAttributeNames</H3><PRE>public java.util.Enumeration <B>getAttributeNames</B>()</PRE><DL><DD><B>Deprecated.</B> <DD>Returns an enumeration of names of all attributes available to this session. This method returns an empty enumeration if the session has no attributes available to it.<P><DD><DL><DT><B>Specified by:</B><DD><CODE>getAttributeNames</CODE> in interface <CODE>javax.servlet.http.HttpSession</CODE></DL></DD><DD><DL><DT><B>Returns:</B><DD>an enumeration of attribute names</DL></DD></DL><HR><A NAME="removeAttribute(java.lang.String)"><!-- --></A><H3>removeAttribute</H3><PRE>public void <B>removeAttribute</B>(java.lang.String name)</PRE><DL><DD><B>Deprecated.</B> <DD>Removes the attribute with the given name.<P><DD><DL><DT><B>Specified by:</B><DD><CODE>removeAttribute</CODE> in interface <CODE>javax.servlet.http.HttpSession</CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>name</CODE> - the name of attribute to be removed</DL></DD></DL><HR><A NAME="invalidate()"><!-- --></A><H3>invalidate</H3><PRE>public void <B>invalidate</B>()</PRE><DL><DD><B>Deprecated.</B> <DD>This method is inherited from the <CODE>HttpSession</CODE> interface, but exhibits a different behavior for a portlet session. It is recommended not to use this method on a portlet session. <P> This method removes all session attributes of the portlet and calls the <CODE>PortletSessionListener.logout</CODE> method, but does not actually invalidate the session object; later access to the session is not guaranteed to cause an exception. Within the same user session, the <CODE>login</CODE> and <CODE>logout</CODE> methods of the portlet will not be called again, even if a new PortletSession is created.<P><DD><DL><DT><B>Specified by:</B><DD><CODE>invalidate</CODE> in interface <CODE>javax.servlet.http.HttpSession</CODE></DL></DD><DD><DL></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=3 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"> <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/PortletResponse.html" title="interface in org.apache.jetspeed.portlet"><B>PREV CLASS</B></A> <A HREF="../../../../org/apache/jetspeed/portlet/PortletSessionListener.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="PortletSession.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 + -