public static class AlertSampleManager.Threshold extends Object
Modifier and Type | Class and Description |
---|---|
static class |
AlertSampleManager.Threshold.Operator
The possible types of operators
|
Modifier and Type | Field and Description |
---|---|
private String |
_dsName |
private I18nizableText |
_mailBody |
private I18nizableText |
_mailSubject |
private AlertSampleManager.Threshold.Operator |
_operator |
private Object |
_value |
Constructor and Description |
---|
Threshold(AlertSampleManager.Threshold.Operator operator,
String datasourceName,
Object value,
I18nizableText mailSubject,
I18nizableText mailBody)
Creates a threshold.
|
Modifier and Type | Method and Description |
---|---|
String |
getDatasourceName()
Gets the datasource name of this threshold.
|
I18nizableText |
getMailBody()
Gets the body of the mail to send.
|
I18nizableText |
getMailSubject()
Gets the subject of the mail to send.
|
Object |
getValue()
Gets the value of the threshold.
|
boolean |
isExceeded(Object comparedTo)
Tests if the given value exceeds the threshold.
|
private AlertSampleManager.Threshold.Operator _operator
private I18nizableText _mailSubject
private I18nizableText _mailBody
public Threshold(AlertSampleManager.Threshold.Operator operator, String datasourceName, Object value, I18nizableText mailSubject, I18nizableText mailBody)
operator
- The kind of operatordatasourceName
- The id of the datasourcevalue
- The value of the threshold. Can be null to disable the alert.mailSubject
- The subject of the potential mail to send.mailBody
- The body of the potential mail to send.public String getDatasourceName()
public Object getValue()
public I18nizableText getMailSubject()
public I18nizableText getMailBody()
public boolean isExceeded(Object comparedTo)
comparedTo
- The value to test against the threshold.