net.smartlab.web.auth
Class ValidTag
java.lang.Object
javax.servlet.jsp.tagext.TagSupport
org.apache.struts.taglib.logic.ConditionalTagBase
org.apache.struts.taglib.logic.PresentTag
net.smartlab.web.auth.ValidTag
- All Implemented Interfaces:
- java.io.Serializable, javax.servlet.jsp.tagext.IterationTag, javax.servlet.jsp.tagext.JspTag, javax.servlet.jsp.tagext.Tag
- Direct Known Subclasses:
- NotValidTag
public class ValidTag
- extends org.apache.struts.taglib.logic.PresentTag
This JSP tag is used to check the validity of the current user both in terms
of authentication and authorization. In its basic usage the tag checks if a
user is associated to the current session. If the optional role
attribute is specified it identifies a comma separated list of roles to which
the user may be associated to pass the validity check. In addition a
context could be optionally specified using the name attribute
causing the validity check to be performed on the permessions allowed on the
SecureBusinessObject binded with that name.
- Author:
- rlogiacco, svetrini
- See Also:
- Serialized Form
|
Field Summary |
protected org.apache.commons.logging.Log |
logger
Provides logging for the test cases. |
| Fields inherited from class org.apache.struts.taglib.logic.PresentTag |
ROLE_DELIMITER |
| Fields inherited from class org.apache.struts.taglib.logic.ConditionalTagBase |
cookie, header, messages, name, parameter, property, role, user |
| Fields inherited from class javax.servlet.jsp.tagext.TagSupport |
id, pageContext |
| 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 |
|
Constructor Summary |
ValidTag()
Default empty constructor. |
|
Method Summary |
protected boolean |
condition()
|
boolean |
condition(boolean desired)
|
void |
setFunction(java.lang.String privilege)
Deprecated. use setPrivilege(java.lang.String) instead |
void |
setInherit(boolean inherit)
|
void |
setPrivilege(java.lang.String privilege)
|
void |
setRole(java.lang.String role)
|
void |
setScope(java.lang.String scope)
|
| Methods inherited from class org.apache.struts.taglib.logic.PresentTag |
isBeanPresent, isCookiePresent |
| Methods inherited from class org.apache.struts.taglib.logic.ConditionalTagBase |
doEndTag, doStartTag, getCookie, getHeader, getName, getParameter, getProperty, getRole, getScope, getUser, release, setCookie, setHeader, setName, setParameter, setProperty, setUser |
| Methods inherited from class javax.servlet.jsp.tagext.TagSupport |
doAfterBody, 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 |
logger
protected org.apache.commons.logging.Log logger
- Provides logging for the test cases.
ValidTag
public ValidTag()
- Default empty constructor.
condition
protected boolean condition()
throws javax.servlet.jsp.JspException
- Overrides:
condition in class org.apache.struts.taglib.logic.PresentTag
- Throws:
javax.servlet.jsp.JspException- See Also:
ConditionalTagBase.condition()
condition
public boolean condition(boolean desired)
throws javax.servlet.jsp.JspException
- Overrides:
condition in class org.apache.struts.taglib.logic.PresentTag
- Throws:
javax.servlet.jsp.JspException- See Also:
PresentTag.condition(boolean)
setRole
public void setRole(java.lang.String role)
- Overrides:
setRole in class org.apache.struts.taglib.logic.ConditionalTagBase
setFunction
public void setFunction(java.lang.String privilege)
- Deprecated. use setPrivilege(java.lang.String) instead
- See Also:
setPrivilege(java.lang.String)
setPrivilege
public void setPrivilege(java.lang.String privilege)
setScope
public void setScope(java.lang.String scope)
- Overrides:
setScope in class org.apache.struts.taglib.logic.ConditionalTagBase
setInherit
public void setInherit(boolean inherit)
Copyright © 2004-2009 The SmartWeb Team. All Rights Reserved.