|
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 | ||||||||
java.lang.Objectjavax.portlet.filter.PortletRequestWrapper
javax.portlet.filter.ResourceRequestWrapper
public class ResourceRequestWrapper
The ResourceRequestWrapper provides a convenient
implementation of the ResourceRequest interface
that can be subclassed by developers wishing to adapt the request.
This class implements the Wrapper or Decorator pattern.
Methods default to calling through to the wrapped request object.
ResourceRequest| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface javax.portlet.PortletRequest |
|---|
PortletRequest.P3PUserInfos |
| Field Summary |
|---|
| Fields inherited from interface javax.portlet.ResourceRequest |
|---|
ETAG |
| 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 |
| Constructor Summary | |
|---|---|
ResourceRequestWrapper(ResourceRequest request)
Creates an ResourceRequest adaptor
wrapping the given request object. |
|
| Method Summary | |
|---|---|
String |
getCacheability()
The default behavior of this method is to call getCacheability() on the wrapped response object. |
String |
getCharacterEncoding()
The default behavior of this method is to call getCharacterEncoding() on the wrapped request object. |
int |
getContentLength()
The default behavior of this method is to call getContentLength() on the wrapped request object. |
String |
getContentType()
The default behavior of this method is to call getContentType() on the wrapped request object. |
String |
getETag()
The default behavior of this method is to call getETag() on the wrapped request object. |
String |
getMethod()
The default behavior of this method is to call getMethod() on the wrapped request object. |
InputStream |
getPortletInputStream()
The default behavior of this method is to call getPortletInputStream() on the wrapped request object. |
Map<String,String[]> |
getPrivateRenderParameterMap()
The default behavior of this method is to call getPrivateRenderParameterMap() on the wrapped request object. |
BufferedReader |
getReader()
The default behavior of this method is to call getReader() on the wrapped request object. |
ResourceRequest |
getRequest()
Return the wrapped request object. |
String |
getResourceID()
The default behavior of this method is to call getResourceID() on the wrapped request object. |
void |
setCharacterEncoding(String enc)
The default behavior of this method is to call setCharacterEncoding(String enc)
on the wrapped request object. |
void |
setRequest(ResourceRequest request)
Sets the request object being wrapped. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface javax.portlet.ResourceRequest |
|---|
getResponseContentType, getResponseContentTypes |
| Constructor Detail |
|---|
public ResourceRequestWrapper(ResourceRequest request)
ResourceRequest adaptor
wrapping the given request object.
request - the resource request to wrap
IllegalArgumentException - if the request is null| Method Detail |
|---|
public InputStream getPortletInputStream()
throws IOException
getPortletInputStream() on the wrapped request object.
getPortletInputStream in interface ClientDataRequestIOException - if an input or output exception occurred
public BufferedReader getReader()
throws UnsupportedEncodingException,
IOException
getReader() on the wrapped request object.
getReader in interface ClientDataRequestBufferedReader
containing the body of the request
UnsupportedEncodingException - if the character set encoding used is
not supported and the text cannot be decoded
IOException - if an input or output exception occurredClientDataRequest.getPortletInputStream()
public void setCharacterEncoding(String enc)
throws UnsupportedEncodingException
setCharacterEncoding(String enc)
on the wrapped request object.
setCharacterEncoding in interface ClientDataRequestenc - a String containing the name of
the character encoding.
UnsupportedEncodingException - if this is not a valid encodingpublic ResourceRequest getRequest()
getRequest in class PortletRequestWrapperpublic void setRequest(ResourceRequest request)
request - the request to set
IllegalArgumentException - if the request is null.public String getCharacterEncoding()
getCharacterEncoding() on the wrapped request object.
getCharacterEncoding in interface ClientDataRequestString containing the name of
the character encoding, or null
if the request does not specify a character encoding.public int getContentLength()
getContentLength() on the wrapped request object.
getContentLength in interface ClientDataRequestpublic String getContentType()
getContentType() on the wrapped request object.
getContentType in interface ClientDataRequestString containing the name
of the MIME type of the request, or null
if the type is not known.public String getETag()
getETag() on the wrapped request object.
getETag in interface ResourceRequestnull if no cached response exists.public String getMethod()
getMethod() on the wrapped request object.
getMethod in interface ClientDataRequestpublic String getResourceID()
getResourceID() on the wrapped request object.
getResourceID in interface ResourceRequestnull
if no resource ID was set on the URL.public Map<String,String[]> getPrivateRenderParameterMap()
getPrivateRenderParameterMap() on the wrapped request object.
getPrivateRenderParameterMap in interface ResourceRequestMap 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[]).public String getCacheability()
getCacheability() on the wrapped response object.
getCacheability in interface ResourceRequest
|
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 | ||||||||