| Constructor and Description |
|---|
PlanHandler(Plan instance,
ProcessInterpreterContext pic)
Creates new
PlanHandler. |
| Modifier and Type | Method and Description |
|---|---|
void |
checkState(ProcessingType processingType) |
void |
deactivate()
Deactivates (puts into
PlanState.INACTIVE state) the plan if running. |
protected Plan |
getElement()
Returns the go element instance.
|
protected E |
getModel()
Returns the model element.
|
void |
inactivate()
Inactivates the plan state if the plan is 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() |
boolean |
preconditionSatisfied()
Returns true if the plan precondition is satisfied.
|
void |
run()
Starts the plan.
|
void |
setPlanState(PlanState newState)
Sets plan state of the handled plan.
|
String |
toString() |
public PlanHandler(Plan instance, ProcessInterpreterContext pic)
PlanHandler.instance - plan instancepic - NullPointerException - if any argument is nullprotected Plan getElement()
public void setPlanState(PlanState newState)
newState - public void run()
throws ErrorException
ErrorExceptionpublic void deactivate()
throws ErrorException
PlanState.INACTIVE state) the plan if running.ErrorExceptionpublic void inactivate()
public boolean preconditionSatisfied()
throws ErrorException
ErrorExceptionRuntimeException - when an interpretation error occurspublic void checkState(ProcessingType processingType) throws ErrorException
ErrorExceptionpublic boolean isActive()
public boolean isFinished()
protected E getModel()
protected boolean interpret(Expression expression, ExpressionOrigin origin, boolean defaultValue, InterpreterStackTrace stackTrace) throws ErrorException
expression - origin - defaultValue - stackTrace - defaultValue if the expression is
nullErrorExceptionIllegalArgumentException - if the result of interpretation is not booleanprotected Object interpret(Expression expression, ExpressionOrigin origin, InterpreterStackTrace stackTrace) throws ErrorException
expression - origin - stackTrace - ErrorExceptionCopyright © 2007-2020 Whitestein Technologies. All Rights Reserved.