ResourceRequest interface represents the request
send to the portlet for rendering resources.
It extends the ClientDataRequest interface and provides resource request
information to portlets.
The portlet container creates an ResourceRequest object and
passes it as argument to the portlet's serveResource method.
The ResourceRequest is provided with the current portlet mode, window state,
and render parameters that the portlet can access via the
PortletResourceRequest with getPortletMode and,
getWindowState, or one of the getParameter methods.
ResourceURLs cannot change the current portlet mode, window state or
render parameters. Parameters set on a resource URL are not render parameters
but parameters for serving this resource and will last only for only
this the current serveResource request.
If a parameter is set that has the same name as a render parameter that this
resource URL contains, the render parameter must be the last entry in the
parameter value array.
ClientDataRequest, ResourceServingPortlet
| Modifier and Type | Field and Description |
|---|---|
| public static final String | ETAG
This property is set by the container if the container has a cached response for the given validation tag. |
| Modifier and Type | Method and Description |
|---|---|
| public String | Returns: the cache level of this resource request.Returns the cache level of this resource request. |
| public DispatcherType | Returns: the dispatcher type of this request
Gets the dispatcher type of this request.
|
| public String | Returns: the validation tag if the portlet container has a cached response for this validation tag, ornull if no cached response exists.Returns the validation tag if the portlet container
has a cached response for this validation tag, or
|
| public PortletAsyncContext | Returns: theAsyncContext (re)initialized by the most recent startAsync method invocation
Gets the
AsyncContext that was created or reinitialized by the most
recent invocation of startAsync() or
startAsync(ResourceRequest,ResourceResponse) on this request. |
| public PortletMode | Returns: the portlet mode. The portlet mode UNDEFINED will be returned if the cache level is set toResourceURL.FULL.
Redeclares javax. |
| 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 PortletRequest#getRenderParameters() instead.
Map of the private render parameters of this request.
|
| public String | Returns: the resource ID set on the ResourceURL,ornull
if no resource ID was set on the URL.Returns the resource ID set on the ResourceURL or |
| public ResourceParameters | Returns: an immutableResourceParameters object representing
the resource parameters
Gets the resource parameters set for this request.
|
| public String | Returns: preferred content type of the responseRedeclares javax. |
| public Enumeration | Returns: ordered list of content types for the responseRedeclares javax. |
| public WindowState | Returns: the window state. The window state UNDEFINED will be returned if the cache level is set toResourceURL.FULL.
Redeclares javax. |
| public boolean | Returns: true if asynchronous mode has been started
Checks if this request has been put into asynchronous mode.
|
| public boolean | Returns: true if this request supports asynchronous operation
Checks if this request supports asynchronous operation.
|
| public PortletAsyncContext | Returns: the (re)initialized AsyncContext
Puts this request into asynchronous mode and initializes the
AsyncContext
object. |
| public PortletAsyncContext | Returns: the (re)initialized AsyncContext
Puts this request into asynchronous mode and initializes the
AsyncContext
object. |
| ETAG | back to summary |
|---|---|
| public static final String ETAG This property is set by the container if the container
has a cached response for the given validation tag. The property can be
retrieved using the
The value is | |
| getCacheability | back to summary |
|---|---|
| public String getCacheability() Returns the cache level of this resource request.
Possible return values are:
| |
| getDispatcherType | back to summary |
|---|---|
| public DispatcherType getDispatcherType()
Gets the dispatcher type of this request.
The initial dispatcher type of a request is defined as
| |
| getETag | back to summary |
|---|---|
| public String getETag() Returns the validation tag if the portlet container
has a cached response for this validation tag, or
This call returns the same value as
| |
| getPortletAsyncContext | back to summary |
|---|---|
| public PortletAsyncContext getPortletAsyncContext()
Gets the
AsyncContext that was created or reinitialized by the most
recent invocation of startAsync() or
startAsync(ResourceRequest,ResourceResponse) on this request.
| |
| getPortletMode | back to summary |
|---|---|
| public PortletMode getPortletMode() Redeclares javax. Returns the current portlet mode of the portlet.
If called during a request where the cache level is set to
| |
| getPrivateRenderParameterMap | back to summary |
|---|---|
| public Map Deprecated As of version 3.0. Use Returns a
The parameters returned do not include the resource parameters that
the portlet may have set on the resource URL triggering this
The values in the returned
If no private parameters exist this method returns an empty
| |
| getResourceID | back to summary |
|---|---|
| public String getResourceID() Returns the resource ID set on the ResourceURL or
| |
| getResourceParameters | back to summary |
|---|---|
| public ResourceParameters getResourceParameters()
Gets the resource parameters set for this request.
Resource parameters are additional portlet parameters added to the URL triggering the request that extend the state information provided by the render parameters.
| |
| getResponseContentType | back to summary |
|---|---|
| public String getResponseContentType() Redeclares javax. Returns the portal preferred content type for the response. The returned content type should be based on the HTTP Accept header provided by the client.
| |
| getResponseContentTypes | back to summary |
|---|---|
| public Enumeration Redeclares javax. Gets a list of content types which the portal accepts for the response. This list is ordered with the most preferable types listed first. The returned content types should be based on the HTTP Accept header provided by the client.
| |
| getWindowState | back to summary |
|---|---|
| public WindowState getWindowState() Redeclares javax. Returns the current window state of the portlet.
If called during a request where the cache level is set to
| |
| isAsyncStarted | back to summary |
|---|---|
| public boolean isAsyncStarted()
Checks if this request has been put into asynchronous mode.
A
This method returns
| |
| isAsyncSupported | back to summary |
|---|---|
| public boolean isAsyncSupported()
Checks if this request supports asynchronous operation.
Asynchronous operation is disabled for this request if this request is within the scope of a filter or servlet that has not been annotated or flagged in the portlet configuration as being able to support asynchronous handling.
| |
| startPortletAsync | back to summary |
|---|---|
| public PortletAsyncContext startPortletAsync() throws IllegalStateException
Puts this request into asynchronous mode and initializes the
AsyncContext
object.
Calling this method will cause committal of the associated response to be delayed until
This method clears the list of
Subsequent invocations of this method, or its overloaded variant, will return
the same
The
The original
The
A portlet
| |
| startPortletAsync | back to summary |
|---|---|
| public PortletAsyncContext startPortletAsync(ResourceRequest request, ResourceResponse response) throws IllegalStateException
Puts this request into asynchronous mode and initializes the
AsyncContext
object.
Calling this method will cause committal of the associated response to be delayed until
This method clears the list of
The
The
Subsequent invocations of this method, or its zero-argument variant, will return
the same
The
A portlet
| |