public class Alert extends SystemModel<Alert> implements Versionable, Timeable
Constructor and Description |
---|
Alert(Id<Alert,UUID> id,
Id<SystemInformation,UUID> sysId,
boolean state,
String topicId,
String origin,
Date timestamp,
Severity severity,
String description)
Constructs an instance of an Alert with a unique identification.
|
Alert(Id<SystemInformation,UUID> sysId,
boolean state,
String topicId,
String origin,
Date timestamp,
Severity severity,
String description)
Constructs an instance of an Alert.
|
Modifier and Type | Method and Description |
---|---|
String |
getDescription()
Returns the data description associated with this alert.
|
String |
getOrigin()
Returns the origin associated with this alert.
|
Severity |
getSeverity()
Returns the
Severity associated with this
alert. |
boolean |
getState()
Returns the state associated with this alert.
|
Date |
getTimestamp()
Gets the time the event occurred.
|
String |
getTopicId()
Returns the topic Id associated with this alert.
|
Long |
getVersion()
The JPA persistence version identification.
|
void |
setState(boolean state)
Set the state associated with this alert.
|
void |
setVersion(Long version)
Sets the version.
|
getSysId, toString
equals, getId, hashCode
public Alert(Id<SystemInformation,UUID> sysId, boolean state, String topicId, String origin, Date timestamp, Severity severity, String description)
sysId
- the unique identification of the system that originally
generated this alertstate
- the current state of the alerttopicId
- the topic Id for this alertorigin
- the originating entity for this alerttimestamp
- the date when the alert was createdseverity
- the severity associated with the alertdescription
- the data description information associated with this
alertIllegalArgumentException
- if system identification is nullNullPointerException
- if topicId, origin, time stamp, severity, or
description are nullpublic Alert(Id<Alert,UUID> id, Id<SystemInformation,UUID> sysId, boolean state, String topicId, String origin, Date timestamp, Severity severity, String description)
id
- the external unique identificationsysId
- the unique identification of the system that originally
generated this alertstate
- the current state of the alerttopicId
- the topic Id for this alertorigin
- the originating entity for this alerttimestamp
- the date when the alert was createdseverity
- the severity associated with the alertdescription
- the data description information associated with
this alertIllegalArgumentException
- if unique identification or system
identification are nullNullPointerException
- if topicId, origin, time stamp, severity,
or description are nullpublic Long getVersion()
Versionable
getVersion
in interface Versionable
public void setVersion(Long version)
Versionable
setVersion
in interface Versionable
version
- the version.public String getTopicId()
public String getOrigin()
public Date getTimestamp()
Timeable
getTimestamp
in interface Timeable
public Severity getSeverity()
Severity
associated with this
alert.public boolean getState()
true
if the alert is active, false
otherwisepublic String getDescription()
public void setState(boolean state)
true
if the alert is
active, false
indicates the alert is no longer active.state
- the desired state for the alertCopyright © 2015. All Rights Reserved.