public final class AchieveGoalHandler extends Object
AchieveGoal
handlers.Constructor and Description |
---|
AchieveGoalHandler(Goal instance,
com.whitestein.lsps.engine.GoalAchieveStrategy achieveStrategy,
ProcessInterpreterContext pic)
Creates new
AchieveGoalHandler . |
Modifier and Type | Method and Description |
---|---|
void |
activate()
Activates the goal.
|
void |
checkState(ProcessingType processingType) |
void |
deactivate()
Deactivates the goal and its achieve strategy.
|
protected com.whitestein.lsps.engine.GoalAchieveStrategy |
getAchieveStrategy()
Returns goal achieve strategy of this handler.
|
protected Goal |
getElement()
Returns the go element instance.
|
protected GoalState |
getGoalState()
Returns goal state of the handled goal.
|
protected com.whitestein.lsps.model.AchieveGoal |
getModel()
Returns the model element.
|
void |
inactivate()
Inactivates the goal and its achieve strategy if in finished state.
|
protected boolean |
interpret(Expression expression,
ExpressionOrigin origin,
boolean defaultValue,
InterpreterStackTrace stackTrace)
Interprets given boolean expression.
|
protected Object |
interpret(Expression expression,
ExpressionOrigin origin,
InterpreterStackTrace stackTrace)
Interprets given boolean expression.
|
boolean |
isActive() |
boolean |
isFinished() |
void |
setGoalState(GoalState newState)
Sets goal state of the handled goal.
|
String |
toString() |
public AchieveGoalHandler(Goal instance, com.whitestein.lsps.engine.GoalAchieveStrategy achieveStrategy, ProcessInterpreterContext pic)
AchieveGoalHandler
.instance
- achieve goal instanceachieveStrategy
- achieve goal strategypic
- NullPointerException
- if any argument is nullprotected com.whitestein.lsps.model.AchieveGoal getModel()
public void checkState(ProcessingType processingType) throws ErrorException
ErrorException
protected Goal getElement()
protected final com.whitestein.lsps.engine.GoalAchieveStrategy getAchieveStrategy()
protected final GoalState getGoalState()
public final void setGoalState(GoalState newState)
newState
- public final void activate()
public final void deactivate() throws ErrorException
GoalState.DEACTIVATED
state.ErrorException
public final void inactivate()
public boolean isActive()
public boolean isFinished()
protected boolean interpret(Expression expression, ExpressionOrigin origin, boolean defaultValue, InterpreterStackTrace stackTrace) throws ErrorException
expression
- origin
- defaultValue
- stackTrace
- defaultValue
if the expression
is
nullErrorException
IllegalArgumentException
- if the result of interpretation is not booleanprotected Object interpret(Expression expression, ExpressionOrigin origin, InterpreterStackTrace stackTrace) throws ErrorException
expression
- origin
- stackTrace
- ErrorException
Copyright © 2007-2020 Whitestein Technologies. All Rights Reserved.