Overview | Package | Class | Tree | Deprecated | Index | Help
| Copyright © 2000, 2008, Oracle and/or its affiliates. All rights reserved.
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## javax.portlet
Interface ResourceRequest

All Superinterfaces
  ClientDataRequest, PortletRequest

All Known Implementing Classes:
  ResourceRequestWrapper

    public interface ResourceRequest

extends ClientDataRequest

The `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.

Since:
  2.0
See Also
  `ClientDataRequest`, `ResourceServingPortlet`

Nested Class Summary

Nested classes/interfaces inherited from interface javax.portlet.PortletRequest
`PortletRequest.P3PUserInfos`

Field Summary
`static String` | `ETAG` This property is set by the container if the container has a cached response for the given validation tag.

Fields inherited from interface javax.portlet.PortletRequest
`ACTION_PHASE, ACTION_SCOPE_ID, BASIC_AUTH, CCPP_PROFILE, CLIENT_CERT_AUTH, DIGEST_AUTH, EVENT_PHASE, FORM_AUTH, LIFECYCLE_PHASE, RENDER_HEADERS, RENDER_MARKUP, RENDER_PART, RENDER_PHASE, RESOURCE_PHASE, USER_INFO`

Method Summary
`String` | `getCacheability()` Returns the cache level of this resource request.
`String` | `getETag()` Returns the validation tag if the portlet container has a cached response for this validation tag, or `null` if no cached response exists.
`Map<String,String[]>` | `getPrivateRenderParameterMap()` Returns a `Map` of the private render parameters of this request.
`String` | `getResourceID()` Returns the resource ID set on the ResourceURL or `null` if no resource ID was set on the URL.
`String` | `getResponseContentType()` Returns the portal preferred content type for the response.
`Enumeration<String>` | `getResponseContentTypes()` Gets a list of content types which the portal accepts for the response.

Methods inherited from interface javax.portlet.ClientDataRequest
`getCharacterEncoding, getContentLength, getContentType, getMethod, getPortletInputStream, getReader, setCharacterEncoding`

Methods inherited from interface javax.portlet.PortletRequest
`getAttribute, getAttributeNames, getAuthType, getContextPath, getCookies, getLocale, getLocales, getParameter, getParameterMap, getParameterNames, getParameterValues, getPortalContext, getPortletMode, getPortletSession, getPortletSession, getPreferences, getPrivateParameterMap, getProperties, getProperty, getPropertyNames, getPublicParameterMap, getRemoteUser, getRequestedSessionId, getScheme, getServerName, getServerPort, getUserPrincipal, getWindowID, getWindowState, isPortletModeAllowed, isRequestedSessionIdValid, isSecure, isUserInRole, isWindowStateAllowed, removeAttribute, setAttribute`

Field Detail

### ETAG

    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 `getProperty` method.

  The value is `"portlet.ETag "`.

  See Also
    Constants Summary

Method Detail

### getETag

    String getETag()

  Returns the validation tag if the portlet container has a cached response for this validation tag, or `null` if no cached response exists.

  This call returns the same value as `ResourceRequest.getProperty(ResourceRequest.ETAG)`.

  Returns
    the validation tag if the portlet container has a cached response for this validation tag, or `null` if no cached response exists.

### getResourceID

    String getResourceID()

  Returns the resource ID set on the ResourceURL or `null` if no resource ID was set on the URL.

  Returns
    the resource ID set on the ResourceURL,or `null` if no resource ID was set on the URL.

### getPrivateRenderParameterMap

    Map<String,String[]> getPrivateRenderParameterMap()

  Returns a `Map` of the private render parameters of this request. Private parameters are not shared with other portlets or components. The returned parameters are "x-www-form-urlencoded" decoded.

  The parameters returned do not include the resource parameters that the portlet may have set on the resource URL triggering this `serveResource` call.

  The values in the returned `Map` are from type String array (`String[]`).

  If no private parameters exist this method returns an empty `Map`.

  Returns
    an immutable `Map` 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[]`).

### getResponseContentType

    String getResponseContentType()

  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.

  Specified by:
    `getResponseContentType` in interface `PortletRequest`
  Returns
    preferred content type of the response

### getResponseContentTypes

    Enumeration<String> getResponseContentTypes()

  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.

  Specified by:
    `getResponseContentTypes` in interface `PortletRequest`
  Returns
    ordered list of content types for the response

### getCacheability

    String getCacheability()

  Returns the cache level of this resource request.

  Possible return values are: `ResourceURL.FULL, ResourceURL.PORTLET` or `ResourceURL.PAGE`.

  Returns
    the cache level of this resource request.

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2000, 2008, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its affiliates.
Other names may be trademarks of their respective owners.