PortletRequest defines the base interface to provide client
request information to a portlet. The portlet container uses specialized
versions of this interface when invoking a portlet.
The portlet container creates these objects and
passes them as arguments to the corresponding request processing methods.
The PortletRequest also provides access to the render state.
RenderState, ActionRequest, EventRequest, RenderRequest, ResourceRequest
| Modifier and Type | Class and Description |
|---|---|
| public static enum | PortletRequest.P3PUserInfos
P3P user information constants. |
| Modifier and Type | Field and Description |
|---|---|
| public static final String | ACTION_PHASE
String identifier for the portlet action lifecycle phase. |
| public static final String | ACTION_SCOPE_ID
The action scope ID that the portlet container uses
for storing the current action scope as render parameter
if the |
| public static final String | BASIC_AUTH
String identifier for Basic authentication. |
| public static final String | CCPP_PROFILE
Used to retrieve an instance of the |
| public static final String | CLIENT_CERT_AUTH
String identifier for Certification based authentication. |
| public static final String | DIGEST_AUTH
String identifier for Digest based authentication. |
| public static final String | EVENT_PHASE
String identifier for the portlet event lifecycle phase. |
| public static final String | FORM_AUTH
String identifier for Form based authentication. |
| public static final String | HEADER_PHASE
String identifier for the portlet render lifecycle phase.
|
| public static final String | LIFECYCLE_PHASE
Provides the portlet lifecycle phase of the current request as request attribute. |
| public static final String | RENDER_HEADERS
The RENDER_HEADERS is a possible value of the RENDER_PART request attribute and denotes that the portlet should set the intended headers and the portlet title of this render request. |
| public static final String | RENDER_MARKUP
The RENDER_MARKUP is a possible value of the RENDER_PART request attribute and denotes that the portlet should produce its markup for this render request. |
| public static final String | RENDER_PART
The RENDER_PART portlet request attribute is set by portals that are streaming based and therefore need to split the render phase into two parts: first the RENDER_HEADERS part where the portlet should only set the header related data and the portlet title, and second the RENDER_MARKUP part in which the portlet should produce its markup. |
| public static final String | RENDER_PHASE
String identifier for the portlet render lifecycle phase. |
| public static final String | RESOURCE_PHASE
String identifier for the portlet resource serving lifecycle phase. |
| public static final String | USER_INFO
Used to retrieve user information attributes with the
|
| Modifier and Type | Method and Description |
|---|---|
| public Object | Returns: anObject containing the value
of the attribute, or null if
the attribute does not exist.a name)String specifying the name of
the attributeReturns the value of the named attribute as an |
| public Enumeration | Returns: anEnumeration of strings
containing the names
of the request attributes, or an empty
Enumeration if the request
has no attributes available to it.Returns an |
| public String | Returns: one of the static membersBASIC_AUTH,
FORM_AUTH, CLIENT_CERT_AUTH,
DIGEST_AUTH (suitable for == comparison)
indicating the authentication scheme,
a custom one, or
null if the request was
not authenticated.Returns the name of the authentication scheme used for the
connection between client and portal,
for example, |
| public String | Returns: aString specifying the
portion of the request URL that indicates the context
of the requestReturns the context path which is the path prefix associated with the deployed portlet application. |
| public Cookie[] | Returns: array of cookie properties, ornull if no cookies exist.Returns an array containing all of the Cookie properties. |
| public Locale | Returns: the preferred Locale in which the portal will accept content.Returns the preferred Locale in which the portal will accept content. |
| public Enumeration | Returns: an Enumeration of Locales, in decreasing order, in which the portal will accept content for this requestReturns an Enumeration of Locale objects indicating, in decreasing order starting with the preferred locale in which the portal will accept content for this request. |
| public String | Returns: aString representing the
single value of the parametera name)String specifying the
name of the parameter
Deprecated
As of version 3.0. Use
Returns the value of a request parameter as a getRenderParameters() instead.
String,
or null if the parameter does not exist.
|
| public Map | Returns: an immutableMap containing parameter names as
keys and parameter values as map values, or an empty Map
if no parameters exist. The keys in the parameter
map are of type String. The values in the parameter map are of type
String array (String[]).
Deprecated
As of version 3.0. Use
Returns
a getRenderParameters() instead.
Map of
all public and private parameters
of this request.
|
| public Enumeration | Returns: anEnumeration of String
objects, each String containing
the name of a request parameter; or an
empty Enumeration if the
request has no parameters.
Deprecated
As of version 3.0. Use
Returns an getRenderParameters() instead.
Enumeration of String
objects containing the names of the parameters contained
in this request.
|
| public String[] | Returns: an array ofString objects
containing the parameter values.a name)String containing the name of
the parameter the value of which is requested
Deprecated
As of version 3.0. Use
Returns an array of getRenderParameters() instead.
String objects containing
all of the values the given request parameter has, or
null if the parameter does not exist.
|
| public PortalContext | Returns: the context of the calling portalReturns the context of the calling portal. |
| public PortletContext | Returns: aPortletContext object, used by the
caller to interact with its portlet container
Returns the
PortletContext of the portlet application
the portlet is in.
|
| public PortletSession | Returns: the portlet sessionReturns the current portlet session or, if there is no current session, creates one and returns the new session. |
| public PortletSession | Returns: the portlet sessiontrue to create a new session, false to return null if there
is no current sessionReturns
the current portlet session or, if there is no current session
and the given flag is |
| public PortletPreferences | Returns: the portlet preferencesReturns the preferences object associated with the portlet. |
| public Map | Returns: an immutableMap containing private parameter names as
keys and private parameter values as map values, or an empty Map
if no private parameters exist. The keys in the parameter
map are of type String. The values in the parameter map are of type
String array (String[]).
Deprecated
As of version 3.0. Use
Returns a getRenderParameters() instead.
Map of the private parameters of this request.
|
| public Enumeration | Returns: aEnumeration containing
the values of the requested property. If
the request does not have any properties of
that name return an empty Enumeration.a name)String specifying the
property nameReturns all the values of the specified request property
as a |
| public String | Returns: aString containing the
value of the requested
property, or null
if the request does not
have a property of that name.a name)String specifying the
property nameReturns the value of the specified request property
as a |
| public Enumeration | Returns: anEnumeration of all the
property names sent with this
request; if the request has
no properties, an empty Enumeration.Returns a |
| public Map | Returns: an immutableMap containing public parameter names as
keys and public parameter values as map values, or an empty Map
if no public parameters exist. The keys in the parameter
map are of type String. The values in the parameter map are of type
String array (String[]).
Deprecated
As of version 3.0. Use
Returns a getRenderParameters() instead.
Map of the public parameters of this request.
|
| public String | Returns: aString specifying the login
of the user making this request, or null
if the user login is not known.Returns the login of the user making this request, if the user has been authenticated, or null if the user has not been authenticated. |
| public String | Returns: aString specifying the session
ID, or null if the request did
not specify a session IDReturns the session ID indicated in the client request. |
| public String | Returns: preferred MIME type of the responseReturns the portal preferred content type for the response. |
| public Enumeration | Returns: ordered list of MIME types for the responseGets a list of content types which the portal accepts for the response. |
| public String | Returns: aString containing the name
of the scheme used to make this requestReturns the name of the scheme used to make this request. |
| public String | Returns: aString containing the name
of the server to which the request was sentReturns the host name of the server that received the request. |
| public int | Returns: an integer specifying the port numberReturns the port number on which this request was received. |
| public String | |
| public Principal | Returns: ajava.security.Principal containing
the name of the user making this request, or
null if the user has not been
authenticated.Returns a java.security.Principal object containing the name of the current authenticated user. |
| public String | Returns: the portlet window IDReturns the portlet window ID. The portlet window ID is unique for this portlet window and is constant for the lifetime of the portlet window. |
| public boolean | Returns: true, if it is valid for this portlet in this request to change to the given portlet modeportlet mode to check mode)Returns true, if the given portlet mode is a valid one to set for this portlet in the context of the current request. |
| public boolean | Returns: true if this
request has an id for a valid session
in the current session context;
false otherwiseChecks whether the requested session ID is still valid. |
| public boolean | Returns: true, if the request was made using a secure channel.Returns a boolean indicating whether this request was made using a secure channel between client and the portal, such as HTTPS. |
| public boolean | Returns: aboolean indicating whether
the user making this request belongs to a given role;
false if the user has not been
authenticated.a role)String specifying the name
of the roleReturns a boolean indicating whether the authenticated user is included in the specified logical "role". |
| public boolean | Returns: true, if it is valid for this portlet in this request to change to the given window statewindow state to checked state)Returns true, if the given window state is valid to be set for this portlet in the context of the current request. |
| public void | removeAttribute(String
a name)String specifying
the name of the attribute to be removedRemoves an attribute from this request. |
| public void | setAttribute(String
a name, Object String specifying
the name of the attributethe o)Object to be storedStores an attribute in this request. |