Alert¶
-
public class
Alert
implements Comparable<Alert>¶ The alert class, the core of this module. Note that the alert module does not impose any interpretations on the fields of this class, that is left to the implementation that will make use of this module.
Constructors¶
Alert¶
-
public
Alert
(String externalId, AlertType alertType, AlertStatus status, int priority, Map<String, String> data)¶ Creates a new instance of the alert without the name and description.
Parameters: - externalId – the external id of this alert
- alertType – the type of this alert
- status – the status of this alert
- priority – the number representing the alert priority
- data – the additional data for this alert
Alert¶
-
public
Alert
(String externalId, String name, String description, AlertType alertType, AlertStatus status, int priority, Map<String, String> data)¶ Creates a new instance of an alert.
Parameters: - externalId – the external id of this alert
- name – the short name of this alert
- description – the description of this alert
- alertType – the type of this alert
- status – the status of this alert
- priority – the number representing the alert priority
- data – the additional data for this alert
Methods¶
getAlertType¶
getData¶
getDateTime¶
getDateTimeInMillis¶
-
public long
getDateTimeInMillis
()¶ Returns the value of
getDateTime()
as milliseconds from 1970-01-01T00:00:00Z.Returns: the datetime of this alert in milliseconds
getExternalId¶
getName¶
getPriority¶
getStatus¶
-
public AlertStatus
getStatus
()¶ Returns the status of this alert, describing whether it is a new alert, a read alert or a closed alert. The actual meaning of those values is left to the implementation.
Returns: the status of this alert
setAlertType¶
setData¶
setDateTime¶
setDescription¶
setExternalId¶
setName¶
setPriority¶
setStatus¶
-
public void
setStatus
(AlertStatus status)¶ Sets the status of this alert, describing whether it is a new alert, a read alert or a closed alert. The actual meaning of those values is left to the implementation.
Parameters: - status – the status of this alert