org.apache.pluto.core.impl
Class PortletRequestImpl

java.lang.Object
  extended by javax.servlet.http.HttpServletRequestWrapper
      extended by org.apache.pluto.core.impl.PortletRequestImpl
All Implemented Interfaces:
InternalPortletRequest
Direct Known Subclasses:
ActionRequestImpl, RenderRequestImpl

public abstract class PortletRequestImpl
extends javax.servlet.http.HttpServletRequestWrapper
implements InternalPortletRequest


Field Summary
private  boolean bodyAccessed
          true if the HTTP-Body has been accessed
private  boolean included
          true if we are in an include call
private  PortletSession portletSession
          Holds the portlet session
private  PortletWindow portletWindow
           
private  DynamicInformationProvider provider
           
 
Constructor Summary
PortletRequestImpl(PortletWindow portletWindow, javax.servlet.http.HttpServletRequest servletRequest)
           
 
Method Summary
private  javax.servlet.http.HttpServletRequest _getHttpServletRequest()
           
 java.lang.Object getAttribute(java.lang.String name)
           
 java.util.Enumeration getAttributeNames()
           
 java.lang.String getAuthType()
           
 java.lang.String getCharacterEncoding()
           
 int getContentLength()
           
 java.lang.String getContentType()
           
 java.lang.String getContextPath()
           
 Cookie[] getCookies()
           
 long getDateHeader(java.lang.String name)
           
 java.lang.String getHeader(java.lang.String name)
           
 java.util.Enumeration getHeaderNames()
           
 java.util.Enumeration getHeaders(java.lang.String name)
           
 javax.servlet.ServletInputStream getInputStream()
           
 PortletWindow getInternalPortletWindow()
           
 int getIntHeader(java.lang.String name)
           
 java.util.Locale getLocale()
           
 java.util.Enumeration getLocales()
           
 java.lang.String getMethod()
           
 java.lang.String getParameter(java.lang.String name)
           
 java.util.Map getParameterMap()
           
 java.util.Enumeration getParameterNames()
           
 java.lang.String[] getParameterValues(java.lang.String name)
           
 java.lang.String getPathInfo()
           
 java.lang.String getPathTranslated()
           
 PortalContext getPortalContext()
           
 PortletMode getPortletMode()
           
 PortletSession getPortletSession()
           
 PortletSession getPortletSession(boolean create)
           
abstract  PortletPreferences getPreferences()
           
 java.util.Enumeration getProperties(java.lang.String name)
           
 java.lang.String getProperty(java.lang.String name)
           
 java.util.Enumeration getPropertyNames()
           
 java.lang.String getProtocol()
           
 java.lang.String getQueryString()
           
 java.io.BufferedReader getReader()
           
 java.lang.String getRealPath(java.lang.String path)
           
 java.lang.String getRemoteAddr()
           
 java.lang.String getRemoteHost()
           
 java.lang.String getRemoteUser()
           
 javax.servlet.RequestDispatcher getRequestDispatcher(java.lang.String path)
           
 java.lang.String getRequestedSessionId()
           
 java.lang.String getRequestURI()
           
 java.lang.StringBuffer getRequestURL()
           
 java.lang.String getResponseContentType()
           
 java.util.Enumeration getResponseContentTypes()
           
 java.lang.String getScheme()
           
 java.lang.String getServerName()
           
 int getServerPort()
           
 java.lang.String getServletPath()
           
 HttpSession getSession()
           
 HttpSession getSession(boolean create)
           
 java.security.Principal getUserPrincipal()
           
 WindowState getWindowState()
           
 boolean isIncluded()
           
private  boolean isNameReserved(java.lang.String name)
          Is this attribute name a reserved name (by the J2EE spec)?.
 boolean isPortletModeAllowed(PortletMode portletMode)
           
 boolean isRequestedSessionIdFromCookie()
           
 boolean isRequestedSessionIdFromUrl()
          Deprecated. use isRequestedSessionIdFromURL instead
 boolean isRequestedSessionIdFromURL()
           
 boolean isRequestedSessionIdValid()
           
 boolean isSecure()
           
 boolean isUserInRole(java.lang.String roleName)
          Determines whether a user is mapped to the specified role.
 boolean isWindowStateAllowed(WindowState state)
           
 void lateInit(javax.servlet.http.HttpServletRequest webModuleServletRequest)
           
 void removeAttribute(java.lang.String name)
           
 void setAttribute(java.lang.String name, java.lang.Object o)
           
 void setCharacterEncoding(java.lang.String env)
           
 void setIncluded(boolean included)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

portletWindow

private PortletWindow portletWindow

portletSession

private PortletSession portletSession
Holds the portlet session


provider

private DynamicInformationProvider provider

bodyAccessed

private boolean bodyAccessed
true if the HTTP-Body has been accessed


included

private boolean included
true if we are in an include call

Constructor Detail

PortletRequestImpl

public PortletRequestImpl(PortletWindow portletWindow,
                          javax.servlet.http.HttpServletRequest servletRequest)
Method Detail

isWindowStateAllowed

public boolean isWindowStateAllowed(WindowState state)

isPortletModeAllowed

public boolean isPortletModeAllowed(PortletMode portletMode)

getPortletMode

public PortletMode getPortletMode()

getWindowState

public WindowState getWindowState()

getPreferences

public abstract PortletPreferences getPreferences()

getPortletSession

public PortletSession getPortletSession()

getPortletSession

public PortletSession getPortletSession(boolean create)

getProperty

public java.lang.String getProperty(java.lang.String name)

getProperties

public java.util.Enumeration getProperties(java.lang.String name)

getPropertyNames

public java.util.Enumeration getPropertyNames()

getPortalContext

public PortalContext getPortalContext()

getAuthType

public java.lang.String getAuthType()

getContextPath

public java.lang.String getContextPath()

getRemoteUser

public java.lang.String getRemoteUser()

getUserPrincipal

public java.security.Principal getUserPrincipal()

isUserInRole

public boolean isUserInRole(java.lang.String roleName)
Determines whether a user is mapped to the specified role. As specified in PLT-20-3, we must reference the <security-role-ref> mappings within the deployment descriptor. If no mapping is available, then, and only then, do we check use the actual role name specified against the web application deployment descriptor.

Parameters:
roleName - the name of the role
Returns:
true if it is determined the user has the given role.

getAttribute

public java.lang.Object getAttribute(java.lang.String name)

getAttributeNames

public java.util.Enumeration getAttributeNames()

getParameter

public java.lang.String getParameter(java.lang.String name)

getParameterNames

public java.util.Enumeration getParameterNames()

getParameterValues

public java.lang.String[] getParameterValues(java.lang.String name)

getParameterMap

public java.util.Map getParameterMap()

isSecure

public boolean isSecure()

setAttribute

public void setAttribute(java.lang.String name,
                         java.lang.Object o)

removeAttribute

public void removeAttribute(java.lang.String name)

getRequestedSessionId

public java.lang.String getRequestedSessionId()

isRequestedSessionIdValid

public boolean isRequestedSessionIdValid()

getResponseContentType

public java.lang.String getResponseContentType()

getResponseContentTypes

public java.util.Enumeration getResponseContentTypes()

getLocale

public java.util.Locale getLocale()

getLocales

public java.util.Enumeration getLocales()

getScheme

public java.lang.String getScheme()

getServerName

public java.lang.String getServerName()

getServerPort

public int getServerPort()

lateInit

public void lateInit(javax.servlet.http.HttpServletRequest webModuleServletRequest)
Specified by:
lateInit in interface InternalPortletRequest

getInternalPortletWindow

public PortletWindow getInternalPortletWindow()
Specified by:
getInternalPortletWindow in interface InternalPortletRequest

setIncluded

public void setIncluded(boolean included)
Specified by:
setIncluded in interface InternalPortletRequest

isIncluded

public boolean isIncluded()
Specified by:
isIncluded in interface InternalPortletRequest

_getHttpServletRequest

private javax.servlet.http.HttpServletRequest _getHttpServletRequest()

isNameReserved

private boolean isNameReserved(java.lang.String name)
Is this attribute name a reserved name (by the J2EE spec)?. Reserved names begin with "java." or "javax.".


getCharacterEncoding

public java.lang.String getCharacterEncoding()

getContentType

public java.lang.String getContentType()

getContentLength

public int getContentLength()

getReader

public java.io.BufferedReader getReader()
                                 throws java.io.UnsupportedEncodingException,
                                        java.io.IOException
Throws:
java.io.UnsupportedEncodingException
java.io.IOException

getCookies

public Cookie[] getCookies()

getDateHeader

public long getDateHeader(java.lang.String name)

getHeader

public java.lang.String getHeader(java.lang.String name)

getHeaders

public java.util.Enumeration getHeaders(java.lang.String name)

getHeaderNames

public java.util.Enumeration getHeaderNames()

getIntHeader

public int getIntHeader(java.lang.String name)

getPathInfo

public java.lang.String getPathInfo()

getQueryString

public java.lang.String getQueryString()

getPathTranslated

public java.lang.String getPathTranslated()

getRequestURI

public java.lang.String getRequestURI()

getRequestURL

public java.lang.StringBuffer getRequestURL()

getServletPath

public java.lang.String getServletPath()

getSession

public HttpSession getSession(boolean create)

getSession

public HttpSession getSession()

getMethod

public java.lang.String getMethod()

isRequestedSessionIdFromURL

public boolean isRequestedSessionIdFromURL()

isRequestedSessionIdFromUrl

public boolean isRequestedSessionIdFromUrl()
Deprecated. use isRequestedSessionIdFromURL instead


isRequestedSessionIdFromCookie

public boolean isRequestedSessionIdFromCookie()

getProtocol

public java.lang.String getProtocol()

getRemoteAddr

public java.lang.String getRemoteAddr()

getRemoteHost

public java.lang.String getRemoteHost()

getRealPath

public java.lang.String getRealPath(java.lang.String path)

setCharacterEncoding

public void setCharacterEncoding(java.lang.String env)
                          throws java.io.UnsupportedEncodingException
Throws:
java.io.UnsupportedEncodingException

getInputStream

public javax.servlet.ServletInputStream getInputStream()
                                                throws java.io.IOException
Throws:
java.io.IOException

getRequestDispatcher

public javax.servlet.RequestDispatcher getRequestDispatcher(java.lang.String path)