public interface AlertManager
AlertRule
Modifier and Type | Method and Description |
---|---|
AlertRule |
createAlertRule()
Creates a new alert rule.
|
void |
deleteAlertRule(Long id)
Deletes the given alert rule from the server.
|
AlertRule |
getAlertRule(long alertID)
Gets the alert rule specified by the id.
|
List<AlertRule> |
getAlertRules(String user)
Gets all available alert rules from the server for the given user.
|
AlertRule |
setAlertRule(AlertRule rule)
Adds if it does not previously exist, or overwrites if it does (matching by id),
the given alert rule onto the server.
|
void |
validateAlertRule(AlertRule rule)
Validates the given alert rule.
|
List<AlertRule> getAlertRules(String user) throws LiveViewException
"user" is currently just an opaque string that is used as a key in setting and getting alerts. There is no validation or authentication done with or for this opaque string. Blocks until all AlertRules are returned.
AlertRule
s from the server for the given user, or all rules if user is *
LiveViewException
- if there is a problem with the request or network issueAlertRule getAlertRule(long alertID) throws LiveViewException
AlertRule
that matches the idLiveViewException
- if there is a problem with the request or network issueAlertRule createAlertRule()
All of the properties of the returned AlertRule
have initial values, but
no initial value is guaranteed to be valid.
After valid property values have been assigned, the rule can be added to the
server using AlertManager.setAlertRule(AlertRule)
AlertRule
AlertManager.setAlertRule(AlertRule)
AlertRule setAlertRule(AlertRule rule) throws LiveViewException
Only alert rules created via by AlertManager.createAlertRule()
or retrieved by this manager may
be added to the server via this method.
If a new alert rule is being added, the given AlertRule
is mutated on return
such that its id is set.
AlertRule
with the id set, if previously not set.LiveViewException
- if there is a problem with the request or network issuevoid deleteAlertRule(Long id) throws LiveViewException
id
- The id of the alert rule to deleteLiveViewException
- if there is a problem with the request or network issue, or no alert rule
can be bound with the given idvoid validateAlertRule(AlertRule rule) throws LiveViewException
rule
- The AlertRule
to validate against the currently running serverLiveViewException
- if there is a problem with the given rule