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(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.Objectevaluate(SExpression expression, java.util.Map<java.lang.Integer,java.lang.Object> resolvedExpressions, ContainerState containerState)Evaluate the specific expressionjava.lang.Objectevaluate(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 valuesbooleanmustCheckExpressionReturnType()Should we throw exception if the real return type is incompatible with the declared one?booleanmustPutEvaluatedExpressionInContext(ExpressionKind expressionKind)Should an expression result of a specifiedExpressionKindmust be put in the evaluation context?voidsetExpressionExecutorStrategy(java.util.List<ExpressionExecutorStrategy> expressionExecutors)
-
-
-
Constructor Detail
-
ExpressionServiceImpl
public ExpressionServiceImpl(boolean checkExpressionReturnType, TimeTracker timeTracker)
-
-
Method Detail
-
setExpressionExecutorStrategy
public void setExpressionExecutorStrategy(java.util.List<ExpressionExecutorStrategy> expressionExecutors)
- Specified by:
setExpressionExecutorStrategyin 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:ExpressionServiceEvaluate the specific expression- Specified by:
evaluatein interfaceExpressionService- Parameters:
expression- the expression will be evaluated- Returns:
- the evaluated expression result
- Throws:
SExpressionTypeUnknownExceptionSExpressionEvaluationExceptionSExpressionDependencyMissingExceptionSInvalidExpressionException
-
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:ExpressionServiceEvaluate the specific expression with dependency values- Specified by:
evaluatein interfaceExpressionService- Parameters:
expression- the expression will be evaluateddependencyValues- the dependency values, it may contain values for expression- Returns:
- the evaluated expression result
- Throws:
SExpressionTypeUnknownExceptionSExpressionEvaluationExceptionSExpressionDependencyMissingExceptionSInvalidExpressionException
-
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:ExpressionServiceEvaluate type specified expressions with dependency values- Specified by:
evaluatein 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:
SExpressionTypeUnknownExceptionSExpressionEvaluationExceptionSExpressionDependencyMissingException
-
mustCheckExpressionReturnType
public boolean mustCheckExpressionReturnType()
Description copied from interface:ExpressionServiceShould we throw exception if the real return type is incompatible with the declared one?- Specified by:
mustCheckExpressionReturnTypein interfaceExpressionService- Returns:
- true if an exception must be thrown if check fails, false otherwise.
-
mustPutEvaluatedExpressionInContext
public boolean mustPutEvaluatedExpressionInContext(ExpressionKind expressionKind)
Description copied from interface:ExpressionServiceShould an expression result of a specifiedExpressionKindmust be put in the evaluation context?- Specified by:
mustPutEvaluatedExpressionInContextin interfaceExpressionService- Parameters:
expressionKind- theExpressionKind
-
-