Interface VariableProvider
-
- All Known Implementing Classes:
DefaultVariableProvider
public interface VariableProvider
This class represents the interface for variable providers for Expression Engine. Object of this type will be resolving the variable for any expression. It can support more than one variables.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description 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 operationsboolean
supportsVariable(String variableName)
Checks whether the specified variable is supported by this variable provider or not.
-
-
-
Method Detail
-
initialize
void initialize(ExpressionContext expressionContext) throws ExpressionEngineException
It initialize the Function provider with expression context and also gives a chance to pre-initialize any internal states for operations- Parameters:
expressionContext
- Context of current expression evaluation process- Throws:
ExpressionEngineException
-
getVariableType
Type getVariableType(String variableName) throws ExpressionEngineException
Gets the type of variable.- Parameters:
variableName
- name of the variable- Returns:
- type of the variable
- Throws:
ExpressionEngineException
- if anything goes wrong
-
getVariableValue
ValueObject getVariableValue(String variableName) throws ExpressionEngineException
Gets the value of variable.- Parameters:
variableName
- name of the variable.- Returns:
- value of variable wrapped in
ValueObject
- Throws:
ExpressionEngineException
- if anything goes wrong
-
supportsVariable
boolean supportsVariable(String variableName) throws ExpressionEngineException
Checks whether the specified variable is supported by this variable provider or not.- Parameters:
variableName
- name of the variable- Returns:
true
if the variable is supported by this providerfalse
otherwise- Throws:
ExpressionEngineException
- if anything goes wrong
-
-