Class AccessControlListTag
- java.lang.Object
-
- javax.servlet.jsp.tagext.TagSupport
-
- org.springframework.security.taglibs.authz.AccessControlListTag
-
- All Implemented Interfaces:
java.io.Serializable
,javax.servlet.jsp.tagext.IterationTag
,javax.servlet.jsp.tagext.JspTag
,javax.servlet.jsp.tagext.Tag
public class AccessControlListTag extends javax.servlet.jsp.tagext.TagSupport
An implementation ofTag
that allows its body through if all 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 configuredPermissionEvaluator
which it obtains from theApplicationContext
.For this class to operate it must be able to access the application context via the
WebApplicationContextUtils
and attempt to locate thePermissionEvaluator
instance. There cannot be more than one of these present for the tag to function.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected static org.apache.commons.logging.Log
logger
-
Constructor Summary
Constructors Constructor Description AccessControlListTag()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
doStartTag()
protected org.springframework.context.ApplicationContext
getContext(javax.servlet.jsp.PageContext pageContext)
Allows test cases to override where application context obtained from.java.lang.Object
getDomainObject()
java.lang.String
getHasPermission()
void
setDomainObject(java.lang.Object domainObject)
void
setHasPermission(java.lang.String hasPermission)
void
setVar(java.lang.String var)
-
-
-
Method Detail
-
doStartTag
public int doStartTag() throws javax.servlet.jsp.JspException
- Specified by:
doStartTag
in interfacejavax.servlet.jsp.tagext.Tag
- Overrides:
doStartTag
in classjavax.servlet.jsp.tagext.TagSupport
- Throws:
javax.servlet.jsp.JspException
-
getContext
protected org.springframework.context.ApplicationContext getContext(javax.servlet.jsp.PageContext pageContext)
Allows test cases to override where application context obtained from.- Parameters:
pageContext
- so theServletContext
can be accessed as required by Spring'sWebApplicationContextUtils
- Returns:
- the Spring application context (never
null
)
-
getDomainObject
public java.lang.Object getDomainObject()
-
getHasPermission
public java.lang.String getHasPermission()
-
setDomainObject
public void setDomainObject(java.lang.Object domainObject)
-
setHasPermission
public void setHasPermission(java.lang.String hasPermission)
-
setVar
public void setVar(java.lang.String var)
-
-