public class AccessControlListTag
extends javax.servlet.jsp.tagext.TagSupport
Tag that allows its body through if some authorizations are granted to the request's
principal.
One or more comma separate numeric are specified via the hasPermission attribute. The tag delegates
to the configured PermissionEvaluator which it obtains from the ApplicationContext.
For this class to operate it must be able to access the application context via the
WebApplicationContextUtils and attempt to locate the PermissionEvaluator instance.
There cannot be more than one of these present for the tag to function.
| Modifier and Type | Field and Description |
|---|---|
protected static org.apache.commons.logging.Log |
logger |
| Constructor and Description |
|---|
AccessControlListTag() |
| Modifier and Type | Method and Description |
|---|---|
int |
doStartTag() |
protected ApplicationContext |
getContext(javax.servlet.jsp.PageContext pageContext)
Allows test cases to override where application context obtained from.
|
Object |
getDomainObject() |
String |
getHasPermission() |
void |
setDomainObject(Object domainObject) |
void |
setHasPermission(String hasPermission) |
void |
setVar(String var) |
public int doStartTag()
throws javax.servlet.jsp.JspException
doStartTag in interface javax.servlet.jsp.tagext.TagdoStartTag in class javax.servlet.jsp.tagext.TagSupportjavax.servlet.jsp.JspExceptionprotected ApplicationContext getContext(javax.servlet.jsp.PageContext pageContext)
pageContext - so the ServletContext can be accessed as required by Spring's
WebApplicationContextUtilsnull)public Object getDomainObject()
public String getHasPermission()
public void setDomainObject(Object domainObject)
public void setHasPermission(String hasPermission)
public void setVar(String var)