com.fdsapi
Class TemplateVariables

java.lang.Object
  |
  +--com.fdsapi.TemplateVariables

public class TemplateVariables
extends java.lang.Object

Object that allows code to find out the values stored in template tag variables after dynamic substitution.

At runtime an example like this would replace all ## references: myVar=##this, ##1, ##2, ##date
Methods that take DataSetParm can replace the template tag variables contents at runtime with data from the TabularData. Methods that don't take DataSetParms do not replace template tag variable values with data at runtime.

View Code


Constructor Summary
TemplateVariables()
           
 
Method Summary
static TemplateVariables createInstance()
           
 java.lang.String getDataSource(DataSetParm dataSetParm)
          Returns value in variables of format "DataSource==##this"
 java.lang.String getIncrementData(DataSetParm dataSetParm)
          Returns value in variables of format "incrementData==##this"
 java.lang.String getQuery(DataSetParm dataSetParm)
          Returns value in variables of format "query==##this"
 java.lang.String getSelected(DataSetParm dataSetParm)
          Returns value in variables of format "selected==##this"
 java.lang.String getSize(DataSetParm dataSetParm)
          Returns value in variables of format "size==##this"
 java.lang.String getTemplate(DataSetParm dataSetParm)
          Returns value in variables of format "template==##this"
 java.lang.String getType()
          Returns value in variables of format "type=="
 java.lang.String getValue()
          Returns value in variables of format "value=="
 java.lang.String getValue(DataSetParm dataSetParm)
          Returns value in variables of format "value==##this"
 java.lang.String getVariableValue(java.lang.String variableName)
          Returns the variable value with no dynamic values.
 java.lang.String getVariableValue(java.lang.String variableName, DataSetParm dataSetParm)
          Returns the variable value dynamic values.
 java.util.Iterator iterator()
          Iterator that goes through all of a template tags variables.
static void main(java.lang.String[] args)
          Test code and sample usage
 void populateVariables(java.lang.String sourceString)
          Iterate throught template tag entry populating TemplateVariables Ex.
 void setVariable(java.lang.String variableName, java.lang.String variableValue)
          END inner classes
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TemplateVariables

public TemplateVariables()
Method Detail

createInstance

public static TemplateVariables createInstance()

getVariableValue

public java.lang.String getVariableValue(java.lang.String variableName)
Returns the variable value with no dynamic values. i.e. if the variable was : dataSource==##this then variables.getVariableValue("dataSource") would return ##this


getVariableValue

public java.lang.String getVariableValue(java.lang.String variableName,
                                         DataSetParm dataSetParm)
Returns the variable value dynamic values. i.e. if the variable was : dataSource==##this and the value in this cell within the tabular data was "production" then variables.getVariableValue("dataSource") would return "production"


setVariable

public void setVariable(java.lang.String variableName,
                        java.lang.String variableValue)
END inner classes


populateVariables

public void populateVariables(java.lang.String sourceString)
Iterate throught template tag entry populating TemplateVariables Ex.
type==Constant incrementData==true
would iterate through both variables and populate type and incrementData as the variable names and Constant and true as their values. Value would have the whole string (i.e. type==Constant incrementData==true)


getType

public java.lang.String getType()
Returns value in variables of format "type=="


getValue

public java.lang.String getValue()
Returns value in variables of format "value=="


getIncrementData

public java.lang.String getIncrementData(DataSetParm dataSetParm)
Returns value in variables of format "incrementData==##this"


getDataSource

public java.lang.String getDataSource(DataSetParm dataSetParm)
Returns value in variables of format "DataSource==##this"


getValue

public java.lang.String getValue(DataSetParm dataSetParm)
Returns value in variables of format "value==##this"


getTemplate

public java.lang.String getTemplate(DataSetParm dataSetParm)
Returns value in variables of format "template==##this"


getSelected

public java.lang.String getSelected(DataSetParm dataSetParm)
Returns value in variables of format "selected==##this"


getSize

public java.lang.String getSize(DataSetParm dataSetParm)
Returns value in variables of format "size==##this"


getQuery

public java.lang.String getQuery(DataSetParm dataSetParm)
Returns value in variables of format "query==##this"


iterator

public java.util.Iterator iterator()
Iterator that goes through all of a template tags variables.


main

public static void main(java.lang.String[] args)
                 throws java.lang.Exception
Test code and sample usage

java.lang.Exception