net.sf.jguard.taglib
Class HasRole

java.lang.Object
  extended byjavax.servlet.jsp.tagext.TagSupport
      extended byjavax.servlet.jsp.jstl.core.ConditionalTagSupport
          extended bynet.sf.jguard.taglib.HasRole
All Implemented Interfaces:
Constants, javax.servlet.jsp.tagext.IterationTag, java.io.Serializable, javax.servlet.jsp.tagext.Tag

public class HasRole
extends javax.servlet.jsp.jstl.core.ConditionalTagSupport
implements Constants

See Also:
Serialized Form

Field Summary
 
Fields inherited from class javax.servlet.jsp.tagext.TagSupport
id, pageContext
 
Fields inherited from interface net.sf.jguard.filters.Constants
ACCESS_DENIED_URI, APPLICATION_NAME, AUTH_UTILS, AUTHENTICATION_FAILED_URI, AUTHORIZATION_MANAGER, CONFIGURATION_FOR_WEBAPP, DEBUG, GUEST, INDEX_URI, JG_APP_ROLE, JG_APP_ROLE_SEQ, JG_DOMAIN, JG_DOMAIN_SEQ, JG_PERMISSION, JG_PERMISSION_SEQ, JG_ROLE_DOMAIN, JG_ROLE_PERMISSION, JG_URL_QUERY, JG_URL_QUERY_SEQ, LOGIN_FIELD, LOGIN_MODULES, LOGOFF_URI, LOGON_PROCESS_URI, LOGON_URI, PASSWORD_FIELD, SUBJECT_ID
 
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
HasRole()
           
 
Method Summary
protected  boolean condition()
          allow or not to display jsp content;depends on user's rolesArray (Principals).
 java.lang.String getOperator()
           
 java.lang.String getRoles()
           
 void setOperator(java.lang.String operator)
           
 void setRoles(java.lang.String strUri)
           
 
Methods inherited from class javax.servlet.jsp.jstl.core.ConditionalTagSupport
doStartTag, release, setScope, setVar
 
Methods inherited from class javax.servlet.jsp.tagext.TagSupport
doAfterBody, doEndTag, 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
 

Constructor Detail

HasRole

public HasRole()
Method Detail

setRoles

public void setRoles(java.lang.String strUri)
Parameters:
strUri -

condition

protected boolean condition()
                     throws javax.servlet.jsp.JspTagException
allow or not to display jsp content;depends on user's rolesArray (Principals).

Returns:
true if tag displays content when user has got the specified role(principal); false otherwise
Throws:
javax.servlet.jsp.JspTagException
See Also:
ConditionalTagSupport.condition()

getRoles

public java.lang.String getRoles()
Returns:
Returns the roles.

getOperator

public java.lang.String getOperator()
Returns:
Returns the operator.

setOperator

public void setOperator(java.lang.String operator)
Parameters:
operator - The operator to set.