|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.tonbeller.wcf.controller.RequestContext
com.tonbeller.wcf.controller.RequestContextImpl
| Field Summary | |
protected static org.apache.log4j.Logger |
logger
|
protected RequestContextFactory |
rcf
|
protected javax.servlet.http.HttpServletRequest |
request
|
protected javax.servlet.http.HttpServletResponse |
response
|
| Constructor Summary | |
RequestContextImpl(RequestContextFactory rcf,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
|
|
| Method Summary | |
java.lang.Object |
findBean(java.lang.String name)
same as JSP PageContext.findAttribute() except it does not search in page scope. |
Converter |
getConverter()
|
java.util.Map |
getFileParameters()
|
Formatter |
getFormatter()
|
java.util.Locale |
getLocale()
the locale preferred by the user |
protected java.lang.String |
getMappedRole(java.lang.String role)
maps a role to another role. |
java.lang.Object |
getModelReference(java.lang.String expr)
evaluates a JSP EL expression. |
java.lang.String |
getParameter(java.lang.String name)
|
java.util.Map |
getParameters()
returns the request parameters |
java.lang.String[] |
getParameters(java.lang.String name)
|
java.lang.String |
getRemoteDomain()
|
java.lang.String |
getRemoteUser()
returns the remote User Name without its domain name. |
javax.servlet.http.HttpServletRequest |
getRequest()
|
Resources |
getResources()
|
Resources |
getResources(java.lang.Class clasz)
|
Resources |
getResources(java.lang.String bundleName)
|
javax.servlet.http.HttpServletResponse |
getResponse()
|
javax.servlet.ServletContext |
getServletContext()
|
javax.servlet.http.HttpSession |
getSession()
|
protected boolean |
internalIsUserInRole(java.lang.String role)
allows derived classes to use another authentification framework. |
void |
invalidate()
invalidate context after request processing is complete. |
boolean |
isAdmin()
allows derived classes to specify a root user who may do everything. |
boolean |
isUserInRole(java.lang.String roleExpr)
evaluates a role expression. |
void |
setBean(java.lang.String name,
java.lang.Object bean)
places bean into session context |
void |
setLocale(java.util.Locale locale)
change the Locale for this session including the Locale for JSTL <fmt:message > tag |
void |
setModelReference(java.lang.String expr,
java.lang.Object value)
|
| Methods inherited from class com.tonbeller.wcf.controller.RequestContext |
instance, instance, isResponseComplete, setInstance, setResponseComplete |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected RequestContextFactory rcf
protected javax.servlet.http.HttpServletRequest request
protected javax.servlet.http.HttpServletResponse response
protected static org.apache.log4j.Logger logger
| Constructor Detail |
public RequestContextImpl(RequestContextFactory rcf,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
| Method Detail |
public void invalidate()
RequestContext
invalidate in class RequestContextRequestContextFactoryFinder.createContext(HttpServletRequest, HttpServletResponse, boolean)public javax.servlet.http.HttpServletRequest getRequest()
getRequest in class RequestContextpublic javax.servlet.http.HttpServletResponse getResponse()
getResponse in class RequestContextpublic javax.servlet.ServletContext getServletContext()
getServletContext in class RequestContextpublic javax.servlet.http.HttpSession getSession()
getSession in class RequestContextpublic java.util.Locale getLocale()
RequestContext
getLocale in class RequestContextpublic Formatter getFormatter()
getFormatter in class RequestContextpublic Converter getConverter()
getConverter in class RequestContextpublic java.util.Map getParameters()
RequestContext
getParameters in class RequestContextpublic java.lang.String[] getParameters(java.lang.String name)
getParameters in class RequestContextpublic java.lang.String getParameter(java.lang.String name)
getParameter in class RequestContextpublic java.lang.Object getModelReference(java.lang.String expr)
RequestContext
getModelReference in class RequestContext
public void setModelReference(java.lang.String expr,
java.lang.Object value)
setModelReference in class RequestContextpublic java.lang.Object findBean(java.lang.String name)
findBean in interface ExprContext
public void setBean(java.lang.String name,
java.lang.Object bean)
ExprContext
setBean in interface ExprContextname - name of the session attributebean - the bean. If null, the attribute will be removed.public boolean isUserInRole(java.lang.String roleExpr)
RequestContextroleExpr is a JSP EL expression
(e.g. ${bean.stringProperty}), then the result
of the EL is used as the role name.
If roleExpr starts with "!" the result
is inverted, e.g. all users except members of the
role will be allowed to access the component.
Roles may be mapped in resources.properties (or in
System.properties or user.properties - see
Resources
for details). The format is role.[role1]=[role2]
(not including the brackets).
If such an entry is present, role2 will be checked instead
of role1.
If roleExpr == null, returns true (i.e. everybody is member
of the null role).
isUserInRole in class RequestContextprotected boolean internalIsUserInRole(java.lang.String role)
role - the role to testprotected java.lang.String getMappedRole(java.lang.String role)
role - name of the virtual fine grained role, e.g. "mayPressButton23role"
public Resources getResources()
getResources in class RequestContextpublic Resources getResources(java.lang.String bundleName)
getResources in class RequestContextpublic Resources getResources(java.lang.Class clasz)
getResources in class RequestContextpublic java.lang.String getRemoteUser()
RequestContext
getRemoteUser in class RequestContextpublic java.lang.String getRemoteDomain()
getRemoteDomain in class RequestContextpublic boolean isAdmin()
RequestContext
isAdmin in class RequestContextpublic void setLocale(java.util.Locale locale)
RequestContext
setLocale in class RequestContextpublic java.util.Map getFileParameters()
getFileParameters in class RequestContext
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||