spring-webmvc-portlet

org.springframework.web.portlet.context
Class PortletWebRequest

java.lang.Object
  extended by org.springframework.web.context.request.AbstractRequestAttributes
      extended by org.springframework.web.portlet.context.PortletRequestAttributes
          extended by org.springframework.web.portlet.context.PortletWebRequest
All Implemented Interfaces:
org.springframework.web.context.request.NativeWebRequest, org.springframework.web.context.request.RequestAttributes, org.springframework.web.context.request.WebRequest

public class PortletWebRequest
extends PortletRequestAttributes
implements org.springframework.web.context.request.NativeWebRequest

WebRequest adapter for a PortletRequest.

Since:
2.0
Author:
Juergen Hoeller

Field Summary
 
Fields inherited from class org.springframework.web.portlet.context.PortletRequestAttributes
DESTRUCTION_CALLBACK_NAME_PREFIX
 
Fields inherited from class org.springframework.web.context.request.AbstractRequestAttributes
requestDestructionCallbacks
 
Fields inherited from interface org.springframework.web.context.request.RequestAttributes
REFERENCE_REQUEST, REFERENCE_SESSION, SCOPE_GLOBAL_SESSION, SCOPE_REQUEST, SCOPE_SESSION
 
Constructor Summary
PortletWebRequest(javax.portlet.PortletRequest request)
          Create a new PortletWebRequest instance for the given request.
PortletWebRequest(javax.portlet.PortletRequest request, javax.portlet.PortletResponse response)
          Create a new PortletWebRequest instance for the given request/response pair.
 
Method Summary
 boolean checkNotModified(long lastModifiedTimestamp)
          Last-modified handling not supported for portlet requests: As a consequence, this method always returns false.
 boolean checkNotModified(java.lang.String eTag)
          Last-modified handling not supported for portlet requests: As a consequence, this method always returns false.
 java.lang.String getContextPath()
           
 java.lang.String getDescription(boolean includeClientInfo)
           
 java.lang.String getHeader(java.lang.String headerName)
           
 java.util.Iterator<java.lang.String> getHeaderNames()
           
 java.lang.String[] getHeaderValues(java.lang.String headerName)
           
 java.util.Locale getLocale()
           
 java.lang.Object getNativeRequest()
           
<T> T
getNativeRequest(java.lang.Class<T> requiredType)
           
 java.lang.Object getNativeResponse()
           
<T> T
getNativeResponse(java.lang.Class<T> requiredType)
           
 java.lang.String getParameter(java.lang.String paramName)
           
 java.util.Map<java.lang.String,java.lang.String[]> getParameterMap()
           
 java.util.Iterator<java.lang.String> getParameterNames()
           
 java.lang.String[] getParameterValues(java.lang.String paramName)
           
 java.lang.String getRemoteUser()
           
 javax.portlet.PortletResponse getResponse()
          Exposes the native PortletResponse that we're wrapping (if any).
 java.security.Principal getUserPrincipal()
           
 boolean isSecure()
           
 boolean isUserInRole(java.lang.String role)
           
 java.lang.String toString()
           
 
Methods inherited from class org.springframework.web.portlet.context.PortletRequestAttributes
getAttribute, getAttributeNames, getRequest, getSession, getSessionId, getSessionMutex, registerDestructionCallback, registerSessionDestructionCallback, removeAttribute, resolveReference, setAttribute, updateAccessedSessionAttributes
 
Methods inherited from class org.springframework.web.context.request.AbstractRequestAttributes
isRequestActive, registerRequestDestructionCallback, removeRequestDestructionCallback, requestCompleted
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.springframework.web.context.request.RequestAttributes
getAttribute, getAttributeNames, getSessionId, getSessionMutex, registerDestructionCallback, removeAttribute, resolveReference, setAttribute
 

Constructor Detail

PortletWebRequest

public PortletWebRequest(javax.portlet.PortletRequest request)
Create a new PortletWebRequest instance for the given request.

Parameters:
request - current portlet request

PortletWebRequest

public PortletWebRequest(javax.portlet.PortletRequest request,
                         javax.portlet.PortletResponse response)
Create a new PortletWebRequest instance for the given request/response pair.

Parameters:
request - current portlet request
response - current portlet response
Method Detail

getResponse

public final javax.portlet.PortletResponse getResponse()
Exposes the native PortletResponse that we're wrapping (if any).


getNativeRequest

public java.lang.Object getNativeRequest()
Specified by:
getNativeRequest in interface org.springframework.web.context.request.NativeWebRequest

getNativeResponse

public java.lang.Object getNativeResponse()
Specified by:
getNativeResponse in interface org.springframework.web.context.request.NativeWebRequest

getNativeRequest

public <T> T getNativeRequest(java.lang.Class<T> requiredType)
Specified by:
getNativeRequest in interface org.springframework.web.context.request.NativeWebRequest

getNativeResponse

public <T> T getNativeResponse(java.lang.Class<T> requiredType)
Specified by:
getNativeResponse in interface org.springframework.web.context.request.NativeWebRequest

getHeader

public java.lang.String getHeader(java.lang.String headerName)
Specified by:
getHeader in interface org.springframework.web.context.request.WebRequest

getHeaderValues

public java.lang.String[] getHeaderValues(java.lang.String headerName)
Specified by:
getHeaderValues in interface org.springframework.web.context.request.WebRequest

getHeaderNames

public java.util.Iterator<java.lang.String> getHeaderNames()
Specified by:
getHeaderNames in interface org.springframework.web.context.request.WebRequest

getParameter

public java.lang.String getParameter(java.lang.String paramName)
Specified by:
getParameter in interface org.springframework.web.context.request.WebRequest

getParameterValues

public java.lang.String[] getParameterValues(java.lang.String paramName)
Specified by:
getParameterValues in interface org.springframework.web.context.request.WebRequest

getParameterNames

public java.util.Iterator<java.lang.String> getParameterNames()
Specified by:
getParameterNames in interface org.springframework.web.context.request.WebRequest

getParameterMap

public java.util.Map<java.lang.String,java.lang.String[]> getParameterMap()
Specified by:
getParameterMap in interface org.springframework.web.context.request.WebRequest

getLocale

public java.util.Locale getLocale()
Specified by:
getLocale in interface org.springframework.web.context.request.WebRequest

getContextPath

public java.lang.String getContextPath()
Specified by:
getContextPath in interface org.springframework.web.context.request.WebRequest

getRemoteUser

public java.lang.String getRemoteUser()
Specified by:
getRemoteUser in interface org.springframework.web.context.request.WebRequest

getUserPrincipal

public java.security.Principal getUserPrincipal()
Specified by:
getUserPrincipal in interface org.springframework.web.context.request.WebRequest

isUserInRole

public boolean isUserInRole(java.lang.String role)
Specified by:
isUserInRole in interface org.springframework.web.context.request.WebRequest

isSecure

public boolean isSecure()
Specified by:
isSecure in interface org.springframework.web.context.request.WebRequest

checkNotModified

public boolean checkNotModified(long lastModifiedTimestamp)
Last-modified handling not supported for portlet requests: As a consequence, this method always returns false.

Specified by:
checkNotModified in interface org.springframework.web.context.request.WebRequest

checkNotModified

public boolean checkNotModified(java.lang.String eTag)
Last-modified handling not supported for portlet requests: As a consequence, this method always returns false.

Specified by:
checkNotModified in interface org.springframework.web.context.request.WebRequest

getDescription

public java.lang.String getDescription(boolean includeClientInfo)
Specified by:
getDescription in interface org.springframework.web.context.request.WebRequest

toString

public java.lang.String toString()
Overrides:
toString in class PortletRequestAttributes

spring-webmvc-portlet