Novell exteNd
Director 5.2 API

com.sssw.re.core
Class EboStringTemplate

java.lang.Object
 |
 +--com.sssw.re.core.EboStringTemplate
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
EboStringTemplateMulti, EboStringTemplateSingle

public abstract class EboStringTemplate
extends Object
implements Serializable

The EboStringTemplate abstract class provides support for efficient tag replacement within strings. This support should be used in classes implementing EbiAction or EbiCondition and that wish to have the tags replaced with information from com.sssw.re.api.EbiContext.

For implementation details, see Defining runtime properties for Conditons and Actions in Director online help.

See Also:
EboStringTemplateSingle, EbiAction, EbiCondition, Serialized Form

Constructor Summary
EboStringTemplate()
           
 
Method Summary
 String getEncodedValue(com.sssw.re.core.EbiContext context)
          Get the template with any tags replaced with information from the context.
 String getTemplate()
          Gets the template without tag replacement.
 String getValue(com.sssw.re.core.EbiContext context)
          Get the template with any tags replaced with information from the context.
 boolean hasTemplate()
          Checks to see if the string template has a value.
 boolean isAnalyzed()
          Has the template been analyzed for tags
 boolean isNULL()
          Checks to see if the string template is null.
 boolean isTagged()
          Does the template contain any tags that might need to be merged with a supplied context
 void setTemplate(String template)
          Set the template to use as a basis for potential context information substitution
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EboStringTemplate

public EboStringTemplate()
Method Detail

isNULL

public boolean isNULL()
Checks to see if the string template is null.
Returns:
boolean Returns true if the template is NULL, otherwise false.

hasTemplate

public boolean hasTemplate()
Checks to see if the string template has a value.
Returns:
boolean Returns true if the template is not empty and not the default, otherwise false.

getTemplate

public String getTemplate()
Gets the template without tag replacement.
Returns:
String The unprocessed template string

setTemplate

public void setTemplate(String template)
Set the template to use as a basis for potential context information substitution
Parameters:
String - A string value to be used for template value

isTagged

public boolean isTagged()
Does the template contain any tags that might need to be merged with a supplied context
Returns:
boolean True if tags exist in the template, otherwise false

getEncodedValue

public String getEncodedValue(com.sssw.re.core.EbiContext context)
Get the template with any tags replaced with information from the context. If the template does not contain any tags then just return it as is.
Parameters:
com.sssw.re.api.EbiContext -  
Returns:
String The resolved template with information from the context merged in.

getValue

public String getValue(com.sssw.re.core.EbiContext context)
Get the template with any tags replaced with information from the context. If the template does not contain any tags then just return it as is. The token can either follow the normal !valueOf pattern, or use the scopedpath token value.
Returns:
String The resolved template with information from the context merged in

isAnalyzed

public boolean isAnalyzed()
Has the template been analyzed for tags
Returns:
boolean Returns true if the analysis has been performed, otherwise false.

Novell exteNd
Director 5.2 API