Package com.basiscomponents.db.constants
Class SimpleConstantsResolver
- java.lang.Object
-
- com.basiscomponents.db.constants.SimpleConstantsResolver
-
- All Implemented Interfaces:
ConstantsResolver
public class SimpleConstantsResolver extends Object implements ConstantsResolver
The SimpleConstantResolver provides methods to define Constants([[CONSTANT_NAME]]) with values. The class also has a method to replace those constants from a String with the defined values.
-
-
Constructor Summary
Constructors Constructor Description SimpleConstantsResolver()
Initializes the SimpleConstantResolver.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
put(String con, String val)
Adds the given constant with the given value to the list of constants to replace.void
remove(String con)
Removes the given constant name from the list of constant names.String
resolveConstants(String in)
resolveConstants: search for [[CONSTANT]] and replace it with the value of CONSTANT in the constants table
-
-
-
Method Detail
-
put
public void put(String con, String val)
Adds the given constant with the given value to the list of constants to replace.- Parameters:
con
- The name of the constant.val
- The value of the constant.
-
remove
public void remove(String con)
Removes the given constant name from the list of constant names.- Parameters:
con
- The name of the constant to remove.
-
resolveConstants
public String resolveConstants(String in)
Description copied from interface:ConstantsResolver
resolveConstants: search for [[CONSTANT]] and replace it with the value of CONSTANT in the constants table- Specified by:
resolveConstants
in interfaceConstantsResolver
-
-