Class AlarmEventPropertyExpression
java.lang.Object
com.inductiveautomation.factorypmi.application.components.alarm.AlarmEventPropertyExpression
- All Implemented Interfaces:
Expression
Represents an expression that retrieves a specific property value from an alarm event provided by
the
AlarmEventParseContext.SelectedAlarmEventModel.-
Constructor Summary
ConstructorsConstructorDescriptionAlarmEventPropertyExpression(Property<?> property, AlarmEventParseContext.SelectedAlarmEventModel model) -
Method Summary
Modifier and TypeMethodDescriptionvoidconnect(CommonContext context, InteractionListener updateListener) Gives the expression a chance to connect itself to things, if necessary.voidTells the expression to disconnect from anything it was connected to.@NonNull QualifiedValueexecute()Evaluates the expression by retrieving the property value from the current alarm event.The children (if any) that this expression is dependent on for its execution.Return a human-readable name for the operation that this expression performs.Class<?>getType()Return the type that this expression will return.voidshutdown()Tells the expression to shutdown any polling operations.voidstartup()Tells the expression to startup any polling operations.
-
Constructor Details
-
AlarmEventPropertyExpression
public AlarmEventPropertyExpression(Property<?> property, AlarmEventParseContext.SelectedAlarmEventModel model)
-
-
Method Details
-
execute
Evaluates the expression by retrieving the property value from the current alarm event.- Specified by:
executein interfaceExpression- Returns:
- The
QualifiedValuecontaining the property value. - Throws:
ExpressionException- if an error occurs during execution.
-
getType
Description copied from interface:ExpressionReturn the type that this expression will return.- Specified by:
getTypein interfaceExpression- Returns:
- the
Classof the value returned byExpression.execute()
-
getOpName
Description copied from interface:ExpressionReturn a human-readable name for the operation that this expression performs.- Specified by:
getOpNamein interfaceExpression- Returns:
- the operation name
-
getChildren
Description copied from interface:ExpressionThe children (if any) that this expression is dependent on for its execution.- Specified by:
getChildrenin interfaceExpression- Returns:
- an array of child
Expressions, or an empty array if no children exist
-
connect
Description copied from interface:ExpressionGives the expression a chance to connect itself to things, if necessary. Most expressions do not have any connections. An expression should notify the updateListener if they change.- Specified by:
connectin interfaceExpression- Parameters:
context- theCommonContextused to look up external resourcesupdateListener- theInteractionListenerto notify when the expression value changes
-
disconnect
public void disconnect()Description copied from interface:ExpressionTells the expression to disconnect from anything it was connected to.- Specified by:
disconnectin interfaceExpression
-
startup
public void startup()Description copied from interface:ExpressionTells the expression to startup any polling operations. Expressions that use this can remember the updateListener from connect() to feed update notification to.- Specified by:
startupin interfaceExpression
-
shutdown
public void shutdown()Description copied from interface:ExpressionTells the expression to shutdown any polling operations.- Specified by:
shutdownin interfaceExpression
-