de.infoasset.platform.template
Class ConditionalSubstitution

java.lang.Object
  extended by de.infoasset.platform.template.ConditionalSubstitution
All Implemented Interfaces:
Substitution, Testable
Direct Known Subclasses:
ConsistencyConditionalSubstitution

public abstract class ConditionalSubstitution
extends java.lang.Object
implements Substitution, Testable

A ConditionalTemplate is a set of substitutions that can decide whether to print or to suppress its contents.

Conditional templates can be added to Templates among other conditions literally and logically contained in the conditions markup. A conditional template does not define a new scope, but uses the exsting one.

See Also:
TemplateDoc

Constructor Summary
ConditionalSubstitution()
           
 
Method Summary
abstract  boolean test()
          Deceides wheter this substitution is caried out or suppressed.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConditionalSubstitution

public ConditionalSubstitution()
Method Detail

test

public abstract boolean test()
Deceides wheter this substitution is caried out or suppressed. Test is called for every occurence of the conditional tag, in list templates as often as the line is produced, if the tag is contained in a line. This is very useful for supressing different parts in different lines. Subclasses must implement this operation.

Specified by:
test in interface Testable