org.apache.struts.taglib.logic

Class ConditionalTagBase

public abstract class ConditionalTagBase extends TagSupport

Abstract base class for the various conditional evaluation tags.

Version: $Rev: 54929 $ $Date: 2004-10-16 17:38:42 +0100 (Sat, 16 Oct 2004) $

Field Summary
protected Stringcookie
The name of the cookie to be used as a variable.
protected Stringheader
The name of the HTTP request header to be used as a variable.
protected static MessageResourcesmessages
The message resources for this package.
protected Stringname
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 Stringparameter
The name of the HTTP request parameter to be used as a variable.
protected Stringproperty
The name of the bean property to be used as a variable.
protected Stringrole
The name of the security role to be checked for.
protected Stringscope
The scope to search for the bean named by the name property, or "any scope" if null.
protected Stringuser
The user principal name to be checked for.
Method Summary
protected abstract booleancondition()
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.
intdoEndTag()
Evaluate the remainder of the current page normally.
intdoStartTag()
Perform the test required for this particular tag, and either evaluate or skip the body of this tag.
StringgetCookie()
StringgetHeader()
StringgetName()
StringgetParameter()
StringgetProperty()
StringgetRole()
StringgetScope()
StringgetUser()
voidrelease()
Release all allocated resources.
voidsetCookie(String cookie)
voidsetHeader(String header)
voidsetName(String name)
voidsetParameter(String parameter)
voidsetProperty(String property)
voidsetRole(String role)
voidsetScope(String scope)
voidsetUser(String user)

Field Detail

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.

messages

protected static MessageResources messages
The message resources for this package.

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.

Method Detail

condition

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. This method must be implemented by concrete subclasses.

Throws: JspException if a JSP exception occurs

doEndTag

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

Throws: JspException if a JSP exception occurs

doStartTag

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

Throws: JspException if a JSP exception occurs

getCookie

public String getCookie()

getHeader

public String getHeader()

getName

public String getName()

getParameter

public String getParameter()

getProperty

public String getProperty()

getRole

public String getRole()

getScope

public String getScope()

getUser

public String getUser()

release

public void release()
Release all allocated resources.

setCookie

public void setCookie(String cookie)

setHeader

public void setHeader(String header)

setName

public void setName(String name)

setParameter

public void setParameter(String parameter)

setProperty

public void setProperty(String property)

setRole

public void setRole(String role)

setScope

public void setScope(String scope)

setUser

public void setUser(String user)
Copyright B) 2000-2008 - The Apache Software Foundation