|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.commons.jelly.TagSupport net.sf.jameleon.VariableTag net.sf.jameleon.VariableMappingTag
public class VariableMappingTag
Used to map the value in one variable over to the value of another variable. sThis is useful when the same functional point is being used more than once or when the same variable name is used between different functional points that are in the same test-case. The following is an example of creating a list and using it in a tag.
The following is an example of mapping one value of a variable to another variable (pretty much useless). The following is an example of using the ${varName} notation (recommended) The following is an example of mapping multiple variable values to a single variable. Notice it's variableType is set to "list": The value(s) can be entered directly like so:
Field Summary | |
---|---|
protected boolean |
childExecuted
|
Fields inherited from class net.sf.jameleon.VariableTag |
---|
fromVariable, LIST, STRING, tct, toVariable, value, variableType |
Fields inherited from class org.apache.commons.jelly.TagSupport |
---|
body, context, hasTrimmed, parent, shouldTrim |
Constructor Summary | |
---|---|
VariableMappingTag()
|
Method Summary | |
---|---|
void |
doTag(XMLOutput out)
An implementation of the doTag method provided by the TagSupport class. |
String |
getFromVariable()
Gets the variable name in the CSV file being mapped to the officially supported function tag variable name.. |
String |
getToVariable()
|
String |
getVariableType()
Gets the type of the variable being stored. |
protected void |
setChildExecuted(boolean childExecuted)
|
void |
setFromVariable(String fromVariable)
Sets the variable name in the CSV file being mapped to the officially supported function tag variable name method. |
void |
setToVariable(String toVariable)
Sets the variable name to map the fromVariable to. |
void |
setVariableType(String variableType)
Sets the type of the variable being stored. |
protected void |
validate()
Used to validate everything is set up correctly. |
Methods inherited from class net.sf.jameleon.VariableTag |
---|
init, setVariable, setVariableValue |
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 |
---|
protected boolean childExecuted
Constructor Detail |
---|
public VariableMappingTag()
Method Detail |
---|
public void doTag(XMLOutput out) throws MissingAttributeException, JellyTagException
doTag
method provided by the TagSupport
class.
Maps the value in the fromVariable
over to the original variable name, toVariable
.
doTag
in interface Tag
doTag
in class VariableTag
MissingAttributeException
JellyTagException
protected void validate() throws MissingAttributeException, JellyTagException
validate
in class VariableTag
MissingAttributeException
- - When a required attribute isn't set.
JellyTagException
- - When this tag is used out of context.public String getFromVariable()
set
method for in the function point.public void setFromVariable(String fromVariable)
set
method for in the function point.
fromVariable
- - The variable name to map from.public String getToVariable()
fromVariable
or the originally supported variable name that has a set method for it
in the function point.public void setToVariable(String toVariable)
fromVariable
to. This is the originally supported variable name that has a set method for it
in the function point.
toVariable
- - the variable name to be mapped to the fromVariable
.public String getVariableType()
public void setVariableType(String variableType)
variableType
- - The type of the variable being stored. Currently, this only supports List.protected void setChildExecuted(boolean childExecuted)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |