org.apache.pluto.internal.impl
Class ResourceRequestImpl

java.lang.Object
  extended by javax.servlet.ServletRequestWrapper
      extended by javax.servlet.http.HttpServletRequestWrapper
          extended by org.apache.pluto.internal.impl.PortletRequestImpl
              extended by org.apache.pluto.internal.impl.ResourceRequestImpl
All Implemented Interfaces:
ClientDataRequest, PortletRequest, ResourceRequest, javax.servlet.http.HttpServletRequest, javax.servlet.ServletRequest, InternalPortletRequest, InternalResourceRequest

public class ResourceRequestImpl
extends PortletRequestImpl
implements ResourceRequest, InternalResourceRequest


Nested Class Summary
 
Nested classes/interfaces inherited from interface javax.portlet.PortletRequest
PortletRequest.P3PUserInfos
 
Field Summary
 
Fields inherited from class org.apache.pluto.internal.impl.PortletRequestImpl
container, internalPortletWindow
 
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
 
Fields inherited from interface javax.servlet.http.HttpServletRequest
BASIC_AUTH, CLIENT_CERT_AUTH, DIGEST_AUTH, FORM_AUTH
 
Constructor Summary
ResourceRequestImpl(PortletContainer container, InternalPortletWindow internalPortletWindow, javax.servlet.http.HttpServletRequest servletRequest)
           
 
Method Summary
 javax.servlet.http.Cookie[] getCookieProperties()
           
 java.lang.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.
 javax.servlet.ServletInputStream getInputStream()
           
 java.lang.String getLifecyclePhase()
           
 java.lang.String getParameter(java.lang.String name)
          Returns the value of a request parameter as a String, or null if the parameter does not exist.
 java.lang.String[] getParameterValues(java.lang.String name)
          Returns an array of String objects containing all of the values the given request parameter has, or null if the parameter does not exist.
 java.io.InputStream getPortletInputStream()
          Retrieves the body of the HTTP request from client to portal as binary data using an InputStream.
 PortletPreferences getPreferences()
          FIXME:
 java.util.Map<java.lang.String,java.lang.String[]> getPrivateRenderParameterMap()
          Returns a Map of the private render parameters of this request.
 java.lang.String getResourceID()
          Returns the resource ID set on the ResourceURL or null if no resource ID was set on the URL.
 
Methods inherited from class org.apache.pluto.internal.impl.PortletRequestImpl
baseGetParameterMap, createUserInfoMap, getAttribute, getAttributeNames, getAuthType, getContextPath, getCookies, getDateHeader, getHeader, getHeaderNames, getHeaders, getHttpServletRequest, getInternalPortletWindow, getIntHeader, getLocalAddr, getLocale, getLocales, getLocalName, getLocalPort, getParameterMap, getParameterNames, getPathInfo, getPathTranslated, getPortalContext, getPortletContainer, getPortletMode, getPortletSession, getPortletSession, getPrivateParameterMap, getProperties, getProperty, getPropertyNames, getProtocol, getPublicParameterMap, getQueryString, getReader, getRealPath, getRemoteAddr, getRemoteHost, getRemotePort, getRemoteUser, getRequestDispatcher, getRequestedSessionId, getRequestURI, getRequestURL, getResponseContentType, getResponseContentTypes, getScheme, getServerName, getServerPort, getServletPath, getSession, getSession, getUserPrincipal, getWindowId, getWindowID, getWindowState, init, isForwarded, isIncluded, isPortletModeAllowed, isRequestedSessionIdValid, isSecure, isUserInRole, isWindowStateAllowed, release, removeAttribute, setAttribute, setBodyAccessed, setCharacterEncoding, setForwarded, setForwardedQueryString, setIncluded, setIncludedQueryString
 
Methods inherited from class javax.servlet.http.HttpServletRequestWrapper
getMethod, isRequestedSessionIdFromCookie, isRequestedSessionIdFromUrl, isRequestedSessionIdFromURL
 
Methods inherited from class javax.servlet.ServletRequestWrapper
getCharacterEncoding, getContentLength, getContentType, getRequest, setRequest
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.pluto.internal.InternalPortletRequest
getHttpServletRequest, getInternalPortletWindow, getPortletContainer, init, isForwarded, isIncluded, release, setAttribute, setForwarded, setForwardedQueryString, setIncluded, setIncludedQueryString
 
Methods inherited from interface javax.portlet.ClientDataRequest
getCharacterEncoding, getContentLength, getContentType, getMethod, getReader, setCharacterEncoding
 
Methods inherited from interface javax.portlet.PortletRequest
getAttribute, getAttributeNames, getAuthType, getContextPath, getCookies, getLocale, getLocales, getParameterMap, getParameterNames, getPortalContext, getPortletMode, getPortletSession, getPortletSession, getPrivateParameterMap, getProperties, getProperty, getPropertyNames, getPublicParameterMap, getRemoteUser, getRequestedSessionId, getResponseContentType, getResponseContentTypes, getScheme, getServerName, getServerPort, getUserPrincipal, getWindowID, getWindowState, isPortletModeAllowed, isRequestedSessionIdValid, isSecure, isUserInRole, isWindowStateAllowed, removeAttribute
 
Methods inherited from interface javax.servlet.ServletRequest
getCharacterEncoding, getContentLength, getContentType
 

Constructor Detail

ResourceRequestImpl

public ResourceRequestImpl(PortletContainer container,
                           InternalPortletWindow internalPortletWindow,
                           javax.servlet.http.HttpServletRequest servletRequest)
Method Detail

getPortletInputStream

public java.io.InputStream getPortletInputStream()
                                          throws java.io.IOException
Description copied from interface: ClientDataRequest
Retrieves the body of the HTTP request from client to portal as binary data using an InputStream. Either this method or ClientDataRequest.getReader() may be called to read the body, but not both.

For HTTP POST data of type application/x-www-form-urlencoded this method throws an IllegalStateException as this data has been already processed by the portal/portlet-container and is available as request parameters.

Specified by:
getPortletInputStream in interface ClientDataRequest
Returns:
an input stream containing the body of the request
Throws:
java.io.IOException - if an input or output exception occurred

getParameterValues

public java.lang.String[] getParameterValues(java.lang.String name)
Description copied from interface: PortletRequest
Returns an array of String objects containing all of the values the given request parameter has, or null if the parameter does not exist. The returned parameters are "x-www-form-urlencoded" decoded.

If the parameter has a single value, the array has a length of 1.

Specified by:
getParameterValues in interface PortletRequest
Specified by:
getParameterValues in interface javax.servlet.ServletRequest
Overrides:
getParameterValues in class PortletRequestImpl
Parameters:
name - a String containing the name of the parameter the value of which is requested
Returns:
an array of String objects containing the parameter values.
See Also:
PortletRequest.getParameter(java.lang.String)

getParameter

public java.lang.String getParameter(java.lang.String name)
Description copied from interface: PortletRequest
Returns the value of a request parameter as a String, or null if the parameter does not exist. Request parameters are extra information sent with the request. The returned parameter are "x-www-form-urlencoded" decoded.

Only parameters targeted to the current portlet are accessible.

This method should only be used if the parameter has only one value. If the parameter might have more than one value, use PortletRequest.getParameterValues(java.lang.String).

If this method is used with a multivalued parameter, the value returned is equal to the first value in the array returned by getParameterValues.

Specified by:
getParameter in interface PortletRequest
Specified by:
getParameter in interface javax.servlet.ServletRequest
Overrides:
getParameter in class PortletRequestImpl
Parameters:
name - a String specifying the name of the parameter
Returns:
a String representing the single value of the parameter
See Also:
PortletRequest.getParameterValues(java.lang.String)

getPreferences

public PortletPreferences getPreferences()
FIXME:

Specified by:
getPreferences in interface PortletRequest
Overrides:
getPreferences in class PortletRequestImpl
Returns:
the portlet preferences

getETag

public java.lang.String getETag()
Description copied from interface: ResourceRequest
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).

Specified by:
getETag in interface ResourceRequest
Returns:
the validation tag if the portlet container has a cached response for this validation tag, or null if no cached response exists.

getLifecyclePhase

public java.lang.String getLifecyclePhase()
Specified by:
getLifecyclePhase in interface InternalPortletRequest
Overrides:
getLifecyclePhase in class PortletRequestImpl

getResourceID

public java.lang.String getResourceID()
Description copied from interface: ResourceRequest
Returns the resource ID set on the ResourceURL or null if no resource ID was set on the URL.

Specified by:
getResourceID in interface ResourceRequest
Returns:
the resource ID set on the ResourceURL,or null if no resource ID was set on the URL.

getCookieProperties

public javax.servlet.http.Cookie[] getCookieProperties()

getInputStream

public javax.servlet.ServletInputStream getInputStream()
                                                throws java.io.IOException
Specified by:
getInputStream in interface javax.servlet.ServletRequest
Overrides:
getInputStream in class PortletRequestImpl
Throws:
java.io.IOException

getPrivateRenderParameterMap

public java.util.Map<java.lang.String,java.lang.String[]> getPrivateRenderParameterMap()
Description copied from interface: ResourceRequest
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.

Specified by:
getPrivateRenderParameterMap in interface ResourceRequest
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[]).


Copyright © 2003-2011 Apache Software Foundation. All Rights Reserved.