org.apache.jetspeed.request
Class JetspeedRequestContext

java.lang.Object
  extended by org.apache.jetspeed.request.JetspeedRequestContext
All Implemented Interfaces:
org.apache.jetspeed.request.RequestContext

public class JetspeedRequestContext
extends Object
implements org.apache.jetspeed.request.RequestContext

Jetspeed Request Context is associated with each portal request. The request holds the contextual information shared amongst components in the portal, accessed through a common valve pipeline.

Version:
$Id: JetspeedRequestContext.java,v 1.19 2004/05/25 01:37:12 taylor Exp $
Author:
David Sean Taylor

Field Summary
private static String ACTION_ERROR_ATTR
           
private  org.apache.pluto.om.window.PortletWindow actionWindow
           
private  org.apache.jetspeed.capabilities.CapabilityMap capabilityMap
           
private  javax.servlet.ServletConfig config
           
private  org.apache.jetspeed.aggregator.ContentDispatcher dispatcher
           
private  String encoding
           
private  Locale locale
           
private  Map locators
           
private  String mediaType
           
private  String mimeType
           
private  Map objects
           
private  org.apache.jetspeed.om.page.ContentPage page
           
private  org.apache.jetspeed.pipeline.Pipeline pipeline
           
private  org.apache.pluto.om.portlet.PortletDefinition portletDefinition
           
private  javax.servlet.http.HttpServletRequest request
           
private  String requestPath
           
private  Map requestsForWindows
           
private  javax.servlet.http.HttpServletResponse response
           
private  Map responsesForWindows
           
private  javax.servlet.http.HttpSession session
           
private  Subject subject
           
private  org.apache.jetspeed.container.url.PortalURL url
           
private  org.apache.jetspeed.userinfo.UserInfoManager userInfoMgr
          The user info manager.
 
Fields inherited from interface org.apache.jetspeed.request.RequestContext
REQUEST_PORTALENV
 
Constructor Summary
JetspeedRequestContext(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, javax.servlet.ServletConfig config, org.apache.jetspeed.userinfo.UserInfoManager userInfoMgr)
          Create a new Request Context
JetspeedRequestContext(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, javax.servlet.ServletConfig config, org.apache.jetspeed.userinfo.UserInfoManager userInfoMgr, Map objects)
           
 
Method Summary
 org.apache.pluto.om.window.PortletWindow getActionWindow()
          Get the target Portlet Action Window
 Object getAttribute(String key)
           
 org.apache.jetspeed.capabilities.CapabilityMap getCapabilityMap()
          get the Capability Map
 String getCharacterEncoding()
          get the character encoding
 javax.servlet.ServletConfig getConfig()
           
 org.apache.jetspeed.aggregator.ContentDispatcher getContentDispatcher()
           
 Locale getLocale()
           
 String getMediaType()
          get the Media Type
 String getMimeType()
          get the mimeType for the request
 Map getObjects()
           
 org.apache.jetspeed.om.page.ContentPage getPage()
           
 Map getParameterMap()
           
 String getPath()
           
 org.apache.jetspeed.pipeline.Pipeline getPipeline()
          Get the current executing pipeline
 org.apache.jetspeed.container.url.PortalURL getPortalURL()
           
 org.apache.pluto.om.portlet.PortletDefinition getPortletDefinition()
           
 org.apache.pluto.om.common.Language getPreferedLanguage(org.apache.pluto.om.portlet.PortletDefinition portlet)
           getPreferedLanguage
 Map getProfileLocators()
           
 javax.servlet.http.HttpServletRequest getRequest()
           
 Object getRequestAttribute(String key)
           
 javax.servlet.http.HttpServletRequest getRequestForWindow(org.apache.pluto.om.window.PortletWindow window)
           getRequestForWindow
 String getRequestParameter(String key)
           
 javax.servlet.http.HttpServletResponse getResponse()
           
 javax.servlet.http.HttpServletResponse getResponseForWindow(org.apache.pluto.om.window.PortletWindow window)
           getResponseForWindow
 Object getSessionAttribute(String key)
           
 Subject getSubject()
           
 Map getUserInfoMap(org.apache.pluto.om.common.ObjectID oid)
           
 Principal getUserPrincipal()
           
 org.apache.jetspeed.om.page.ContentPage locatePage(org.apache.jetspeed.profiler.Profiler profiler, String nonProfiledPath)
           
 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 portletWindow)
          Sets the target Portlet Action Window
 void setAttribute(String key, Object value)
           
 void setCapabilityMap(org.apache.jetspeed.capabilities.CapabilityMap map)
          Set the capabilityMap.
 void setCharacterEncoding(String enc)
          set character encoding
 void setContentDispatcher(org.apache.jetspeed.aggregator.ContentDispatcher dispatcher)
           
 void setLocale(Locale locale)
           
 void setMediaType(String mediaType)
          Set the mediaType.
 void setMimeType(String mimeType)
          Set the Mimetype.
 void setPage(org.apache.jetspeed.om.page.ContentPage page)
           
 void setPath(String path)
           setPath
 void setPipeline(org.apache.jetspeed.pipeline.Pipeline pipeline)
          Set the current pipeline
 void setPortalURL(org.apache.jetspeed.container.url.PortalURL url)
           
 void setPortletDefinition(org.apache.pluto.om.portlet.PortletDefinition portletDefinition)
           
 void setProfileLocators(Map locators)
           
 void setRequest(javax.servlet.http.HttpServletRequest request)
           
 void setRequestParameter(String key, String value)
           
 void setResponse(javax.servlet.http.HttpServletResponse response)
           
 void setSessionAttribute(String key, Object value)
           
 void setSubject(Subject subject)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ACTION_ERROR_ATTR

private static final String ACTION_ERROR_ATTR
See Also:
Constant Field Values

request

private javax.servlet.http.HttpServletRequest request

response

private javax.servlet.http.HttpServletResponse response

config

private javax.servlet.ServletConfig config

session

private javax.servlet.http.HttpSession session

locators

private Map locators

page

private org.apache.jetspeed.om.page.ContentPage page

portletDefinition

private org.apache.pluto.om.portlet.PortletDefinition portletDefinition

subject

private Subject subject

locale

private Locale locale

dispatcher

private org.apache.jetspeed.aggregator.ContentDispatcher dispatcher

pipeline

private org.apache.jetspeed.pipeline.Pipeline pipeline

capabilityMap

private org.apache.jetspeed.capabilities.CapabilityMap capabilityMap

mimeType

private String mimeType

mediaType

private String mediaType

url

private org.apache.jetspeed.container.url.PortalURL url

actionWindow

private org.apache.pluto.om.window.PortletWindow actionWindow

encoding

private String encoding

requestPath

private String requestPath

userInfoMgr

private org.apache.jetspeed.userinfo.UserInfoManager userInfoMgr
The user info manager.


requestsForWindows

private Map requestsForWindows

responsesForWindows

private Map responsesForWindows

objects

private final Map objects
Constructor Detail

JetspeedRequestContext

public JetspeedRequestContext(javax.servlet.http.HttpServletRequest request,
                              javax.servlet.http.HttpServletResponse response,
                              javax.servlet.ServletConfig config,
                              org.apache.jetspeed.userinfo.UserInfoManager userInfoMgr)
Create a new Request Context

Parameters:
pc -
request -
response -
config -

JetspeedRequestContext

public JetspeedRequestContext(javax.servlet.http.HttpServletRequest request,
                              javax.servlet.http.HttpServletResponse response,
                              javax.servlet.ServletConfig config,
                              org.apache.jetspeed.userinfo.UserInfoManager userInfoMgr,
                              Map objects)
Method Detail

getRequest

public javax.servlet.http.HttpServletRequest getRequest()
Specified by:
getRequest in interface org.apache.jetspeed.request.RequestContext

getResponse

public javax.servlet.http.HttpServletResponse getResponse()
Specified by:
getResponse in interface org.apache.jetspeed.request.RequestContext

getConfig

public javax.servlet.ServletConfig getConfig()
Specified by:
getConfig in interface org.apache.jetspeed.request.RequestContext

getProfileLocators

public Map getProfileLocators()
Specified by:
getProfileLocators in interface org.apache.jetspeed.request.RequestContext

setProfileLocators

public void setProfileLocators(Map locators)
Specified by:
setProfileLocators in interface org.apache.jetspeed.request.RequestContext

getPage

public org.apache.jetspeed.om.page.ContentPage getPage()
Specified by:
getPage in interface org.apache.jetspeed.request.RequestContext

setPage

public void setPage(org.apache.jetspeed.om.page.ContentPage page)
Specified by:
setPage in interface org.apache.jetspeed.request.RequestContext

getPortletDefinition

public org.apache.pluto.om.portlet.PortletDefinition getPortletDefinition()

setPortletDefinition

public void setPortletDefinition(org.apache.pluto.om.portlet.PortletDefinition portletDefinition)

getContentDispatcher

public org.apache.jetspeed.aggregator.ContentDispatcher getContentDispatcher()
Specified by:
getContentDispatcher in interface org.apache.jetspeed.request.RequestContext

setContentDispatcher

public void setContentDispatcher(org.apache.jetspeed.aggregator.ContentDispatcher dispatcher)
Specified by:
setContentDispatcher in interface org.apache.jetspeed.request.RequestContext

getCapabilityMap

public org.apache.jetspeed.capabilities.CapabilityMap getCapabilityMap()
get the Capability Map

Specified by:
getCapabilityMap in interface org.apache.jetspeed.request.RequestContext

setMimeType

public void setMimeType(String mimeType)
Set the Mimetype. Used by the CapabilityValve

Specified by:
setMimeType in interface org.apache.jetspeed.request.RequestContext
Parameters:
mimeType -

getMimeType

public String getMimeType()
get the mimeType for the request

Specified by:
getMimeType in interface org.apache.jetspeed.request.RequestContext

setMediaType

public void setMediaType(String mediaType)
Set the mediaType. Used by the CapabilityValve

Specified by:
setMediaType in interface org.apache.jetspeed.request.RequestContext
Parameters:
mediaType -

getMediaType

public String getMediaType()
get the Media Type

Specified by:
getMediaType in interface org.apache.jetspeed.request.RequestContext

getActionWindow

public org.apache.pluto.om.window.PortletWindow getActionWindow()
Get the target Portlet Action Window

Specified by:
getActionWindow in interface org.apache.jetspeed.request.RequestContext
Returns:
PortletWindow The target portlet window

setActionWindow

public void setActionWindow(org.apache.pluto.om.window.PortletWindow portletWindow)
Sets the target Portlet Action Window

Specified by:
setActionWindow in interface org.apache.jetspeed.request.RequestContext
Parameters:
window -

setCapabilityMap

public void setCapabilityMap(org.apache.jetspeed.capabilities.CapabilityMap map)
Set the capabilityMap. Used by the CapabilityValve

Specified by:
setCapabilityMap in interface org.apache.jetspeed.request.RequestContext
Parameters:
capabilityMap -

getCharacterEncoding

public String getCharacterEncoding()
get the character encoding

Specified by:
getCharacterEncoding in interface org.apache.jetspeed.request.RequestContext

setCharacterEncoding

public void setCharacterEncoding(String enc)
set character encoding

Specified by:
setCharacterEncoding in interface org.apache.jetspeed.request.RequestContext
Parameters:
enc -

getRequestForWindow

public javax.servlet.http.HttpServletRequest getRequestForWindow(org.apache.pluto.om.window.PortletWindow window)

getRequestForWindow

Specified by:
getRequestForWindow in interface org.apache.jetspeed.request.RequestContext
Parameters:
window -
Returns:
See Also:
RequestContext.getRequestForWindow(org.apache.pluto.om.window.PortletWindow)

getResponseForWindow

public javax.servlet.http.HttpServletResponse getResponseForWindow(org.apache.pluto.om.window.PortletWindow window)

getResponseForWindow

Specified by:
getResponseForWindow in interface org.apache.jetspeed.request.RequestContext
Parameters:
window -
Returns:
See Also:
RequestContext.getResponseForWindow(org.apache.pluto.om.window.PortletWindow)

getSubject

public Subject getSubject()
Specified by:
getSubject in interface org.apache.jetspeed.request.RequestContext
See Also:
RequestContext.getSubject()

getUserPrincipal

public Principal getUserPrincipal()
Specified by:
getUserPrincipal in interface org.apache.jetspeed.request.RequestContext

setSubject

public void setSubject(Subject subject)
Specified by:
setSubject in interface org.apache.jetspeed.request.RequestContext
See Also:
RequestContext.setSubject(javax.security.auth.Subject)

getLocale

public Locale getLocale()
Specified by:
getLocale in interface org.apache.jetspeed.request.RequestContext
See Also:
RequestContext.getLocale()

setLocale

public void setLocale(Locale locale)
Specified by:
setLocale in interface org.apache.jetspeed.request.RequestContext
See Also:
RequestContext.setLocale(java.util.Locale)

getRequestParameter

public String getRequestParameter(String key)
Specified by:
getRequestParameter in interface org.apache.jetspeed.request.RequestContext
See Also:
RequestContext.getRequestParameter(java.lang.String)

setRequestParameter

public void setRequestParameter(String key,
                                String value)

getParameterMap

public Map getParameterMap()
Specified by:
getParameterMap in interface org.apache.jetspeed.request.RequestContext
See Also:
RequestContext.getParameterMap()

getRequestAttribute

public Object getRequestAttribute(String key)
See Also:
org.apache.jetspeed.request.RequestContext#getRequestAttribute(java.lang.String)

getSessionAttribute

public Object getSessionAttribute(String key)
Specified by:
getSessionAttribute in interface org.apache.jetspeed.request.RequestContext
See Also:
RequestContext.getSessionAttribute(java.lang.String)

setSessionAttribute

public void setSessionAttribute(String key,
                                Object value)
Specified by:
setSessionAttribute in interface org.apache.jetspeed.request.RequestContext
See Also:
RequestContext.setSessionAttribute(java.lang.String, java.lang.Object)

setAttribute

public void setAttribute(String key,
                         Object value)
Specified by:
setAttribute in interface org.apache.jetspeed.request.RequestContext
See Also:
RequestContext.setAttribute(java.lang.String, java.lang.Object)

getAttribute

public Object getAttribute(String key)
Specified by:
getAttribute in interface org.apache.jetspeed.request.RequestContext
See Also:
RequestContext.getAttribute(java.lang.String)

getPath

public String getPath()
Specified by:
getPath in interface org.apache.jetspeed.request.RequestContext
See Also:
RequestContext.getPath()

setPortalURL

public void setPortalURL(org.apache.jetspeed.container.url.PortalURL url)
Specified by:
setPortalURL in interface org.apache.jetspeed.request.RequestContext

getPortalURL

public org.apache.jetspeed.container.url.PortalURL getPortalURL()
Specified by:
getPortalURL in interface org.apache.jetspeed.request.RequestContext

getUserInfoMap

public Map getUserInfoMap(org.apache.pluto.om.common.ObjectID oid)
Specified by:
getUserInfoMap in interface org.apache.jetspeed.request.RequestContext
See Also:
RequestContext.getUserInfoMap(org.apache.pluto.om.common.ObjectID)

getPreferedLanguage

public org.apache.pluto.om.common.Language getPreferedLanguage(org.apache.pluto.om.portlet.PortletDefinition portlet)

getPreferedLanguage

Specified by:
getPreferedLanguage in interface org.apache.jetspeed.request.RequestContext
Parameters:
portlet -
Returns:
See Also:
RequestContext.getPreferedLanguage(org.apache.pluto.om.portlet.PortletDefinition)

setPath

public void setPath(String path)

setPath

Specified by:
setPath in interface org.apache.jetspeed.request.RequestContext
Parameters:
path -
See Also:
RequestContext.setPath(java.lang.String)

popActionFailure

public Throwable popActionFailure(org.apache.pluto.om.window.PortletWindow window)
Specified by:
popActionFailure in interface org.apache.jetspeed.request.RequestContext

setActionFailure

public void setActionFailure(org.apache.pluto.om.window.PortletWindow window,
                             Throwable actionFailure)
Specified by:
setActionFailure in interface org.apache.jetspeed.request.RequestContext

getPipeline

public org.apache.jetspeed.pipeline.Pipeline getPipeline()
Get the current executing pipeline

Specified by:
getPipeline in interface org.apache.jetspeed.request.RequestContext
Returns:
Pipeline

setPipeline

public void setPipeline(org.apache.jetspeed.pipeline.Pipeline pipeline)
Set the current pipeline

Specified by:
setPipeline in interface org.apache.jetspeed.request.RequestContext
Parameters:
pipeline -

setRequest

public void setRequest(javax.servlet.http.HttpServletRequest request)
Specified by:
setRequest in interface org.apache.jetspeed.request.RequestContext
Parameters:
request - The request to set.

setResponse

public void setResponse(javax.servlet.http.HttpServletResponse response)
Specified by:
setResponse in interface org.apache.jetspeed.request.RequestContext
Parameters:
response - The request to set.

locatePage

public org.apache.jetspeed.om.page.ContentPage locatePage(org.apache.jetspeed.profiler.Profiler profiler,
                                                          String nonProfiledPath)
Specified by:
locatePage in interface org.apache.jetspeed.request.RequestContext

getObjects

public Map getObjects()
Specified by:
getObjects in interface org.apache.jetspeed.request.RequestContext


Copyright © 1999-2007 Apache Software Foundation. All Rights Reserved.