org.apache.commons.chain.web.portlet
Class MockPortletRequest

java.lang.Object
  extended by org.apache.commons.chain.web.portlet.MockPortletRequest
All Implemented Interfaces:
javax.portlet.PortletRequest

public class MockPortletRequest
extends Object
implements javax.portlet.PortletRequest


Field Summary
 
Fields inherited from interface javax.portlet.PortletRequest
BASIC_AUTH, CLIENT_CERT_AUTH, DIGEST_AUTH, FORM_AUTH, USER_INFO
 
Constructor Summary
MockPortletRequest()
           
MockPortletRequest(String contextPath, javax.portlet.PortletContext context, javax.portlet.PortletSession session)
           
 
Method Summary
 void addParameter(String name, String value)
           
 void addProperty(String name, String value)
           
 Object getAttribute(String name)
           
 Enumeration getAttributeNames()
           
 String getAuthType()
           
 String getContextPath()
           
 Locale getLocale()
           
 Enumeration getLocales()
           
 String getParameter(String name)
           
 Map getParameterMap()
           
 Enumeration getParameterNames()
           
 String[] getParameterValues(String name)
           
 javax.portlet.PortalContext getPortalContext()
           
 javax.portlet.PortletMode getPortletMode()
           
 javax.portlet.PortletSession getPortletSession()
           
 javax.portlet.PortletSession getPortletSession(boolean create)
           
 javax.portlet.PortletPreferences getPreferences()
           
 Enumeration getProperties(String name)
           
 String getProperty(String name)
           
 Enumeration getPropertyNames()
           
 String getRemoteUser()
           
 String getRequestedSessionId()
           
 String getResponseContentType()
           
 Enumeration getResponseContentTypes()
           
 String getScheme()
           
 String getServerName()
           
 int getServerPort()
           
 Principal getUserPrincipal()
           
 javax.portlet.WindowState getWindowState()
           
 boolean isPortletModeAllowed(javax.portlet.PortletMode mode)
           
 boolean isRequestedSessionIdValid()
           
 boolean isSecure()
           
 boolean isUserInRole(String role)
           
 boolean isWindowStateAllowed(javax.portlet.WindowState state)
           
 void removeAttribute(String name)
           
 void setAttribute(String name, Object value)
           
 void setAuthType(String authType)
           
 void setContextPath(String contextPath)
           
 void setLocale(Locale locale)
           
 void setPortalContext(javax.portlet.PortalContext portalContext)
           
 void setPortletContext(javax.portlet.PortletContext context)
           
 void setPortletMode(javax.portlet.PortletMode portletMode)
           
 void setPortletPreferences(javax.portlet.PortletPreferences portletPreferences)
           
 void setPortletSession(javax.portlet.PortletSession session)
           
 void setScheme(String scheme)
           
 void setServerName(String serverName)
           
 void setServerPort(int serverPort)
           
 void setUserPrincipal(Principal principal)
           
 void setUserPrincipal(javax.portlet.WindowState windowState)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MockPortletRequest

public MockPortletRequest()

MockPortletRequest

public MockPortletRequest(String contextPath,
                          javax.portlet.PortletContext context,
                          javax.portlet.PortletSession session)
Method Detail

addParameter

public void addParameter(String name,
                         String value)

addProperty

public void addProperty(String name,
                        String value)

setAuthType

public void setAuthType(String authType)

setContextPath

public void setContextPath(String contextPath)

setLocale

public void setLocale(Locale locale)

setPortalContext

public void setPortalContext(javax.portlet.PortalContext portalContext)

setPortletContext

public void setPortletContext(javax.portlet.PortletContext context)

setPortletMode

public void setPortletMode(javax.portlet.PortletMode portletMode)

setPortletPreferences

public void setPortletPreferences(javax.portlet.PortletPreferences portletPreferences)

setPortletSession

public void setPortletSession(javax.portlet.PortletSession session)

setScheme

public void setScheme(String scheme)

setServerName

public void setServerName(String serverName)

setServerPort

public void setServerPort(int serverPort)

setUserPrincipal

public void setUserPrincipal(Principal principal)

setUserPrincipal

public void setUserPrincipal(javax.portlet.WindowState windowState)

getAttribute

public Object getAttribute(String name)
Specified by:
getAttribute in interface javax.portlet.PortletRequest

getAttributeNames

public Enumeration getAttributeNames()
Specified by:
getAttributeNames in interface javax.portlet.PortletRequest

getAuthType

public String getAuthType()
Specified by:
getAuthType in interface javax.portlet.PortletRequest

getContextPath

public String getContextPath()
Specified by:
getContextPath in interface javax.portlet.PortletRequest

getLocale

public Locale getLocale()
Specified by:
getLocale in interface javax.portlet.PortletRequest

getLocales

public Enumeration getLocales()
Specified by:
getLocales in interface javax.portlet.PortletRequest

getParameter

public String getParameter(String name)
Specified by:
getParameter in interface javax.portlet.PortletRequest

getParameterMap

public Map getParameterMap()
Specified by:
getParameterMap in interface javax.portlet.PortletRequest

getParameterNames

public Enumeration getParameterNames()
Specified by:
getParameterNames in interface javax.portlet.PortletRequest

getParameterValues

public String[] getParameterValues(String name)
Specified by:
getParameterValues in interface javax.portlet.PortletRequest

getPortalContext

public javax.portlet.PortalContext getPortalContext()
Specified by:
getPortalContext in interface javax.portlet.PortletRequest

getPortletMode

public javax.portlet.PortletMode getPortletMode()
Specified by:
getPortletMode in interface javax.portlet.PortletRequest

getPortletSession

public javax.portlet.PortletSession getPortletSession()
Specified by:
getPortletSession in interface javax.portlet.PortletRequest

getPortletSession

public javax.portlet.PortletSession getPortletSession(boolean create)
Specified by:
getPortletSession in interface javax.portlet.PortletRequest

getPreferences

public javax.portlet.PortletPreferences getPreferences()
Specified by:
getPreferences in interface javax.portlet.PortletRequest

getProperties

public Enumeration getProperties(String name)
Specified by:
getProperties in interface javax.portlet.PortletRequest

getProperty

public String getProperty(String name)
Specified by:
getProperty in interface javax.portlet.PortletRequest

getPropertyNames

public Enumeration getPropertyNames()
Specified by:
getPropertyNames in interface javax.portlet.PortletRequest

getRemoteUser

public String getRemoteUser()
Specified by:
getRemoteUser in interface javax.portlet.PortletRequest

getRequestedSessionId

public String getRequestedSessionId()
Specified by:
getRequestedSessionId in interface javax.portlet.PortletRequest

getResponseContentType

public String getResponseContentType()
Specified by:
getResponseContentType in interface javax.portlet.PortletRequest

getResponseContentTypes

public Enumeration getResponseContentTypes()
Specified by:
getResponseContentTypes in interface javax.portlet.PortletRequest

getScheme

public String getScheme()
Specified by:
getScheme in interface javax.portlet.PortletRequest

getServerName

public String getServerName()
Specified by:
getServerName in interface javax.portlet.PortletRequest

getServerPort

public int getServerPort()
Specified by:
getServerPort in interface javax.portlet.PortletRequest

getUserPrincipal

public Principal getUserPrincipal()
Specified by:
getUserPrincipal in interface javax.portlet.PortletRequest

getWindowState

public javax.portlet.WindowState getWindowState()
Specified by:
getWindowState in interface javax.portlet.PortletRequest

isPortletModeAllowed

public boolean isPortletModeAllowed(javax.portlet.PortletMode mode)
Specified by:
isPortletModeAllowed in interface javax.portlet.PortletRequest

isRequestedSessionIdValid

public boolean isRequestedSessionIdValid()
Specified by:
isRequestedSessionIdValid in interface javax.portlet.PortletRequest

isSecure

public boolean isSecure()
Specified by:
isSecure in interface javax.portlet.PortletRequest

isUserInRole

public boolean isUserInRole(String role)
Specified by:
isUserInRole in interface javax.portlet.PortletRequest

isWindowStateAllowed

public boolean isWindowStateAllowed(javax.portlet.WindowState state)
Specified by:
isWindowStateAllowed in interface javax.portlet.PortletRequest

removeAttribute

public void removeAttribute(String name)
Specified by:
removeAttribute in interface javax.portlet.PortletRequest

setAttribute

public void setAttribute(String name,
                         Object value)
Specified by:
setAttribute in interface javax.portlet.PortletRequest


Copyright © 2003-2010 The Apache Software Foundation. All Rights Reserved.