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

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

public class TagIf
extends java.lang.Object
implements TagProcessor

This class implements an if TBG tag.


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
TagIf()
          This constructor creates a TagIf object.
 
Method Summary
 java.lang.String generate(TbgContext aContext)
          Evaluates the if condition.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TagIf

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

generate

public java.lang.String generate(TbgContext aContext)
                          throws WorkbenchException,
                                 TbgException
Evaluates the if condition. Generates the text according to the evalution result (the if clause or else clause).
Specified by:
generate in interface TagProcessor
Parameters:
aContext - TbgContext The actual context of the generation.
Returns:
java.lang.String Returns a null value because this is a control tag.
Throws:
com.ibm.dse.tools.workbench.base.WorkbenchException. - Thrown if there are problems reading the template, writing the log file, evaluating the condition or during the generation of the clause content.
TbgException - When a break exception has been thrown.