Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.jeteam.tag
Class NeedPrivilegeTag  view NeedPrivilegeTag download NeedPrivilegeTag.java

java.lang.Object
  extended byjavax.servlet.jsp.tagext.TagSupport
      extended byorg.jeteam.tag.NeedPrivilegeTag
All Implemented Interfaces:
javax.servlet.jsp.tagext.IterationTag, javax.servlet.jsp.tagext.JspTag, java.io.Serializable, javax.servlet.jsp.tagext.Tag

public class NeedPrivilegeTag
extends javax.servlet.jsp.tagext.TagSupport

This tag is designed to only render its content if the specific user has the required privilege.

In case the user does not have the permission the content will simply be ignored.


Field Summary
private  java.lang.String BODY_SCOPE
           
private  java.lang.String PAGE_SCOPE
           
private  java.lang.String permission
           
private  java.lang.String scope
           
private  boolean userInRole
           
 
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
NeedPrivilegeTag()
           
 
Method Summary
 int doEndTag()
          Default processing of the end tag returning EVAL_PAGE.
 int doStartTag()
          Default processing of the start tag, returning SKIP_BODY.
 void setPermission(java.lang.String permission)
           
 void setScope(java.lang.String scope)
           
 
Methods inherited from class javax.servlet.jsp.tagext.TagSupport
doAfterBody, 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

PAGE_SCOPE

private final java.lang.String PAGE_SCOPE
See Also:
Constant Field Values

BODY_SCOPE

private final java.lang.String BODY_SCOPE
See Also:
Constant Field Values

permission

private java.lang.String permission

scope

private java.lang.String scope

userInRole

private boolean userInRole
Constructor Detail

NeedPrivilegeTag

public NeedPrivilegeTag()
Method Detail

doStartTag

public int doStartTag()
               throws javax.servlet.jsp.JspException
Description copied from class: javax.servlet.jsp.tagext.TagSupport
Default processing of the start tag, returning SKIP_BODY.


doEndTag

public int doEndTag()
             throws javax.servlet.jsp.JspException
Description copied from class: javax.servlet.jsp.tagext.TagSupport
Default processing of the end tag returning EVAL_PAGE.


setPermission

public void setPermission(java.lang.String permission)

setScope

public void setScope(java.lang.String scope)