public interface AlertManager
AlertRule
Modifier and Type | Method and Description |
---|---|
AlertRule |
createAlertRule()
Creates a new alert rule.
|
void |
deleteAlertRule(String guid)
Deletes the
AlertRule from the server that matches the given GUID. |
AlertRule |
getAlertRule(String guid)
Gets the alert rule specified by the GUID.
|
List<AlertRule> |
getAlertRules(String user)
Gets all available alert rules from the server for the given user.
|
Set<String> |
getKnownSettableAlertGroups()
Gets all the alert groups that the server knows about that you have permission to set
|
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
If authentication is disabled, "user" is 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.
If authentication is enabled when the alert was created, "user" was the currently signed in user when the alert was created.
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(String guid) throws LiveViewException
guid
- : Unique String identifier for the AlertRule
}AlertRule
that matches the given guid.LiveViewException
- if there is a problem with the request or network issue or the AlertRule
is not found.AlertRule 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.
The owner of the alert rule is set to the username of the authenticated user if the authentication is enabled.
AlertRule
with the id set, if previously not set.LiveViewException
- if there is a problem with the request or network issuevoid deleteAlertRule(String guid) throws LiveViewException
AlertRule
from the server that matches the given GUID. A LiveViewException is thrown if the rule
doesn't exist on the server.guid
- : Unique String identifier for the AlertRule
}.LiveViewException
- if there is a problem with the request or network issue or no alert rule.
can be found with the given guid.void validateAlertRule(AlertRule rule) throws LiveViewException
rule
- The AlertRule
to validate against the currently running serverLiveViewException
- if there is a problem with the given ruleSet<String> getKnownSettableAlertGroups() throws LiveViewException
LiveViewException
Copyright © 2015–2019 Cloud Software Group, Inc.. All rights reserved.