com.pow2.acl.taglib
Class ACLTag

java.lang.Object
  extended byjavax.servlet.jsp.tagext.TagSupport
      extended bycom.pow2.acl.taglib.ACLTag
All Implemented Interfaces:
Serializable, Tag
Direct Known Subclasses:
HasUserPermissionTag, IsUserAuthenticatedTag, IsUserInGroupTag, IsUserInRoleTag

public class ACLTag
extends TagSupport

Base tag for ACL tags.

Author:
Luca Fossato
See Also:
Serialized Form

Field Summary
protected static ACLDAO acldao
          ACL Data Access Object
protected static org.apache.log4j.Category cat
          Log4j category;
protected  String group
          group name
protected  String permission
          permission name
protected  String role
          role name
protected  boolean userAuthenticated
          indicate if the user is authenticated
protected  boolean value
           
 
Fields inherited from class javax.servlet.jsp.tagext.TagSupport
id, pageContext
 
Fields inherited from interface javax.servlet.jsp.tagext.Tag
EVAL_BODY_INCLUDE, EVAL_PAGE, SKIP_BODY, SKIP_PAGE
 
Constructor Summary
ACLTag()
          Default constructor
 
Method Summary
protected  boolean booleanValue(boolean result)
          If value is false, return the negated value of result.
 int doEndTag()
          Process the end tag.
protected  com.pow2.user.User getUser()
          Retrieve the user object from the session context.
 boolean isValue()
          Gets the value attribute of the ACLTag object
 void setGroup(String group)
          Sets the group attribute of the ACLTag object
 void setPermission(String permission)
          Sets the permission attribute of the ACLTag object
 void setRole(String role)
          Sets the role attribute of the ACLTag object
 void setValue(boolean value)
          Sets the value attribute of the ACLTag object
 
Methods inherited from class javax.servlet.jsp.tagext.TagSupport
doStartTag, findAncestorWithClass, getId, getParent, getValue, getValues, release, removeValue, setId, setPageContext, setParent, setValue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

acldao

protected static ACLDAO acldao
ACL Data Access Object


cat

protected static org.apache.log4j.Category cat
Log4j category;


group

protected String group
group name


permission

protected String permission
permission name


role

protected String role
role name


userAuthenticated

protected boolean userAuthenticated
indicate if the user is authenticated


value

protected boolean value
Constructor Detail

ACLTag

public ACLTag()
Default constructor

Method Detail

doEndTag

public int doEndTag()
             throws JspTagException
Process the end tag.

Returns:
Description of the Returned Value
Throws:
JspTagException - Description of Exception

getUser

protected com.pow2.user.User getUser()
                              throws JspTagException
Retrieve the user object from the session context.

Returns:
the user object, or null if the user does not exist
Throws:
JspTagException - if the user object cannot be retrieved from the request object

setGroup

public void setGroup(String group)
Sets the group attribute of the ACLTag object

Parameters:
group - The new group value

setPermission

public void setPermission(String permission)
Sets the permission attribute of the ACLTag object

Parameters:
permission - The new permission value

setRole

public void setRole(String role)
Sets the role attribute of the ACLTag object

Parameters:
role - The new role value

setValue

public void setValue(boolean value)
Sets the value attribute of the ACLTag object

Parameters:
value - The new value value

isValue

public boolean isValue()
Gets the value attribute of the ACLTag object

Returns:
The value value

booleanValue

protected boolean booleanValue(boolean result)
If value is false, return the negated value of result.

Returns:
if value is false, return the negated value of result


Copyright © 2002-2003 Power Of Two S.R.L. All Rights Reserved.