|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.apache.jetspeed.mockobjects.request.MockRequestContext
MockRequestContext
| Field Summary | |
private Locale |
locale
|
private Map |
locators
|
private String |
mediaType
|
private String |
mimeType
|
private ContentPage |
page
|
private String |
path
|
private javax.servlet.http.HttpServletRequest |
request
|
private Map |
requestAttributes
|
private Map |
requestParameters
|
private javax.servlet.http.HttpServletResponse |
response
|
private Object |
session
|
private Map |
sessionAttributes
|
private Subject |
subject
|
| Fields inherited from interface org.apache.jetspeed.request.RequestContext |
REQUEST_PORTALENV |
| Constructor Summary | |
MockRequestContext()
|
|
MockRequestContext(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
|
|
MockRequestContext(String path)
|
|
| Method Summary | |
org.apache.pluto.om.window.PortletWindow |
getActionWindow()
Get the target Action Window |
Object |
getAttribute(String key)
Get a request attribute associated with this single request. |
CapabilityMap |
getCapabilityMap()
Get the Capability Map |
String |
getCharacterEncoding()
get the character encoding |
javax.servlet.ServletConfig |
getConfig()
Gets the HTTP Servlet Config |
ContentDispatcher |
getContentDispatcher()
Gets the content dispatcher for this request |
Locale |
getLocale()
Gets the locale associated with this request. |
String |
getMediaType()
get the Media Type |
String |
getMimeType()
Get the mimeType for the request |
NavigationalState |
getNavigationalState()
|
ContentPage |
getPage()
Gets the target page for this request |
Map |
getParameterMap()
Use this method to get a map of request parameters on the generalized request, decoupling request parameter manipulation from servlet API. |
String |
getPath()
Returns any extra path information associated with the URL the client sent when it made this request. |
PortalURL |
getPortalURL()
Gets the Portal URL for the current request. |
org.apache.pluto.om.common.Language |
getPreferedLanguage(org.apache.pluto.om.portlet.PortletDefinition portlet)
getPreferedLanguage |
Map |
getProfileLocators()
Gets the profile locators for this request |
javax.servlet.http.HttpServletRequest |
getRequest()
Gets the HTTP Servlet Request. |
javax.servlet.http.HttpServletRequest |
getRequestForWindow(org.apache.pluto.om.window.PortletWindow window)
getRequestForWindow |
String |
getRequestParameter(String key)
Use this method to get a request parameter on the generalized request, decoupling request parameter manipulation from servlet API. |
javax.servlet.http.HttpServletResponse |
getResponse()
Gets the HTTP Servlet Response. |
javax.servlet.http.HttpServletResponse |
getResponseForWindow(org.apache.pluto.om.window.PortletWindow window)
getResponseForWindow |
Object |
getSessionAttribute(String key)
Gets an attribute from the session. |
Subject |
getSubject()
Gets the subject associated with the authorized entity. |
Map |
getUserInfoMap(org.apache.pluto.om.common.ObjectID oid)
Returns the user info map of user attributes for a given portlet application. |
Throwable |
popActionFailure(org.apache.pluto.om.window.PortletWindow window)
|
void |
setActionFailure(org.apache.pluto.om.window.PortletWindow window,
Throwable actionFailure)
|
void |
setActionWindow(org.apache.pluto.om.window.PortletWindow window)
Sets the target Portlet Window |
void |
setAttribute(String key,
Object value)
Sets an attribute into the request. |
void |
setCapabilityMap(CapabilityMap map)
Set the capabilityMap. |
void |
setCharacterEncoding(String enc)
set character encoding |
void |
setContentDispatcher(ContentDispatcher dispatcher)
Sets the content dispatcher for this request |
void |
setLocale(Locale locale)
Sets the locale associated with this request. |
void |
setMediaType(String mediaType)
Set the mediaType. |
void |
setMimeType(String mimeType)
Set the Mimetype. |
void |
setPage(ContentPage page)
Sets the target page for this request |
void |
setPath(String path)
setPath |
void |
setPortalURL(PortalURL url)
Sets the Portal URL for the current request. |
void |
setProfileLocators(Map locators)
Sets the target page profile locators for this request |
void |
setSessionAttribute(String key,
Object value)
Sets an attribute into the session. |
void |
setSubject(Subject subject)
Sets the subject associated with the authorized entity. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
private Map requestParameters
private Map requestAttributes
private Map sessionAttributes
private String path
private Map locators
private Subject subject
private Locale locale
private String mediaType
private String mimeType
private ContentPage page
private javax.servlet.http.HttpServletRequest request
private javax.servlet.http.HttpServletResponse response
private Object session
| Constructor Detail |
public MockRequestContext(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
public MockRequestContext()
public MockRequestContext(String path)
| Method Detail |
public Map getUserInfoMap(org.apache.pluto.om.common.ObjectID oid)
RequestContext
getUserInfoMap in interface RequestContextoid - The portlet application object id.
public org.apache.pluto.om.window.PortletWindow getActionWindow()
RequestContext
getActionWindow in interface RequestContextpublic CapabilityMap getCapabilityMap()
RequestContext
getCapabilityMap in interface RequestContextpublic String getCharacterEncoding()
RequestContext
getCharacterEncoding in interface RequestContextpublic javax.servlet.ServletConfig getConfig()
RequestContext
getConfig in interface RequestContextpublic ContentDispatcher getContentDispatcher()
RequestContext
getContentDispatcher in interface RequestContextpublic Locale getLocale()
RequestContext
getLocale in interface RequestContextpublic String getMediaType()
RequestContext
getMediaType in interface RequestContextpublic String getMimeType()
RequestContext
getMimeType in interface RequestContextpublic NavigationalState getNavigationalState()
public ContentPage getPage()
RequestContext
getPage in interface RequestContextpublic PortalURL getPortalURL()
RequestContext
getPortalURL in interface RequestContextnull value.public void setPortalURL(PortalURL url)
RequestContext
setPortalURL in interface RequestContextpublic Map getProfileLocators()
RequestContext
getProfileLocators in interface RequestContextpublic javax.servlet.http.HttpServletRequest getRequest()
RequestContextgetPortletRequestForWindow() before
being processed by the portlet container.
getRequest in interface RequestContextpublic javax.servlet.http.HttpServletRequest getRequestForWindow(org.apache.pluto.om.window.PortletWindow window)
RequestContextgetRequestForWindow
Takes a PortletWindow and generates a HttpServletRequest that accurately represents that PortletWindow's request parameters
getRequestForWindow in interface RequestContextwindow - PortletWindow that we are build a request for
public javax.servlet.http.HttpServletResponse getResponse()
RequestContextgetPortletResponseForWindow() before
being processed by the portlet container.
getResponse in interface RequestContextpublic javax.servlet.http.HttpServletResponse getResponseForWindow(org.apache.pluto.om.window.PortletWindow window)
RequestContextgetResponseForWindow
Takes a PortletWindow and generates a HttpServletResponse that accurately represents that PortletWindow's request parameters.
getResponseForWindow in interface RequestContextwindow - PortletWindow that we are build a response for
public Subject getSubject()
RequestContext
getSubject in interface RequestContextpublic void setActionWindow(org.apache.pluto.om.window.PortletWindow window)
RequestContext
setActionWindow in interface RequestContextwindow - public void setCapabilityMap(CapabilityMap map)
RequestContext
setCapabilityMap in interface RequestContextpublic void setCharacterEncoding(String enc)
RequestContext
setCharacterEncoding in interface RequestContextenc - public void setContentDispatcher(ContentDispatcher dispatcher)
RequestContext
setContentDispatcher in interface RequestContextdispatcher - The ContentDispatcher to use for this requestpublic void setLocale(Locale locale)
RequestContext
setLocale in interface RequestContextpublic void setMediaType(String mediaType)
RequestContext
setMediaType in interface RequestContextmediaType - public void setMimeType(String mimeType)
RequestContext
setMimeType in interface RequestContextmimeType - public void setPage(ContentPage page)
RequestContext
setPage in interface RequestContextpage - The target pagepublic void setProfileLocators(Map locators)
RequestContext
setProfileLocators in interface RequestContextlocators - The target profile locators by locator namepublic void setSubject(Subject subject)
RequestContext
setSubject in interface RequestContextsubject - The JAAS subject on this request.public String getRequestParameter(String key)
RequestContext
getRequestParameter in interface RequestContextkey - The parameter unique key
public Map getParameterMap()
RequestContext
getParameterMap in interface RequestContext
public void setSessionAttribute(String key,
Object value)
RequestContext
setSessionAttribute in interface RequestContextkey - The key of the session attributevalue - The value of the session attributepublic Object getSessionAttribute(String key)
RequestContext
getSessionAttribute in interface RequestContextkey - The key of the attribute
public void setAttribute(String key,
Object value)
RequestContext
setAttribute in interface RequestContextkey - The key of the request attributevalue - The value of the request attributepublic Object getAttribute(String key)
RequestContext
getAttribute in interface RequestContextkey - The key of the request attribute
public String getPath()
RequestContextReturns any extra path information associated with the URL the client sent when it made this request. The extra path information follows the servlet path but precedes the query string. This method returns null if there was no extra path information.
This method should function identically to HttpServletRequest.getPathInfo()
except for that it removes ALL portal/portlet navigational state information from the
path info string.
getPath in interface RequestContextpublic org.apache.pluto.om.common.Language getPreferedLanguage(org.apache.pluto.om.portlet.PortletDefinition portlet)
getPreferedLanguage
getPreferedLanguage in interface RequestContextportlet -
RequestContext.getPreferedLanguage(org.apache.pluto.om.portlet.PortletDefinition)public void setPath(String path)
setPath
setPath in interface RequestContextpath - RequestContext.setPath(java.lang.String)public Throwable popActionFailure(org.apache.pluto.om.window.PortletWindow window)
popActionFailure in interface RequestContext
public void setActionFailure(org.apache.pluto.om.window.PortletWindow window,
Throwable actionFailure)
setActionFailure in interface RequestContext
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||