|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.jetspeed.mockobjects.request.MockRequestContext
public class MockRequestContext
MockRequestContext
Field Summary | |
---|---|
private Locale |
locale
|
private Map |
locators
|
private String |
mediaType
|
private String |
mimeType
|
private Map |
objects
|
private ContentPage |
page
|
private String |
path
|
private Pipeline |
pipeline
|
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()
|
Map |
getObjects()
Return a map of Jetspeed Request Context objects configured via Spring Map |
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. |
Pipeline |
getPipeline()
Get the current executing pipeline |
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. |
Principal |
getUserPrincipal()
Gets the Jetspeed primary user principal associated with the authorized entity. |
ContentPage |
locatePage(Profiler profiler,
String nonProfiledPath)
Locates a specific page using the profiler and site manager location algorithms from a generalized non-profiled path to the first page matching the path |
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 |
setObjects(Map objects)
|
void |
setPage(ContentPage page)
Sets the target page for this request |
void |
setPath(String path)
setPath |
void |
setPipeline(Pipeline pipeline)
Set the current pipeline |
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 |
setRequest(javax.servlet.http.HttpServletRequest request)
Sets the HTTP Servlet Request. |
void |
setResponse(javax.servlet.http.HttpServletResponse response)
Sets the HTTP Servlet Response. |
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
private Pipeline pipeline
private Map objects
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 RequestContext
oid
- The portlet application object id.
public org.apache.pluto.om.window.PortletWindow getActionWindow()
RequestContext
getActionWindow
in interface RequestContext
public CapabilityMap getCapabilityMap()
RequestContext
getCapabilityMap
in interface RequestContext
public String getCharacterEncoding()
RequestContext
getCharacterEncoding
in interface RequestContext
public javax.servlet.ServletConfig getConfig()
RequestContext
getConfig
in interface RequestContext
public ContentDispatcher getContentDispatcher()
RequestContext
getContentDispatcher
in interface RequestContext
public Locale getLocale()
RequestContext
getLocale
in interface RequestContext
public String getMediaType()
RequestContext
getMediaType
in interface RequestContext
public String getMimeType()
RequestContext
getMimeType
in interface RequestContext
public NavigationalState getNavigationalState()
public ContentPage getPage()
RequestContext
getPage
in interface RequestContext
public PortalURL getPortalURL()
RequestContext
getPortalURL
in interface RequestContext
null
value.public void setPortalURL(PortalURL url)
RequestContext
setPortalURL
in interface RequestContext
public Map getProfileLocators()
RequestContext
getProfileLocators
in interface RequestContext
public javax.servlet.http.HttpServletRequest getRequest()
RequestContext
getPortletRequestForWindow()
before
being processed by the portlet container.
getRequest
in interface RequestContext
public javax.servlet.http.HttpServletRequest getRequestForWindow(org.apache.pluto.om.window.PortletWindow window)
RequestContext
getRequestForWindow
Takes a PortletWindow and generates a HttpServletRequest that accurately represents that PortletWindow's request parameters
getRequestForWindow
in interface RequestContext
window
- PortletWindow that we are build a request for
public javax.servlet.http.HttpServletResponse getResponse()
RequestContext
getPortletResponseForWindow()
before
being processed by the portlet container.
getResponse
in interface RequestContext
public javax.servlet.http.HttpServletResponse getResponseForWindow(org.apache.pluto.om.window.PortletWindow window)
RequestContext
getResponseForWindow
Takes a PortletWindow and generates a HttpServletResponse that accurately represents that PortletWindow's request parameters.
getResponseForWindow
in interface RequestContext
window
- PortletWindow that we are build a response for
public Subject getSubject()
RequestContext
getSubject
in interface RequestContext
public Principal getUserPrincipal()
RequestContext
getUserPrincipal
in interface RequestContext
public void setActionWindow(org.apache.pluto.om.window.PortletWindow window)
RequestContext
setActionWindow
in interface RequestContext
public void setCapabilityMap(CapabilityMap map)
RequestContext
setCapabilityMap
in interface RequestContext
public void setCharacterEncoding(String enc)
RequestContext
setCharacterEncoding
in interface RequestContext
public void setContentDispatcher(ContentDispatcher dispatcher)
RequestContext
setContentDispatcher
in interface RequestContext
dispatcher
- The ContentDispatcher to use for this requestpublic void setLocale(Locale locale)
RequestContext
setLocale
in interface RequestContext
public void setMediaType(String mediaType)
RequestContext
setMediaType
in interface RequestContext
public void setMimeType(String mimeType)
RequestContext
setMimeType
in interface RequestContext
public void setPage(ContentPage page)
RequestContext
setPage
in interface RequestContext
page
- The target pagepublic void setProfileLocators(Map locators)
RequestContext
setProfileLocators
in interface RequestContext
locators
- The target profile locators by locator namepublic void setSubject(Subject subject)
RequestContext
setSubject
in interface RequestContext
subject
- The JAAS subject on this request.public String getRequestParameter(String key)
RequestContext
getRequestParameter
in interface RequestContext
key
- The parameter unique key
public Map getParameterMap()
RequestContext
getParameterMap
in interface RequestContext
public void setSessionAttribute(String key, Object value)
RequestContext
setSessionAttribute
in interface RequestContext
key
- The key of the session attributevalue
- The value of the session attributepublic Object getSessionAttribute(String key)
RequestContext
getSessionAttribute
in interface RequestContext
key
- The key of the attribute
public void setAttribute(String key, Object value)
RequestContext
setAttribute
in interface RequestContext
key
- The key of the request attributevalue
- The value of the request attributepublic Object getAttribute(String key)
RequestContext
getAttribute
in interface RequestContext
key
- The key of the request attribute
public String getPath()
RequestContext
Returns 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 RequestContext
public org.apache.pluto.om.common.Language getPreferedLanguage(org.apache.pluto.om.portlet.PortletDefinition portlet)
getPreferedLanguage
getPreferedLanguage
in interface RequestContext
portlet
-
RequestContext.getPreferedLanguage(org.apache.pluto.om.portlet.PortletDefinition)
public void setPath(String path)
setPath
setPath
in interface RequestContext
path
- 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
public Pipeline getPipeline()
getPipeline
in interface RequestContext
public void setPipeline(Pipeline pipeline)
setPipeline
in interface RequestContext
pipeline
- public void setRequest(javax.servlet.http.HttpServletRequest request)
RequestContext
getPortletRequestForWindow()
before
being processed by the portlet container.
setRequest
in interface RequestContext
request
- The request to set.public void setResponse(javax.servlet.http.HttpServletResponse response)
RequestContext
getPortletResponseForWindow()
before
being processed by the portlet container.
setResponse
in interface RequestContext
response
- The request to set.public ContentPage locatePage(Profiler profiler, String nonProfiledPath)
RequestContext
locatePage
in interface RequestContext
profiler
- The profiler component to use in the search
public Map getObjects()
RequestContext
getObjects
in interface RequestContext
public void setObjects(Map objects)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |