org.apache.tiles.jsp.taglib
Class RoleSecurityTagSupport
java.lang.Object
javax.servlet.jsp.tagext.TagSupport
javax.servlet.jsp.tagext.BodyTagSupport
org.apache.tiles.jsp.taglib.TilesBodyTag
org.apache.tiles.jsp.taglib.RoleSecurityTagSupport
- All Implemented Interfaces:
- Serializable, BodyTag, IterationTag, JspTag, Tag, TryCatchFinally
- Direct Known Subclasses:
- AddAttributeTag, ContainerTagSupport, PutAttributeTag
public abstract class RoleSecurityTagSupport
- extends TilesBodyTag
Base tag for the tiles tags which provides standard support for security.
- Since:
- Tiles 2.0
- Version:
- $Rev: 727715 $ $Date: 2008-12-18 14:06:06 +0100 (Thu, 18 Dec 2008) $
- See Also:
- Serialized Form
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
RoleSecurityTagSupport
public RoleSecurityTagSupport()
getRole
public String getRole()
- Returns the role to check. If the user is in the specified role, the tag is
taken into account; otherwise, the tag is ignored (skipped).
- Returns:
- The role to check.
setRole
public void setRole(String role)
- Sets the role to check. If the user is in the specified role, the tag is
taken into account; otherwise, the tag is ignored (skipped).
- Parameters:
role
- The role to check.
reset
protected void reset()
- Release any per-invocation resources, resetting any resources or state
that should be cleared between successive invocations of
Tag.doEndTag()
and
Tag.doStartTag()
.
- Overrides:
reset
in class TilesBodyTag
doEndTag
public int doEndTag()
throws JspException
-
- Specified by:
doEndTag
in interface Tag
- Overrides:
doEndTag
in class BodyTagSupport
- Throws:
JspException
execute
protected abstract void execute()
throws TilesException,
JspException,
IOException
- Executes the tag. It is called inside
doEndTag()
.
- Throws:
TilesException
- If something goews wrong during the use of Tiles.
JspException
- If something goes wrong during rendering.
IOException
- If something goes wrong during writing content.
isAccessAllowed
protected boolean isAccessAllowed()
- Checks if the user is inside the specified role.
- Returns:
true
if the user is allowed to have the tag
rendered.
Copyright © 2001-2008 Apache Software Foundation. All Rights Reserved.