org.objectweb.telosys.util
Class VarSetter

java.lang.Object
  extended byorg.objectweb.telosys.common.TelosysObject
      extended byorg.objectweb.telosys.util.VarSetter

public abstract class VarSetter
extends TelosysObject

Generic "variables setter"


Constructor Summary
VarSetter()
           
 
Method Summary
protected abstract  java.lang.String getVarValue(java.lang.String sVarName)
          Returns the value of the given variable name
 java.lang.String replaceVar(java.lang.String s)
          Replace all the variables "@{var}" in the given string by their value
using the "getVarValue" method.
 
Methods inherited from class org.objectweb.telosys.common.TelosysObject
error, error, error, getFlagTrace, info, setFlagTrace, trace, warn
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

VarSetter

public VarSetter()
Method Detail

getVarValue

protected abstract java.lang.String getVarValue(java.lang.String sVarName)
Returns the value of the given variable name

Parameters:
sVarName -
Returns:

replaceVar

public java.lang.String replaceVar(java.lang.String s)
Replace all the variables "@{var}" in the given string by their value
using the "getVarValue" method.

Parameters:
s - : the string containing the variable names : "@{.attrib1} blabla @{.attrib2}" or "@{1} blabla @{2}"
Returns:
: the string after variables replacement ( or null if the given string is null )