org.apache.struts.taglib.logic
Class ConditionalTagBase

java.lang.Object
  extended by javax.servlet.jsp.tagext.TagSupport
      extended by org.apache.struts.taglib.logic.ConditionalTagBase
All Implemented Interfaces:
Serializable, IterationTag, Tag
Direct Known Subclasses:
CompareTagBase, EmptyTag, MatchTag, MessagesPresentTag, PresentTag

public abstract class ConditionalTagBase
extends TagSupport

Abstract base class for the various conditional evaluation tags.

Version:
$Rev: 471754 $ $Date: 2004-10-16 12:38:42 -0400 (Sat, 16 Oct 2004) $
See Also:
Serialized Form

Field Summary
protected  String cookie
          The name of the cookie to be used as a variable.
protected  String header
          The name of the HTTP request header to be used as a variable.
protected static MessageResources messages
          The message resources for this package.
protected  String name
          The name of the JSP bean to be used as a variable (if property is not specified), or whose property is to be accessed (if property is specified).
protected  String parameter
          The name of the HTTP request parameter to be used as a variable.
protected  String property
          The name of the bean property to be used as a variable.
protected  String role
          The name of the security role to be checked for.
protected  String scope
          The scope to search for the bean named by the name property, or "any scope" if null.
protected  String user
          The user principal name to be checked for.
 
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
ConditionalTagBase()
           
 
Method Summary
protected abstract  boolean condition()
          Evaluate the condition that is being tested by this particular tag, and return true if the nested body content of this tag should be evaluated, or false if it should be skipped.
 int doEndTag()
          Evaluate the remainder of the current page normally.
 int doStartTag()
          Perform the test required for this particular tag, and either evaluate or skip the body of this tag.
 String getCookie()
           
 String getHeader()
           
 String getName()
           
 String getParameter()
           
 String getProperty()
           
 String getRole()
           
 String getScope()
           
 String getUser()
           
 void release()
          Release all allocated resources.
 void setCookie(String cookie)
           
 void setHeader(String header)
           
 void setName(String name)
           
 void setParameter(String parameter)
           
 void setProperty(String property)
           
 void setRole(String role)
           
 void setScope(String scope)
           
 void setUser(String user)
           
 
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
 

Field Detail

messages

protected static MessageResources messages
The message resources for this package.


cookie

protected String cookie
The name of the cookie to be used as a variable.


header

protected String header
The name of the HTTP request header to be used as a variable.


name

protected String name
The name of the JSP bean to be used as a variable (if property is not specified), or whose property is to be accessed (if property is specified).


parameter

protected String parameter
The name of the HTTP request parameter to be used as a variable.


property

protected String property
The name of the bean property to be used as a variable.


role

protected String role
The name of the security role to be checked for.


scope

protected String scope
The scope to search for the bean named by the name property, or "any scope" if null.


user

protected String user
The user principal name to be checked for.

Constructor Detail

ConditionalTagBase

public ConditionalTagBase()
Method Detail

getCookie

public String getCookie()

setCookie

public void setCookie(String cookie)

getHeader

public String getHeader()

setHeader

public void setHeader(String header)

getName

public String getName()

setName

public void setName(String name)

getParameter

public String getParameter()

setParameter

public void setParameter(String parameter)

getProperty

public String getProperty()

setProperty

public void setProperty(String property)

getRole

public String getRole()

setRole

public void setRole(String role)

getScope

public String getScope()

setScope

public void setScope(String scope)

getUser

public String getUser()

setUser

public void setUser(String user)

doStartTag

public int doStartTag()
               throws JspException
Perform the test required for this particular tag, and either evaluate or skip the body of this tag.

Specified by:
doStartTag in interface Tag
Overrides:
doStartTag in class TagSupport
Throws:
JspException - if a JSP exception occurs

doEndTag

public int doEndTag()
             throws JspException
Evaluate the remainder of the current page normally.

Specified by:
doEndTag in interface Tag
Overrides:
doEndTag in class TagSupport
Throws:
JspException - if a JSP exception occurs

release

public void release()
Release all allocated resources.

Specified by:
release in interface Tag
Overrides:
release in class TagSupport

condition

protected abstract boolean condition()
                              throws JspException
Evaluate the condition that is being tested by this particular tag, and return true if the nested body content of this tag should be evaluated, or false if it should be skipped. This method must be implemented by concrete subclasses.

Throws:
JspException - if a JSP exception occurs


Copyright © 2000-2008 Apache Software Foundation. All Rights Reserved.