net.sf.jameleon
Class VariableTag

java.lang.Object
  extended by org.apache.commons.jelly.TagSupport
      extended by net.sf.jameleon.VariableTag
All Implemented Interfaces:
Tag
Direct Known Subclasses:
VariableMappingTag, VariableValueTag

public abstract class VariableTag
extends TagSupport

Used for mapping a List to another variable. The implementation of this class will be to decide if the List is a list of values or a List of variabl names. NOTE:
No setters or getters defined for the instances variables defined below. If these variables are to be defined in the tag as attributes, then in the subclass of this class, the setters and getters must be defined for the appropriate attributes.


Field Summary
protected  String fromVariable
          The variable name to map from.
protected static String LIST
           
protected static String STRING
           
protected  TestCaseTag tct
           
protected  String toVariable
          The variable name to map the fromVariable to.
protected  String value
          The value of the fromVariable.
protected  String variableType
          The type of the variable being stored.
 
Fields inherited from class org.apache.commons.jelly.TagSupport
body, context, hasTrimmed, parent, shouldTrim
 
Constructor Summary
VariableTag()
           
 
Method Summary
 void doTag(XMLOutput out)
          An implementation of the doTag method provided by the TagSupport class.
protected  void init()
           
protected  void setVariable(String key, Object value)
           
 void setVariableValue(String toVariable, Object value)
           
protected  void validate()
          Used to validate everything is set up correctly.
 
Methods inherited from class org.apache.commons.jelly.TagSupport
findAncestorWithClass, findAncestorWithClass, findAncestorWithClass, findAncestorWithClass, findAncestorWithClass, findAncestorWithClass, getBody, getBodyText, getBodyText, getContext, getParent, invokeBody, isEscapeText, isTrim, setBody, setContext, setEscapeText, setParent, setTrim, trimBody
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LIST

protected static final String LIST
See Also:
Constant Field Values

STRING

protected static final String STRING
See Also:
Constant Field Values

tct

protected TestCaseTag tct

fromVariable

protected String fromVariable
The variable name to map from. This is the variable name is normally not supported by the function tag.


value

protected String value
The value of the fromVariable.


toVariable

protected String toVariable
The variable name to map the fromVariable to. This is the variable name is supported by the function tag.


variableType

protected String variableType
The type of the variable being stored. Currently, this only supports List and String (the default).

Constructor Detail

VariableTag

public VariableTag()
Method Detail

doTag

public void doTag(XMLOutput out)
           throws MissingAttributeException,
                  JellyTagException
An implementation of the doTag method provided by the TagSupport class. Maps the value in the fromVariable over to the original variable name, toVariable.

Throws:
MissingAttributeException
JellyTagException

setVariableValue

public void setVariableValue(String toVariable,
                             Object value)

validate

protected void validate()
                 throws MissingAttributeException,
                        JellyTagException
Used to validate everything is set up correctly.

Throws:
MissingAttributeException - - When a required attribute isn't set.
JellyTagException - - When this tag is used out of context.

setVariable

protected void setVariable(String key,
                           Object value)

init

protected void init()


Copyright © 2003-2008 Christian Hargraves. All Rights Reserved.