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

📄 portletrequest.html.svn-base

📁 portal越来越流行了
💻 SVN-BASE
📖 第 1 页 / 共 5 页
字号:
<HR><A NAME="getPreferences()"><!-- --></A><H3>getPreferences</H3><PRE><A HREF="../../javax/portlet/PortletPreferences.html" title="interface in javax.portlet">PortletPreferences</A> <B>getPreferences</B>()</PRE><DL><DD>Returns the preferences object associated with the portlet.<P><DD><DL><DT><B>Returns:</B><DD>the portlet preferences</DL></DD></DL><HR><A NAME="getPortletSession()"><!-- --></A><H3>getPortletSession</H3><PRE><A HREF="../../javax/portlet/PortletSession.html" title="interface in javax.portlet">PortletSession</A> <B>getPortletSession</B>()</PRE><DL><DD>Returns the current portlet session or, if there is no current session, creates one and returns the new session.  <p> Creating a new portlet session will result in creating a new <code>HttpSession</code> on which the portlet session is based on.<P><DD><DL><DT><B>Returns:</B><DD>the portlet session</DL></DD></DL><HR><A NAME="getPortletSession(boolean)"><!-- --></A><H3>getPortletSession</H3><PRE><A HREF="../../javax/portlet/PortletSession.html" title="interface in javax.portlet">PortletSession</A> <B>getPortletSession</B>(boolean&nbsp;create)</PRE><DL><DD>Returns the current portlet session or, if there is no current session and the given flag is <CODE>true</CODE>, creates one and returns the new session. <P> If the given flag is <CODE>false</CODE> and there is no current portlet session, this method returns <CODE>null</CODE>.  <p> Creating a new portlet session will result in creating a new <code>HttpSession</code> on which the portlet session is based on.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>create</CODE> - <CODE>true</CODE> to create a new session, <BR>               <CODE>false</CODE> to return <CODE>null</CODE> if there               is no current session<DT><B>Returns:</B><DD>the portlet session</DL></DD></DL><HR><A NAME="getProperty(java.lang.String)"><!-- --></A><H3>getProperty</H3><PRE>java.lang.String <B>getProperty</B>(java.lang.String&nbsp;name)</PRE><DL><DD>Returns the value of the specified request property as a <code>String</code>. If the request did not include a property of the specified name, this method returns <code>null</code>. <p> A portlet can access portal/portlet-container specific properties  through this method and, if available, the headers of the HTTP client request. <p> This method should only be used if the  property has only one value. If the property might have more than one value, use <A HREF="../../javax/portlet/PortletRequest.html#getProperties(java.lang.String)"><CODE>getProperties(java.lang.String)</CODE></A>. <p> If this method is used with a multivalued parameter, the value returned is equal to the first value in the Enumeration returned by <code>getProperties</code>.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>name</CODE> - a <code>String</code> specifying the                                property name<DT><B>Returns:</B><DD>a <code>String</code> containing the                                value of the requested                                property, or <code>null</code>                                if the request does not                                have a property of that name.<DT><B>Throws:</B><DD><CODE>java.lang.IllegalArgumentException</CODE> - if name is <code>null</code>.</DL></DD></DL><HR><A NAME="getProperties(java.lang.String)"><!-- --></A><H3>getProperties</H3><PRE>java.util.Enumeration&lt;java.lang.String&gt; <B>getProperties</B>(java.lang.String&nbsp;name)</PRE><DL><DD>Returns all the values of the specified request property as a <code>Enumeration</code> of <code>String</code> objects. <p> If the request did not include any properties of the specified name, this method returns an empty <code>Enumeration</code>. The property name is case insensitive. You can use this method with any request property.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>name</CODE> - a <code>String</code> specifying the                                property name<DT><B>Returns:</B><DD>a <code>Enumeration</code> containing                        the values of the requested property. If                        the request does not have any properties of                        that name return an empty <code>Enumeration</code>.<DT><B>Throws:</B><DD><CODE>java.lang.IllegalArgumentException</CODE> - if name is <code>null</code>.</DL></DD></DL><HR><A NAME="getPropertyNames()"><!-- --></A><H3>getPropertyNames</H3><PRE>java.util.Enumeration&lt;java.lang.String&gt; <B>getPropertyNames</B>()</PRE><DL><DD>Returns a <code>Enumeration</code> of all the property names this request contains. If the request has no properties, this method returns an empty <code>Enumeration</code>.<P><DD><DL><DT><B>Returns:</B><DD>an <code>Enumeration</code> of all the                                property names sent with this                                request; if the request has                                no properties, an empty <code>Enumeration</code>.</DL></DD></DL><HR><A NAME="getPortalContext()"><!-- --></A><H3>getPortalContext</H3><PRE><A HREF="../../javax/portlet/PortalContext.html" title="interface in javax.portlet">PortalContext</A> <B>getPortalContext</B>()</PRE><DL><DD>Returns the context of the calling portal.<P><DD><DL><DT><B>Returns:</B><DD>the context of the calling portal</DL></DD></DL><HR><A NAME="getAuthType()"><!-- --></A><H3>getAuthType</H3><PRE>java.lang.String <B>getAuthType</B>()</PRE><DL><DD>Returns the name of the authentication scheme used for the  connection between client and portal, for example, <code>BASIC_AUTH</code>, <code>CLIENT_CERT_AUTH</code>,  a custom one or <code>null</code> if there was no authentication.<P><DD><DL><DT><B>Returns:</B><DD>one of the static members <code>BASIC_AUTH</code>,                         <code>FORM_AUTH</code>, <code>CLIENT_CERT_AUTH</code>,                     <code>DIGEST_AUTH</code> (suitable for == comparison)                         indicating the authentication scheme,                     a custom one, or                         <code>null</code> if the request was                         not authenticated.</DL></DD></DL><HR><A NAME="getContextPath()"><!-- --></A><H3>getContextPath</H3><PRE>java.lang.String <B>getContextPath</B>()</PRE><DL><DD>Returns the context path which is the path prefix associated with the deployed  portlet application. If the portlet application is rooted at the base of the web server URL namespace (also known as "default" context),  this path must be an empty string. Otherwise, it must be the path the portlet application is rooted to, the path must start with a '/' and  it must not end with a '/' character. <p> To encode a URL the <A HREF="../../javax/portlet/PortletResponse.html#encodeURL(java.lang.String)"><CODE>PortletResponse.encodeURL(java.lang.String)</CODE></A> method must be used.<P><DD><DL><DT><B>Returns:</B><DD>a <code>String</code> specifying the                        portion of the request URL that indicates the context                        of the request<DT><B>See Also:</B><DD><A HREF="../../javax/portlet/PortletResponse.html#encodeURL(java.lang.String)"><CODE>PortletResponse.encodeURL(java.lang.String)</CODE></A></DL></DD></DL><HR><A NAME="getRemoteUser()"><!-- --></A><H3>getRemoteUser</H3><PRE>java.lang.String <B>getRemoteUser</B>()</PRE><DL><DD>Returns the login of the user making this request, if the user  has been authenticated, or null if the user has not been authenticated.<P><DD><DL><DT><B>Returns:</B><DD>a <code>String</code> specifying the login                        of the user making this request, or <code>null</code>                        if the user login is not known.</DL></DD></DL><HR><A NAME="getUserPrincipal()"><!-- --></A><H3>getUserPrincipal</H3><PRE>java.security.Principal <B>getUserPrincipal</B>()</PRE><DL><DD>Returns a java.security.Principal object containing the name of the  current authenticated user.<P><DD><DL><DT><B>Returns:</B><DD>a <code>java.security.Principal</code> containing                        the name of the user making this request, or                        <code>null</code> if the user has not been                         authenticated.</DL></DD></DL><HR><A NAME="isUserInRole(java.lang.String)"><!-- --></A><H3>isUserInRole</H3><PRE>boolean <B>isUserInRole</B>(java.lang.String&nbsp;role)</PRE><DL><DD>Returns a boolean indicating whether the authenticated user is  included in the specified logical "role".  Roles and role membership can be defined using deployment descriptors.  If the user has not been authenticated, the method returns <code>false</code>.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>role</CODE> - a <code>String</code> specifying the name                                of the role<DT><B>Returns:</B><DD>a <code>boolean</code> indicating whether                        the user making this request belongs to a given role;                        <code>false</code> if the user has not been                         authenticated.</DL></DD></DL><HR><A NAME="getAttribute(java.lang.String)"><!-- --></A><H3>getAttribute</H3><PRE>java.lang.Object <B>getAttribute</B>(java.lang.String&nbsp;name)</PRE><DL><DD>Returns the value of the named attribute as an <code>Object</code>, or <code>null</code> if no attribute of the given name exists.  <p> Attribute names should follow the same conventions as package names. This specification reserves names matching <code>java.*</code>, and <code>javax.*</code>.  <p> In a distributed portlet web application the <code>Object</code> needs to be serializable.<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                        the attribute does not exist.<DT><B>Throws:</B><DD><CODE>java.lang.IllegalArgumentException</CODE> - if name is <code>null</code>.</DL></DD></DL><HR><A NAME="getAttributeNames()"><!-- --></A><H3>getAttributeNames</H3><PRE>java.util.Enumeration&lt;java.lang.String&gt; <B>getAttributeNames</B>()</PRE><DL><DD>Returns an <code>Enumeration</code> containing the names of the attributes available to this request.  This method returns an empty <code>Enumeration</code> if the request has no attributes available to it.<P><DD><DL><DT><B>Returns:</B><DD>an <code>Enumeration</code> of strings                         containing the names                         of the request attributes, or an empty                     <code>Enumeration</code> if the request                     has no attributes available to it.</DL></DD></DL><HR><A NAME="getParameter(java.lang.String)"><!-- --></A><H3>getParameter</H3><PRE>java.lang.String <B>getParameter</B>(java.lang.String&nbsp;name)</PRE><DL><DD>Returns the value of a request parameter as a <code>String</code>, or <code>null</code> if the parameter does not exist. Request parameters are extra information sent with the request. The returned parameter  are "x-www-form-urlencoded" decoded. <p> Only parameters targeted to the current portlet are accessible. <p> This method should only be used if the  parameter has only one value. If the parameter might have more than one value, use <A HREF="../../javax/portlet/PortletRequest.html#getParameterValues(java.lang.String)"><CODE>getParameterValues(java.lang.String)</CODE></A>. <p> If this method is used with a multivalued parameter, the value returned is equal to the first value in the array returned by <code>getParameterValues</code>.<P><DD><DL>

⌨️ 快捷键说明

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