public class AlertInfo extends Object implements HumanReadable
| Constructor and Description |
|---|
AlertInfo(String id,
long limit,
String sql,
boolean enabled,
String notificationSubject,
String notificationBody)
Creates new alert.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj) |
String |
getId()
Gets alert unique identification.
|
long |
getLimit()
Gets limit.
|
String |
getNotificationBody()
Gets notification (email, sms) body.
|
String |
getNotificationSubject()
Gets notification (email, sms) subject.
|
String |
getSql()
Gets SQL expression.
|
int |
hashCode() |
boolean |
isEnabled()
Is this alert enabled?
|
void |
setEnabled(boolean enabled)
Enables/disables this alert.
|
void |
setLimit(long limit)
Sets limit.
|
String |
toHumanString()
Returns human readable entity identification with start and end round brackets.
|
String |
toString() |
public AlertInfo(String id, long limit, String sql, boolean enabled, @Nullable String notificationSubject, @Nullable String notificationBody)
id - the alert unique identificationlimit - limit that must be exceeded to activate alertsql - SQL query that returns count of items for comparison with limit valueenabled - if specified alert is enabled or disablednotificationSubject - the (mail, sms) subjectnotificationBody - the (mail, sms) bodypublic String getId()
public long getLimit()
public void setLimit(long limit)
limit - the limitpublic String getSql()
public boolean isEnabled()
true if enabled otherwise falsepublic void setEnabled(boolean enabled)
enabled - true for enabling otherwise false@Nullable public String getNotificationSubject()
@Nullable public String getNotificationBody()
public String toHumanString()
HumanReadabletoHumanString in interface HumanReadableCopyright © 2018 Pivotal Software, Inc.. All rights reserved.