|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface RequestContext
Portal Request Context is associated with each request
Field Summary | |
---|---|
static java.lang.String |
REQUEST_PORTALENV
|
Method Summary | |
---|---|
void |
clearThreadContext()
Clears the request context from the current thread |
boolean |
ensureThreadContext()
The RequestContext itself is kept in a ThreadLocal, calling this method from another (parallel) thread ensures its ThreadLocal instance will be synchronized with this instance as well. |
PortletWindow |
getActionWindow()
Get the target Action Window |
java.lang.Object |
getAttribute(java.lang.String key)
Get a request attribute associated with this single request. |
CapabilityMap |
getCapabilityMap()
Get the Capability Map |
java.lang.String |
getCharacterEncoding()
get the character encoding |
javax.servlet.ServletConfig |
getConfig()
Gets the HTTP Servlet Config |
PortletWindow |
getCurrentPortletWindow()
|
PortletWindow |
getInstantlyCreatedPortletWindow(java.lang.String windowId,
java.lang.String portletUniqueName)
|
java.util.Locale |
getLocale()
Gets the locale associated with this request. |
java.lang.String |
getMediaType()
get the Media Type |
java.util.List<KeyValue<java.lang.String,HeadElement>> |
getMergedHeadElements()
Merges and returns the head elements contributed by portlets. |
java.lang.String |
getMimeType()
Get the mimeType for the request |
java.util.Map<java.lang.String,java.lang.Object> |
getObjects()
Return a map of Jetspeed Request Context objects configured via Spring Map |
ContentPage |
getPage()
Gets the target page for this request |
java.util.Map |
getParameterMap()
Use this method to get a map of request parameters on the generalized request, decoupling request parameter manipulation from servlet API. |
java.lang.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. |
PortletWindow |
getPortletWindow(ContentFragment fragment)
|
PortletWindow |
getPortletWindow(java.lang.String windowId)
|
Language |
getPreferedLanguage(PortletDefinition portlet)
getPreferedLanguage |
java.util.Map |
getProfileLocators()
Gets the profile locators for this request |
javax.servlet.http.HttpServletRequest |
getRequest()
Gets the HTTP Servlet Request. |
java.lang.String |
getRequestParameter(java.lang.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. |
java.lang.Object |
getSessionAttribute(java.lang.String key)
Gets an attribute from the session. |
javax.security.auth.Subject |
getSubject()
Gets the subject associated with the authorized entity. |
java.util.Map<java.lang.String,java.lang.String> |
getUserInfoMap(java.lang.String appName)
Returns the user info map of user attributes for a given portlet application. |
java.security.Principal |
getUserPrincipal()
Gets the Jetspeed primary user principal associated with the authorized entity. |
ContentPage |
locatePage(Profiler profiler,
PageLayoutComponent pageLayoutComponent,
java.lang.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 |
java.lang.Throwable |
popActionFailure(PortletWindow window)
|
PortletWindow |
resolvePortletWindow(java.lang.String windowId)
|
void |
setActionFailure(PortletWindow window,
java.lang.Throwable actionFailure)
|
void |
setActionWindow(PortletWindow window)
Sets the target Portlet Window |
void |
setAttribute(java.lang.String key,
java.lang.Object value)
Sets an attribute into the request. |
void |
setCapabilityMap(CapabilityMap map)
Set the capabilityMap. |
void |
setCharacterEncoding(java.lang.String enc)
set character encoding |
void |
setCurrentPortletWindow(PortletWindow window)
|
void |
setLocale(java.util.Locale locale)
Sets the locale associated with this request. |
void |
setMediaType(java.lang.String mediaType)
Set the mediaType. |
void |
setMimeType(java.lang.String mimeType)
Set the Mimetype. |
void |
setPage(ContentPage page)
Sets the target page for this request |
void |
setPath(java.lang.String path)
setPath |
void |
setPipeline(Pipeline pipeline)
Set the current pipeline |
void |
setPortalURL(PortalURL portalUrl)
Sets the Portal URL for the current request. |
void |
setProfileLocators(java.util.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(java.lang.String key,
java.lang.Object value)
Sets an attribute into the session. |
void |
setSubject(javax.security.auth.Subject subject)
Sets the subject associated with the authorized entity. |
Field Detail |
---|
static final java.lang.String REQUEST_PORTALENV
Method Detail |
---|
javax.servlet.http.HttpServletRequest getRequest()
getPortletRequestForWindow()
before
being processed by the portlet container.
void setRequest(javax.servlet.http.HttpServletRequest request)
getPortletRequestForWindow()
before
being processed by the portlet container.
javax.servlet.http.HttpServletResponse getResponse()
getPortletResponseForWindow()
before
being processed by the portlet container.
void setResponse(javax.servlet.http.HttpServletResponse response)
getPortletResponseForWindow()
before
being processed by the portlet container.
javax.servlet.ServletConfig getConfig()
java.util.Map getProfileLocators()
void setProfileLocators(java.util.Map locators)
locators
- The target profile locators by locator nameContentPage getPage()
void setPage(ContentPage page)
page
- The target pagevoid setCapabilityMap(CapabilityMap map)
capabilityMap
- CapabilityMap getCapabilityMap()
void setMimeType(java.lang.String mimeType)
mimeType
- java.lang.String getMimeType()
void setMediaType(java.lang.String mediaType)
mediaType
- java.lang.String getMediaType()
PortalURL getPortalURL()
null
value.
java.lang.IllegalStateException
- if portalUrl
if has not been set.void setPortalURL(PortalURL portalUrl)
java.lang.IllegalStateException
- if portalUrl
has been set already.
java.lang.IllegalArgumentException
- if a null value is passed in.PortletWindow getActionWindow()
void setActionWindow(PortletWindow window)
window
- java.lang.String getCharacterEncoding()
void setCharacterEncoding(java.lang.String enc)
enc
- PortletWindow getPortletWindow(java.lang.String windowId)
PortletWindow getPortletWindow(ContentFragment fragment)
PortletWindow getInstantlyCreatedPortletWindow(java.lang.String windowId, java.lang.String portletUniqueName)
PortletWindow resolvePortletWindow(java.lang.String windowId)
PortletWindow getCurrentPortletWindow()
void setCurrentPortletWindow(PortletWindow window)
javax.security.auth.Subject getSubject()
void setSubject(javax.security.auth.Subject subject)
subject
- The JAAS subject on this request.java.util.Locale getLocale()
void setLocale(java.util.Locale locale)
The
- locale associated with this request.java.lang.String getRequestParameter(java.lang.String key)
key
- The parameter unique key
java.util.Map getParameterMap()
java.lang.Object getSessionAttribute(java.lang.String key)
key
- The key of the attribute
void setSessionAttribute(java.lang.String key, java.lang.Object value)
key
- The key of the session attributevalue
- The value of the session attributejava.lang.Object getAttribute(java.lang.String key)
key
- The key of the request attribute
void setAttribute(java.lang.String key, java.lang.Object value)
key
- The key of the request attributevalue
- The value of the request attributejava.lang.String getPath()
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.
void setPath(java.lang.String path)
setPath
Allows the manual overriding of path Jetspeed 2 will look to resolves pages and folders.
path
- java.util.Map<java.lang.String,java.lang.String> getUserInfoMap(java.lang.String appName)
appName
- The portlet application name.
Language getPreferedLanguage(PortletDefinition portlet)
getPreferedLanguage
Returns the Language object for theportlet
which most
closely matches the prefences of the currently requesting client.
portlet
-
Language
that matches, as closely as possible, that of
the requesting client.java.lang.Throwable popActionFailure(PortletWindow window)
void setActionFailure(PortletWindow window, java.lang.Throwable actionFailure)
actionFailed
- The actionFailed to set.Pipeline getPipeline()
void setPipeline(Pipeline pipeline)
pipeline
- java.security.Principal getUserPrincipal()
ContentPage locatePage(Profiler profiler, PageLayoutComponent pageLayoutComponent, java.lang.String nonProfiledPath)
profiler
- The profiler component to use in the searchpageLayoutComponent
- The page layout component used to assemble the returned page
java.util.Map<java.lang.String,java.lang.Object> getObjects()
boolean ensureThreadContext()
This method will return true if this thread its ThreadLocal didn't yet have this RequestContext value set. In that case the calling code block, preferably in a finally statement should call clearThreadContext() to ensure the reference to this instance is removed again from its ThreadLocal instance as Thread Pool solutions might reuse threads.
void clearThreadContext()
java.util.List<KeyValue<java.lang.String,HeadElement>> getMergedHeadElements()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |