com.ibm.dse.tools.workbench.tbg
Class TbgVariables

java.lang.Object
  |
  +--com.ibm.dse.tools.workbench.tbg.TbgVariables

public class TbgVariables
extends java.lang.Object

This class implements the structure that stores the variables found in a template TBG.


Constructor Summary
TbgVariables()
          This constructor creates a TbgVariables object.
 
Method Summary
 void copyGlobalVariables(java.util.Hashtable aGlobal)
          Copies, creating a new instance, the specified hashtable to the global variables.
 void copyLocalVariables(java.util.Hashtable aLocal)
          Copies, creating a new instance, the specified hashtable to the local variables.
 void copyLoopAllowedValuesVariables(java.util.Hashtable aLoopAllowedValues)
          Copies, creating a new instance, the specified hashtable to the loop allowed_values variables.
 void copyLoopAttrVariables(java.util.Hashtable aLoopAttr)
          Copies, creating a new instance, the specified hashtable to the loop Attribute variables.
 void copyLoopVariables(java.util.Hashtable aLoop)
          Copies, creating a new instance, the specified hashtable to the loop variables.
 boolean exists(java.lang.String var)
          Returns if the variable exists
 java.util.Hashtable getGlobal()
          Returns the value of the globalVariables property.
 java.lang.Object getGlobal(java.lang.String variable)
          Returns the value of the specified global variable.
 java.util.Hashtable getLocal()
          Returns the local variables.
 java.lang.Object getLocal(java.lang.String variable)
          Returns the value of the specified local variable.
 java.util.Hashtable getLoop()
          Returns the loop variables.
 java.lang.Object getLoop(java.lang.String variable)
          Returns the value of the specified loop variable.
 java.util.Hashtable getLoopAllowedValues()
          Returns the loop allowed_values variables.
 java.lang.Object getLoopAllowedValues(java.lang.String variable)
          Returns the value of the specified loop variable.
 java.util.Hashtable getLoopAttr()
          Returns the loop attributes variables.
 java.lang.Object getLoopAttr(java.lang.String variable)
          Returns the value of the specified loop variable.
static java.lang.Object getSynchronized(java.lang.String variable)
          Returns the value of the specified synchronized variable.
 TableRow getVariable(java.lang.String alias)
          Returns the TableRow pointed by the specified variable.
 boolean isGlobal(java.lang.String variable)
          Tests if the specified string is a global variable.
 boolean isLocal(java.lang.String variable)
          Tests if the specified string is a local variable.
 boolean isLoop(java.lang.String variable)
          Tests if the specified string is a loop variable.
 boolean isLoopAllowedValues(java.lang.String variable)
          Tests if the specified string is a loop allowed_values variable.
 boolean isLoopAttr(java.lang.String variable)
          Tests if the specified string is a loop attributes variable.
static boolean isSynchronized(java.lang.String variable)
          Tests if the specified string is a synchronized variable.
 void removeGlobal(java.lang.String variable)
          Removes the variable from the global variables.
 void removeLocal(java.lang.String variable)
          Removes the variable from the local variables.
 void removeLoop(java.lang.String variable)
          Removes the variable from the loop's variables.
 void removeLoopAllowedValues(java.lang.String variable)
          Removes the variable from the loop's variables.
 void removeLoopAttr(java.lang.String variable)
          Removes the variable from the loop's variables.
 void removeSynchronized()
          Removes the synchronized variables hashtable.
 void removeSynchronized(java.lang.String variable)
          Removes the variable from the synchronized variables.
 void setGlobal(java.lang.String variable, java.lang.Object value)
          Maps the specified global variable to the specified value.
 void setGlobalVariables(java.util.Hashtable aGlobal)
          Sets to the Hashtable of global variables the specified instance.
 void setLocal(java.lang.String variable, java.lang.Object value)
          Maps the specified local variable to the specified value.
 void setLocalVariables(java.util.Hashtable aLocal)
          Sets to the Hashtable of local variables the specified instance.
 void setLoop(java.lang.String variable, java.lang.Object value)
          Maps the loop variable to the specified value.
 void setLoopAllowedValues(java.lang.String variable, java.lang.Object value)
          Maps the specified loop variable to the specified value.
 void setLoopAttr(java.lang.String variable, java.lang.Object value)
          Maps the specified loop variable to the specified value.
 void setLoopAttrVariables(java.util.Hashtable aLoopAttr)
          Sets to the Hashtable of loop properties variables the specified instance.
 void setLoopVariables(java.util.Hashtable aLoop)
          Sets to the Hashtable of loop variables the specified instance.
static void setSynchronized(java.lang.String variable, java.lang.Object value)
          Maps the specified synchronized variable to the specified value.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TbgVariables

public TbgVariables()
This constructor creates a TbgVariables object.

Initializes all the variables to store, setting for each type a new instances of an empty Hashtable.

Method Detail

copyGlobalVariables

public void copyGlobalVariables(java.util.Hashtable aGlobal)
Copies, creating a new instance, the specified hashtable to the global variables.
Parameters:
aGlobal - Hashtable the new global variables.

copyLocalVariables

public void copyLocalVariables(java.util.Hashtable aLocal)
Copies, creating a new instance, the specified hashtable to the local variables.
Parameters:
aLocal - Hashtable the new local variables.

copyLoopAllowedValuesVariables

public void copyLoopAllowedValuesVariables(java.util.Hashtable aLoopAllowedValues)
Copies, creating a new instance, the specified hashtable to the loop allowed_values variables.
Parameters:
aLoopAllowedValues - Hashtable the new loop allowed_values variables.

copyLoopAttrVariables

public void copyLoopAttrVariables(java.util.Hashtable aLoopAttr)
Copies, creating a new instance, the specified hashtable to the loop Attribute variables.
Parameters:
aLoopAttr - Hashtable the new loop attribute variables.

copyLoopVariables

public void copyLoopVariables(java.util.Hashtable aLoop)
Copies, creating a new instance, the specified hashtable to the loop variables.
Parameters:
aLoop - Hashtable the new loop variables.

exists

public boolean exists(java.lang.String var)
Returns if the variable exists
Parameters:
var - java.lang.String
Returns:
boolean

getGlobal

public java.util.Hashtable getGlobal()
Returns the value of the globalVariables property.
Returns:
java.util.Hashtable - The current value of count.

getGlobal

public java.lang.Object getGlobal(java.lang.String variable)
Returns the value of the specified global variable.
Parameters:
variable - java.lang.String The variable name.
Returns:
Object The value of the variable.

getLocal

public java.util.Hashtable getLocal()
Returns the local variables.
Returns:
java.util.Hashtable All the local Variables.

getLocal

public java.lang.Object getLocal(java.lang.String variable)
Returns the value of the specified local variable.
Parameters:
variable - java.lang.String The variable name.
Returns:
Object The value of the variable.

getLoop

public java.util.Hashtable getLoop()
Returns the loop variables.
Returns:
java.util.Hashtable All the variables and its values.

getLoop

public java.lang.Object getLoop(java.lang.String variable)
Returns the value of the specified loop variable.
Parameters:
variable - java.lang.String The variable name.
Returns:
Object The value of the variable.

getLoopAllowedValues

public java.util.Hashtable getLoopAllowedValues()
Returns the loop allowed_values variables.
Returns:
java.util.Hashtable All the variables and its values.

getLoopAllowedValues

public java.lang.Object getLoopAllowedValues(java.lang.String variable)
Returns the value of the specified loop variable.
Parameters:
variable - java.lang.String The variable name.
Returns:
Object The value of the variable.

getLoopAttr

public java.util.Hashtable getLoopAttr()
Returns the loop attributes variables.
Returns:
java.util.Hashtable All the variables and its values.

getLoopAttr

public java.lang.Object getLoopAttr(java.lang.String variable)
Returns the value of the specified loop variable.
Parameters:
variable - java.lang.String The variable name.
Returns:
Object The value of the variable.

getSynchronized

public static java.lang.Object getSynchronized(java.lang.String variable)
Returns the value of the specified synchronized variable.
Parameters:
variable - java.lang.String The variable name.
Returns:
Object The value of the variable.

getVariable

public TableRow getVariable(java.lang.String alias)
Returns the TableRow pointed by the specified variable.

If the specified String exists as a variable, returns the TableRow pointed by the variable.

Parameters:
alias - java.lang.String The variable name.
Returns:
com.ibm.dse.tools.workbench.base.TableRow - If the variable exists returns the TableRow contained, otherwise returns null.

isGlobal

public boolean isGlobal(java.lang.String variable)
Tests if the specified string is a global variable.
Parameters:
variable - java.lang.String The variable name.
Returns:
boolean True if the specified string is a local variable. Otherwise returns false.

isLocal

public boolean isLocal(java.lang.String variable)
Tests if the specified string is a local variable.
Parameters:
variable - java.lang.String The variable name.
Returns:
boolean True if the specified string is a local variable, Otherwise returns false.

isLoop

public boolean isLoop(java.lang.String variable)
Tests if the specified string is a loop variable.
Parameters:
variable - java.lang.String The variable name.
Returns:
boolean true if the specified string is a local variable. Otherwise returns null.

isLoopAllowedValues

public boolean isLoopAllowedValues(java.lang.String variable)
Tests if the specified string is a loop allowed_values variable.
Parameters:
variable - java.lang.String The variable name.
Returns:
boolean True if the specified string is a loop allowed_values variable, false otherwise.

isLoopAttr

public boolean isLoopAttr(java.lang.String variable)
Tests if the specified string is a loop attributes variable.
Parameters:
variable - java.lang.String The variable name.
Returns:
boolean True if the specified string is a loop attributes variable, false otherwise.

isSynchronized

public static boolean isSynchronized(java.lang.String variable)
Tests if the specified string is a synchronized variable.
Parameters:
variable - java.lang.String The variable name.
Returns:
boolean True if the specified string is a synchronized variable. Otherwise returns false.

removeGlobal

public void removeGlobal(java.lang.String variable)
Removes the variable from the global variables.
Parameters:
variable - java.lang String The variable name.

removeLocal

public void removeLocal(java.lang.String variable)
Removes the variable from the local variables.
Parameters:
variable - java.lang String The variable name.

removeLoop

public void removeLoop(java.lang.String variable)
Removes the variable from the loop's variables.
Parameters:
variable - java.lang String The variable name.

removeLoopAllowedValues

public void removeLoopAllowedValues(java.lang.String variable)
Removes the variable from the loop's variables.
Parameters:
variable - java.lang String The variable that needs to be removed.

removeLoopAttr

public void removeLoopAttr(java.lang.String variable)
Removes the variable from the loop's variables.
Parameters:
variable - java.lang String The variable that needs to be removed.

removeSynchronized

public void removeSynchronized()
Removes the synchronized variables hashtable.
Parameters:
variable - java.lang String The variable name.

removeSynchronized

public void removeSynchronized(java.lang.String variable)
Removes the variable from the synchronized variables.
Parameters:
variable - java.lang String The variable name.

setGlobal

public void setGlobal(java.lang.String variable,
                      java.lang.Object value)
Maps the specified global variable to the specified value. Neither the key nor the value can be null.
Parameters:
variable - java.lang.String The variable name.
value - Object The value.

setGlobalVariables

public void setGlobalVariables(java.util.Hashtable aGlobal)
Sets to the Hashtable of global variables the specified instance.
Parameters:
aGlobal - Hashtable The Hastable to set.

setLocal

public void setLocal(java.lang.String variable,
                     java.lang.Object value)
Maps the specified local variable to the specified value. Neither the key nor the value can be null.
Parameters:
variable - java.lang.String The variable name.
value - Object The value.

setLocalVariables

public void setLocalVariables(java.util.Hashtable aLocal)
Sets to the Hashtable of local variables the specified instance.
Parameters:
aLocal - Hashtable The Hastable to set.

setLoop

public void setLoop(java.lang.String variable,
                    java.lang.Object value)
Maps the loop variable to the specified value. Neither the key nor the value can be null.
Parameters:
variable - java.lang.String The variable name.
value - Object The value.

setLoopAllowedValues

public void setLoopAllowedValues(java.lang.String variable,
                                 java.lang.Object value)
Maps the specified loop variable to the specified value. Neither the key nor the value can be null.
Parameters:
variable - java.lang.String The variable name.
value - Object The value.

setLoopAttr

public void setLoopAttr(java.lang.String variable,
                        java.lang.Object value)
Maps the specified loop variable to the specified value. Neither the key nor the value can be null.
Parameters:
variable - java.lang.String The variable name.
value - Object The value.

setLoopAttrVariables

public void setLoopAttrVariables(java.util.Hashtable aLoopAttr)
Sets to the Hashtable of loop properties variables the specified instance.
Parameters:
aLoopAttr - Hashtable The Hastable to set.

setLoopVariables

public void setLoopVariables(java.util.Hashtable aLoop)
Sets to the Hashtable of loop variables the specified instance.
Parameters:
aLoop - Hashtable The Hastable to set.

setSynchronized

public static void setSynchronized(java.lang.String variable,
                                   java.lang.Object value)
Maps the specified synchronized variable to the specified value. Neither the key nor the value can be null.
Parameters:
variable - java.lang.String The variable name.
value - Object The value.