Class ExpressionServiceImpl
- java.lang.Object
-
- org.bonitasoft.engine.expression.impl.ExpressionServiceImpl
-
- All Implemented Interfaces:
ExpressionService
public class ExpressionServiceImpl extends java.lang.Object implements ExpressionService
- Author:
- Zhao na, Emmanuel Duchastenier, Baptiste Mesta, Celine Souchet
-
-
Constructor Summary
Constructors Constructor Description ExpressionServiceImpl(TechnicalLoggerService logger, boolean checkExpressionReturnType, TimeTracker timeTracker)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.List<java.lang.Object>
evaluate(ExpressionKind expressionKind, java.util.List<SExpression> expressions, java.util.Map<java.lang.String,java.lang.Object> dependencyValues, java.util.Map<java.lang.Integer,java.lang.Object> resolvedExpressions, ContainerState containerState)
Evaluate type specified expressions with dependency valuesjava.lang.Object
evaluate(SExpression expression, java.util.Map<java.lang.Integer,java.lang.Object> resolvedExpressions, ContainerState containerState)
Evaluate the specific expressionjava.lang.Object
evaluate(SExpression expression, java.util.Map<java.lang.String,java.lang.Object> dependencyValues, java.util.Map<java.lang.Integer,java.lang.Object> resolvedExpressions, ContainerState containerState)
Evaluate the specific expression with dependency valuesboolean
mustCheckExpressionReturnType()
Should we throw exception if the real return type is incompatible with the declared one?boolean
mustPutEvaluatedExpressionInContext(ExpressionKind expressionKind)
Should an expression result of a specifiedExpressionKind
must be put in the evaluation context?void
setExpressionExecutorStrategy(java.util.List<ExpressionExecutorStrategy> expressionExecutors)
-
-
-
Constructor Detail
-
ExpressionServiceImpl
public ExpressionServiceImpl(TechnicalLoggerService logger, boolean checkExpressionReturnType, TimeTracker timeTracker)
-
-
Method Detail
-
setExpressionExecutorStrategy
public void setExpressionExecutorStrategy(java.util.List<ExpressionExecutorStrategy> expressionExecutors)
- Specified by:
setExpressionExecutorStrategy
in interfaceExpressionService
-
evaluate
public java.lang.Object evaluate(SExpression expression, java.util.Map<java.lang.Integer,java.lang.Object> resolvedExpressions, ContainerState containerState) throws SExpressionTypeUnknownException, SExpressionEvaluationException, SExpressionDependencyMissingException, SInvalidExpressionException
Description copied from interface:ExpressionService
Evaluate the specific expression- Specified by:
evaluate
in interfaceExpressionService
- Parameters:
expression
- the expression will be evaluated- Returns:
- the evaluated expression result
- Throws:
SExpressionTypeUnknownException
SExpressionEvaluationException
SExpressionDependencyMissingException
SInvalidExpressionException
-
evaluate
public java.lang.Object evaluate(SExpression expression, java.util.Map<java.lang.String,java.lang.Object> dependencyValues, java.util.Map<java.lang.Integer,java.lang.Object> resolvedExpressions, ContainerState containerState) throws SExpressionTypeUnknownException, SExpressionEvaluationException, SExpressionDependencyMissingException, SInvalidExpressionException
Description copied from interface:ExpressionService
Evaluate the specific expression with dependency values- Specified by:
evaluate
in interfaceExpressionService
- Parameters:
expression
- the expression will be evaluateddependencyValues
- the dependency values, it may contain values for expression- Returns:
- the evaluated expression result
- Throws:
SExpressionTypeUnknownException
SExpressionEvaluationException
SExpressionDependencyMissingException
SInvalidExpressionException
-
evaluate
public java.util.List<java.lang.Object> evaluate(ExpressionKind expressionKind, java.util.List<SExpression> expressions, java.util.Map<java.lang.String,java.lang.Object> dependencyValues, java.util.Map<java.lang.Integer,java.lang.Object> resolvedExpressions, ContainerState containerState) throws SExpressionTypeUnknownException, SExpressionEvaluationException, SExpressionDependencyMissingException
Description copied from interface:ExpressionService
Evaluate type specified expressions with dependency values- Specified by:
evaluate
in interfaceExpressionService
- Parameters:
expressionKind
- the expression kind to indicate which type of ExpressionExecutorStrategy will be used to evaluate the expressionsexpressions
- a list of expressions to be evaluateddependencyValues
- the dependency values for the expressions, it may contain value informations for expressions- Returns:
- a list of evaluated expression results
- Throws:
SExpressionTypeUnknownException
SExpressionEvaluationException
SExpressionDependencyMissingException
-
mustCheckExpressionReturnType
public boolean mustCheckExpressionReturnType()
Description copied from interface:ExpressionService
Should we throw exception if the real return type is incompatible with the declared one?- Specified by:
mustCheckExpressionReturnType
in interfaceExpressionService
- Returns:
- true if an exception must be thrown if check fails, false otherwise.
-
mustPutEvaluatedExpressionInContext
public boolean mustPutEvaluatedExpressionInContext(ExpressionKind expressionKind)
Description copied from interface:ExpressionService
Should an expression result of a specifiedExpressionKind
must be put in the evaluation context?- Specified by:
mustPutEvaluatedExpressionInContext
in interfaceExpressionService
- Parameters:
expressionKind
- theExpressionKind
-
-