public class DefaultVariableProvider extends Object implements VariableProvider
| Constructor and Description |
|---|
DefaultVariableProvider() |
| Modifier and Type | Method and Description |
|---|---|
void |
addVariable(String variableName,
ValueObject valueObject)
Add a new variable value to Variable Provider Cache
|
void |
clear()
Clears the variable names.
|
Type |
getVariableType(String variableName)
Gets the type of variable.
|
ValueObject |
getVariableValue(String variableName)
Gets the value of variable.
|
void |
initialize(ExpressionContext expressionContext)
It initialize the Function provider with expression context and also
gives a chance to pre-initialize any internal states for operations
|
void |
removeVariable(String variableName)
Removes the variable from Variable Provider Cache by given name
|
boolean |
supportsVariable(String variableName)
Checks whether the specified variable is supported by this variable
provider or not.
|
public void initialize(ExpressionContext expressionContext) throws ExpressionEngineException
initialize in interface VariableProviderexpressionContext - Context of current expression evaluation processExpressionEngineExceptionpublic void addVariable(String variableName, ValueObject valueObject)
variableName - name of the variable to addvalueObject - value of the variablepublic void removeVariable(String variableName)
variableName - name of the the variable to removepublic void clear()
public Type getVariableType(String variableName) throws ExpressionEngineException
VariableProvidergetVariableType in interface VariableProvidervariableName - name of the variableExpressionEngineException - if anything goes wrongVariableProvider.getVariableType(java.lang.String)public ValueObject getVariableValue(String variableName) throws ExpressionEngineException
VariableProvidergetVariableValue in interface VariableProvidervariableName - name of the variable.ValueObjectExpressionEngineException - if anything goes wrongVariableProvider.getVariableValue(java.lang.String)public boolean supportsVariable(String variableName) throws ExpressionEngineException
VariableProvidersupportsVariable in interface VariableProvidervariableName - name of the variabletrue if the variable is supported by this provider false otherwiseExpressionEngineException - if anything goes wrongVariableProvider.supportsVariable(java.lang.String)