Class DefaultAlertMessage
- java.lang.Object
- 
- com.inductiveautomation.ignition.gateway.alert.DefaultAlertMessage
 
- 
- All Implemented Interfaces:
- AlertMessage,- java.io.Serializable
 
 public class DefaultAlertMessage extends java.lang.Object implements AlertMessage A simple immutable implementation of AlertMessage- See Also:
- Serialized Form
 
- 
- 
Field Summary- 
Fields inherited from interface com.inductiveautomation.ignition.common.alert.AlertMessageACKNOWLEDGED, ACTIVE, CLEARED, DEREGISTER, INFO_UPDATE, REGISTER, SUPPRESS_CLEAR_MSG
 
- 
 - 
Constructor SummaryConstructors Constructor Description DefaultAlertMessage()DefaultAlertMessage(AlertMessage copy)DefaultAlertMessage(java.lang.String system, java.lang.String path, java.lang.String stateName, AlertSeverity stateSeverity, java.lang.Double value, java.util.Date timestamp, boolean register, boolean active, boolean cleared, boolean acknowledged, java.lang.String user, java.lang.String message, java.lang.String displayPath, java.lang.String notes, AlertNotificationMode notificationMode)DefaultAlertMessage(java.util.Date timeStamp)
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetAlertFlags()Returns the alert flags to determine what type of alert it is.
 REGISTER - 0x00000001 ACTIVE - 0x00000010 CLEARED - 0x00000100 ACKNOWLEDGED - 0x00001000 DEREGISTER - 0x00010000 SUPPRESS_CLEAR_MSG - 0x00010000java.lang.StringgetDisplayPath()Returns a user-configurable "friendly" path for the alert.java.lang.StringgetMessage()Returns the alert's custom message, if any.java.lang.StringgetMessageSubject()Returns the alerts custom subject, if any.java.lang.StringgetNotes()Get alert notes (extra information about the alert).AlertNotificationModegetNotificationMode()Returns the notification mode for the tag- when it wants notifications to occur.java.lang.StringgetPath()Returns the path of the source, such as the path to a SQLTag, which should be reasonably unique.java.lang.StringgetStateName()Returns the name of the alert state that was triggeredAlertSeveritygetStateSeverity()Returns the severity of the alert statejava.lang.StringgetSystem()Returns the name of the SCADARail system responsible for the alertjava.util.DategetTimestamp()Returns the originating timestamp for the message.java.lang.StringgetUser()Returns a username associated with the message.java.lang.DoublegetValue()Returns the value that caused this alert.booleanisAcknowledged()Returns whether or not the message is flagged as ACKNOWLEDGEDbooleanisActive()Returns whether or not the message is flagged as ACTIVEbooleanisCleared()Returns whether or not the message is flagged as CLEAREDbooleanisDeregister()Returns whether or not the message is flagged as DEREGISTERbooleanisRegister()Returns whether or not the message is flagged as REGISTERbooleanisUpdate()voidsetAlertFlag(int flag)Sets an alert flag to on status.voidsetAlertFlag(int flag, boolean value)Sets an alert flag to on or off status depending on value.voidsetDisplayPath(java.lang.String displayPath)voidsetMessage(java.lang.String message)voidsetMessageSubject(java.lang.String value)voidsetNotes(java.lang.String notes)voidsetNotificationMode(AlertNotificationMode notificationMode)voidsetPath(java.lang.String path)voidsetStateName(java.lang.String stateName)voidsetStateSeverity(AlertSeverity stateSeverity)voidsetSystem(java.lang.String system)voidsetTimestamp(java.util.Date timestamp)voidsetUser(java.lang.String user)voidsetValue(java.lang.Double value)booleansuppressClearMessage()Returns whether or not the message is flagged as SUPPRESS_CLEAR_MSGjava.lang.StringtoString()
 
- 
- 
- 
Constructor Detail- 
DefaultAlertMessagepublic DefaultAlertMessage() 
 - 
DefaultAlertMessagepublic DefaultAlertMessage(java.util.Date timeStamp) 
 - 
DefaultAlertMessagepublic DefaultAlertMessage(AlertMessage copy) 
 - 
DefaultAlertMessagepublic DefaultAlertMessage(java.lang.String system, java.lang.String path, java.lang.String stateName, AlertSeverity stateSeverity, java.lang.Double value, java.util.Date timestamp, boolean register, boolean active, boolean cleared, boolean acknowledged, java.lang.String user, java.lang.String message, java.lang.String displayPath, java.lang.String notes, AlertNotificationMode notificationMode)
 
- 
 - 
Method Detail- 
getAlertFlagspublic int getAlertFlags() Description copied from interface:AlertMessageReturns the alert flags to determine what type of alert it is.
 - REGISTER - 0x00000001
- ACTIVE - 0x00000010
- CLEARED - 0x00000100
- ACKNOWLEDGED - 0x00001000
- DEREGISTER - 0x00010000
- SUPPRESS_CLEAR_MSG - 0x00010000
 - Specified by:
- getAlertFlagsin interface- AlertMessage
 
 - 
setAlertFlagpublic void setAlertFlag(int flag) Sets an alert flag to on status.
 - 
setAlertFlagpublic void setAlertFlag(int flag, boolean value)Sets an alert flag to on or off status depending on value.
 - 
getMessageSubjectpublic java.lang.String getMessageSubject() Description copied from interface:AlertMessageReturns the alerts custom subject, if any.- Specified by:
- getMessageSubjectin interface- AlertMessage
 
 - 
setMessageSubjectpublic void setMessageSubject(java.lang.String value) 
 - 
getMessagepublic java.lang.String getMessage() Description copied from interface:AlertMessageReturns the alert's custom message, if any.- Specified by:
- getMessagein interface- AlertMessage
 
 - 
setMessagepublic void setMessage(java.lang.String message) 
 - 
getNotespublic java.lang.String getNotes() Description copied from interface:AlertMessageGet alert notes (extra information about the alert).- Specified by:
- getNotesin interface- AlertMessage
 
 - 
setNotespublic void setNotes(java.lang.String notes) 
 - 
getPathpublic java.lang.String getPath() Description copied from interface:AlertMessageReturns the path of the source, such as the path to a SQLTag, which should be reasonably unique. That is, there should not be another alert with the same path in the same SCADARail system. This path lets alert handlers correlate ACKS and CLEARS with their initial ALERTs- Specified by:
- getPathin interface- AlertMessage
 
 - 
setPathpublic void setPath(java.lang.String path) 
 - 
getDisplayPathpublic java.lang.String getDisplayPath() Description copied from interface:AlertMessageReturns a user-configurable "friendly" path for the alert. Configured on the tag level (so will likely be used often along with state name).- Specified by:
- getDisplayPathin interface- AlertMessage
 
 - 
setDisplayPathpublic void setDisplayPath(java.lang.String displayPath) 
 - 
getStateNamepublic java.lang.String getStateName() Description copied from interface:AlertMessageReturns the name of the alert state that was triggered- Specified by:
- getStateNamein interface- AlertMessage
 
 - 
setStateNamepublic void setStateName(java.lang.String stateName) 
 - 
getStateSeveritypublic AlertSeverity getStateSeverity() Description copied from interface:AlertMessageReturns the severity of the alert state- Specified by:
- getStateSeverityin interface- AlertMessage
 
 - 
setStateSeveritypublic void setStateSeverity(AlertSeverity stateSeverity) 
 - 
getSystempublic java.lang.String getSystem() Description copied from interface:AlertMessageReturns the name of the SCADARail system responsible for the alert- Specified by:
- getSystemin interface- AlertMessage
 
 - 
setSystempublic void setSystem(java.lang.String system) 
 - 
getTimestamppublic java.util.Date getTimestamp() Description copied from interface:AlertMessageReturns the originating timestamp for the message.- Specified by:
- getTimestampin interface- AlertMessage
 
 - 
setTimestamppublic void setTimestamp(java.util.Date timestamp) 
 - 
getUserpublic java.lang.String getUser() Description copied from interface:AlertMessageReturns a username associated with the message. Mostly used for Acknowledegments- Specified by:
- getUserin interface- AlertMessage
 
 - 
setUserpublic void setUser(java.lang.String user) 
 - 
getValuepublic java.lang.Double getValue() Description copied from interface:AlertMessageReturns the value that caused this alert. May not be applicable for all message types- Specified by:
- getValuein interface- AlertMessage
 
 - 
setValuepublic void setValue(java.lang.Double value) 
 - 
getNotificationModepublic AlertNotificationMode getNotificationMode() Description copied from interface:AlertMessageReturns the notification mode for the tag- when it wants notifications to occur.- Specified by:
- getNotificationModein interface- AlertMessage
 
 - 
setNotificationModepublic void setNotificationMode(AlertNotificationMode notificationMode) 
 - 
isAcknowledgedpublic boolean isAcknowledged() Description copied from interface:AlertMessageReturns whether or not the message is flagged as ACKNOWLEDGED- Specified by:
- isAcknowledgedin interface- AlertMessage
 
 - 
isActivepublic boolean isActive() Description copied from interface:AlertMessageReturns whether or not the message is flagged as ACTIVE- Specified by:
- isActivein interface- AlertMessage
 
 - 
isClearedpublic boolean isCleared() Description copied from interface:AlertMessageReturns whether or not the message is flagged as CLEARED- Specified by:
- isClearedin interface- AlertMessage
 
 - 
isRegisterpublic boolean isRegister() Description copied from interface:AlertMessageReturns whether or not the message is flagged as REGISTER- Specified by:
- isRegisterin interface- AlertMessage
 
 - 
isDeregisterpublic boolean isDeregister() Description copied from interface:AlertMessageReturns whether or not the message is flagged as DEREGISTER- Specified by:
- isDeregisterin interface- AlertMessage
 
 - 
suppressClearMessagepublic boolean suppressClearMessage() Description copied from interface:AlertMessageReturns whether or not the message is flagged as SUPPRESS_CLEAR_MSG- Specified by:
- suppressClearMessagein interface- AlertMessage
 
 - 
isUpdatepublic boolean isUpdate() - Specified by:
- isUpdatein interface- AlertMessage
 
 - 
toStringpublic java.lang.String toString() - Overrides:
- toStringin class- java.lang.Object
 
 
- 
 
-