|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface RequestContext
Represents the context of the original request to the web page. This context object is manufactured at the top of the request chain and is then made available to all templates, regions, components, chrome and anything else downstream. This object provides a single point of reference for information about the user, the current rendering page and other context. It provides this information so that individual rendering pieces do not need to load it themselves.
Field Summary | |
---|---|
static String |
ATTR_REQUEST_CONTEXT
|
static String |
DEBUG_MODE_VALUE_COMPONENTS
|
static String |
VALUE_CREDENTIAL_VAULT
|
static String |
VALUE_HEAD_TAGS
|
static String |
VALUE_IDENTITY_VAULT
|
Method Summary | |
---|---|
CredentialVault |
getCredentialVault()
Returns the credential vault |
Resource |
getCurrentObject()
Returns the current object If no object has been set, then null is returned |
String |
getCurrentObjectId()
Returns the id of the current object If no object has been set, then the id will be null. |
String |
getFormatId()
Returns the current format id |
String |
getId()
Each request context instance is stamped with a unique id |
LinkBuilder |
getLinkBuilder()
Returns the LinkBuilder to be used for the currently executing page. |
Model |
getModel()
Returns the model. |
Page |
getPage()
If a page instance is currently executing, it can be retrieved from the request context. |
String |
getPageId()
Returns the id of the currently executing page. |
String |
getPageTitle()
Returns the title of the current page. |
Serializable |
getParameter(String key)
Retrieves a parameter from the request context |
Map<String,Serializable> |
getParameters()
Returns a map of parameters |
Component[] |
getRenderingComponents()
Returns the components that were bound to this and any of its parent context during the rendering. |
javax.servlet.http.HttpServletRequest |
getRequest()
Returns the HTTP Servlet Request bound to this request |
Content |
getRequestContent()
Returns the body of the incoming POST content This is applicable for multipart form requests |
String |
getRequestContentType()
Returns the content type of the incoming request |
String |
getRequestMethod()
Returns the method of the incoming request |
Page |
getRootPage()
Returns the root page for a site. |
WebFrameworkServiceRegistry |
getServiceRegistry()
Returns the Web Framework services registry |
Configuration |
getSiteConfiguration()
If the site has a configuration XML, then this will return it |
TemplateInstance |
getTemplate()
Returns the current executing template. |
String |
getTemplateId()
Returns the id of the currently executing template. |
Theme |
getTheme()
|
String |
getThemeId()
Returns the current theme id |
String |
getUri()
|
User |
getUser()
Returns the current user |
String |
getUserId()
Returns the current user id |
Serializable |
getValue(String key)
Retrieves a custom value from the request context |
Map<String,Serializable> |
getValuesMap()
Returns the underlying map of the custom key/values pairs stored on this RequestContext instance. |
Map |
getViewModel()
Returns the view model |
String |
getWebsiteTitle()
Returns the title of the web site. |
boolean |
hasParameter(String key)
Returns true if a parameter exists in the request context |
boolean |
hasValue(String key)
Returns true if a custom value exists in the request context |
void |
release()
Release any resources held by the request context As part of the contract for a RequestContext object, this will only ever be called once and no further method calls will be made to the RequestContext object. |
void |
removeValue(String key)
Removes a custom value from the request context |
void |
setCurrentObject(Resource object)
Sets the current object |
void |
setFormatId(String formatId)
Sets the current format id |
void |
setModel(Model model)
Sets the current model |
void |
setPage(Page page)
Sets the currently executing page. |
void |
setRenderingComponent(Component component)
Indicates that the given component is being rendered as part of the rendering execution for this and any parent rendering context. |
void |
setTemplate(TemplateInstance currentTemplate)
Sets the current executing template. |
void |
setThemeId(String themeId)
Sets the current theme id |
void |
setUri(String uri)
Sets the currently executing uri. |
void |
setUser(User user)
Sets the current user for this request |
void |
setValue(String key,
Serializable value)
Sets a custom attribute onto the request context |
void |
setViewModel(Map viewModel)
Sets the view model |
Field Detail |
---|
static final String VALUE_HEAD_TAGS
static final String VALUE_CREDENTIAL_VAULT
static final String VALUE_IDENTITY_VAULT
static final String DEBUG_MODE_VALUE_COMPONENTS
static final String ATTR_REQUEST_CONTEXT
Method Detail |
---|
String getId()
Configuration getSiteConfiguration()
String getWebsiteTitle()
String getPageTitle()
void setValue(String key, Serializable value)
key
- value
- Serializable getValue(String key)
key
-
void removeValue(String key)
key
- boolean hasValue(String key)
key
-
Map<String,Serializable> getValuesMap()
Serializable getParameter(String key)
key
-
boolean hasParameter(String key)
key
-
Map<String,Serializable> getParameters()
void setUri(String uri)
String getUri()
Page getPage()
void setPage(Page page)
page
- String getPageId()
LinkBuilder getLinkBuilder()
Page getRootPage()
TemplateInstance getTemplate()
void setTemplate(TemplateInstance currentTemplate)
String getTemplateId()
String getCurrentObjectId()
Resource getCurrentObject()
void setCurrentObject(Resource object)
object
- String getFormatId()
void setFormatId(String formatId)
formatId
- Model getModel()
void setModel(Model model)
model
- void setUser(User user)
user
- User getUser()
String getUserId()
CredentialVault getCredentialVault()
String getThemeId()
void setThemeId(String themeId)
Theme getTheme()
Component[] getRenderingComponents()
void setRenderingComponent(Component component)
component
- The component that is being renderedString getRequestContentType()
String getRequestMethod()
Content getRequestContent()
javax.servlet.http.HttpServletRequest getRequest()
void release()
Map getViewModel()
void setViewModel(Map viewModel)
viewModel
- mapWebFrameworkServiceRegistry getServiceRegistry()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |