Class AbstractAlertExpressionContext
- java.lang.Object
-
- com.inductiveautomation.ignition.gateway.alert.AbstractAlertExpressionContext
-
- All Implemented Interfaces:
ExpressionParseContext
public abstract class AbstractAlertExpressionContext extends java.lang.Object implements ExpressionParseContext
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected class
AbstractAlertExpressionContext.AlertVariableExpression
-
Constructor Summary
Constructors Modifier Constructor Description protected
AbstractAlertExpressionContext(FunctionFactory funcFactory)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description Expression
createBoundExpression(java.lang.String path)
Much like the standard binder, but first checks to see if the path is an alert variable.protected abstract Parser
createParser()
AlertMessage
getAlert()
FunctionFactory
getFunctionFactory()
Expression
parseExpression(java.lang.String expr)
void
setAlert(AlertMessage alert)
void
setSecondaryParseContext(ExpressionParseContext context)
-
-
-
Constructor Detail
-
AbstractAlertExpressionContext
protected AbstractAlertExpressionContext(FunctionFactory funcFactory)
-
-
Method Detail
-
createParser
protected abstract Parser createParser()
-
getAlert
public AlertMessage getAlert()
-
setAlert
public void setAlert(AlertMessage alert)
-
setSecondaryParseContext
public void setSecondaryParseContext(ExpressionParseContext context)
-
parseExpression
public Expression parseExpression(java.lang.String expr) throws java.lang.Exception
- Throws:
java.lang.Exception
-
createBoundExpression
public Expression createBoundExpression(java.lang.String path) throws java.lang.RuntimeException
Much like the standard binder, but first checks to see if the path is an alert variable. Also, should ensure that that the resulting expression can be evaluated to a boolean.Our variables are in the format of "[name|format]" where the "|format" is optional.
- Specified by:
createBoundExpression
in interfaceExpressionParseContext
- Parameters:
path
- the text content inside the braces.- Throws:
java.lang.RuntimeException
- because the CUP parser doesn't have a throws on the function that calls this inside the parser
-
getFunctionFactory
public FunctionFactory getFunctionFactory()
- Specified by:
getFunctionFactory
in interfaceExpressionParseContext
-
-