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.RoleSecurityTagSupport
- All Implemented Interfaces:
- Serializable, javax.servlet.jsp.tagext.BodyTag, javax.servlet.jsp.tagext.IterationTag, javax.servlet.jsp.tagext.JspTag, javax.servlet.jsp.tagext.Tag
- Direct Known Subclasses:
- AddAttributeTag, ContainerTagSupport, PutAttributeTag
public abstract class RoleSecurityTagSupport
- extends javax.servlet.jsp.tagext.BodyTagSupport
Base tag for the tiles tags which provides standard support for security.
- Since:
- Tiles 2.0
- Version:
- $Rev: 527536 $ $Date: 2007-04-11 17:44:51 +0200(mer, 11 apr 2007) $
- See Also:
- Serialized Form
Fields inherited from class javax.servlet.jsp.tagext.BodyTagSupport |
bodyContent |
Fields inherited from class javax.servlet.jsp.tagext.TagSupport |
id, pageContext |
Fields inherited from interface javax.servlet.jsp.tagext.BodyTag |
EVAL_BODY_BUFFERED, EVAL_BODY_TAG |
Fields inherited from interface javax.servlet.jsp.tagext.IterationTag |
EVAL_BODY_AGAIN |
Fields inherited from interface javax.servlet.jsp.tagext.Tag |
EVAL_BODY_INCLUDE, EVAL_PAGE, SKIP_BODY, SKIP_PAGE |
Methods inherited from class javax.servlet.jsp.tagext.BodyTagSupport |
doAfterBody, doInitBody, doStartTag, getBodyContent, getPreviousOut, setBodyContent |
Methods inherited from class javax.servlet.jsp.tagext.TagSupport |
findAncestorWithClass, getId, getParent, getValue, getValues, removeValue, setId, setPageContext, setParent, setValue |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface javax.servlet.jsp.tagext.Tag |
getParent, setPageContext, setParent |
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.
doEndTag
public int doEndTag()
throws javax.servlet.jsp.JspException
-
- Specified by:
doEndTag
in interface javax.servlet.jsp.tagext.Tag
- Overrides:
doEndTag
in class javax.servlet.jsp.tagext.BodyTagSupport
- Throws:
javax.servlet.jsp.JspException
release
public void release()
-
- Specified by:
release
in interface javax.servlet.jsp.tagext.Tag
- Overrides:
release
in class javax.servlet.jsp.tagext.BodyTagSupport
execute
protected abstract void execute()
throws TilesException,
javax.servlet.jsp.JspException,
IOException
- Executes the tag. It is called inside
doEndTag()
.
- Throws:
TilesException
- If something goews wrong during the use of Tiles.
javax.servlet.jsp.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-2011 Apache Software Foundation. All Rights Reserved.