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

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

public class TagSubst
extends java.lang.Object
implements TagProcessor

This class implements a subst TBG tag.

Replaces a tag with dynamic contents retrieved from the database


Fields inherited from interface com.ibm.dse.tools.workbench.tbg.TbgNames
ATTRIB_LAST, ATTRIB_SEP, ATTRIBUTE, END_SIMPLE_TAG, END_TAG, INI_FINAL_TAG, INI_TAG, LITERAL, LITERAL_LAST1, LITERAL_LAST2, LITERAL_LAST3, LITERAL_SEP1, LITERAL_SEP2, LITERAL_SEP3
 
Constructor Summary
TagSubst()
          This constructor creates a TagSubst object.
 
Method Summary
 java.lang.String generate(TbgContext aContext)
          Implements the treatment of a TBG substituion tag.
 java.lang.String substTag(TbgContext aContext)
          Returns the substitution of an specified expression.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TagSubst

public TagSubst()
This constructor creates a TagSubst object.
Method Detail

generate

public java.lang.String generate(TbgContext aContext)
                          throws WorkbenchException
Implements the treatment of a TBG substituion tag.
Specified by:
generate in interface TagProcessor
Parameters:
aContext - TbgContext The context of the generation.
Returns:
java.lang.String - The value of the replaced tag, or null if not found.
Throws:
WorkbenchException - Thrown if there have been problems writing to the log file, reading the template or during the substitution.

substTag

public java.lang.String substTag(TbgContext aContext)
                          throws WorkbenchException
Returns the substitution of an specified expression.

This method is called when a TBG expression must be replaced, for example, to resolve the following expressions var.DESCRIPTOR, var.ITER, var.COUNT...). The expression to substitute mus be placed in the parameter "expression" inside the aContext class.

Parameters:
aContext - TbgContext The actual context.
Returns:
java.lang.String The result of the substitution.