nl.gx.webmanager.taglib.edit
Class CheckPermissionTag

java.lang.Object
  extended by javax.servlet.jsp.tagext.TagSupport
      extended by javax.servlet.jsp.tagext.BodyTagSupport
          extended by nl.gx.webmanager.taglib.edit.CheckPermissionTag
All Implemented Interfaces:
java.io.Serializable, javax.servlet.jsp.tagext.BodyTag, javax.servlet.jsp.tagext.IterationTag, javax.servlet.jsp.tagext.JspTag, javax.servlet.jsp.tagext.Tag

public class CheckPermissionTag
extends javax.servlet.jsp.tagext.BodyTagSupport

Implements the wmedit:checkPermission tag. Checks whether the current user has a certain permission, which is specified by parameter 'value'. There are two ways of using this tag. Firstly, you can use it to conditionallyrender the body of the tag. Secondly, the result of the check can be placed in the pageContext under the key specified by the optional parameter 'var'. When passing an optional WorkflowEnabled object, the checkAccess will grant permissions based on this object. Examples:

        <wm:checkPermission value="page_models_use" >JSP Body</wm:checkPermission>
        <wm:checkPermission var="authorization" value="page_models_use" />
 

Author:
bartk
See Also:
Serialized Form

Field Summary
 
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
 
Constructor Summary
CheckPermissionTag()
           
 
Method Summary
 int doStartTag()
           
 java.lang.String getValue()
           
 java.lang.String getVar()
           
 java.lang.String getWebsite()
           
 WorkflowEnabled getWorkflowenabled()
           
 void setValue(java.lang.String value)
           
 void setVar(java.lang.String var)
           
 void setWebsite(java.lang.String website)
           
 void setWorkflowenabled(WorkflowEnabled workflowenabler)
           
 
Methods inherited from class javax.servlet.jsp.tagext.BodyTagSupport
doAfterBody, doEndTag, doInitBody, getBodyContent, getPreviousOut, release, 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
 

Constructor Detail

CheckPermissionTag

public CheckPermissionTag()
Method Detail

setWorkflowenabled

public void setWorkflowenabled(WorkflowEnabled workflowenabler)

getWorkflowenabled

public WorkflowEnabled getWorkflowenabled()

setValue

public void setValue(java.lang.String value)

getValue

public java.lang.String getValue()

setWebsite

public void setWebsite(java.lang.String website)

getWebsite

public java.lang.String getWebsite()

setVar

public void setVar(java.lang.String var)

getVar

public java.lang.String getVar()

doStartTag

public int doStartTag()
               throws javax.servlet.jsp.JspException
Specified by:
doStartTag in interface javax.servlet.jsp.tagext.Tag
Overrides:
doStartTag in class javax.servlet.jsp.tagext.BodyTagSupport
Throws:
javax.servlet.jsp.JspException


Copyright © 2007-2010 GX creative online development BV. All Rights Reserved.