Interface AlertManager
- Since:
- 2.0
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionCreates a new alert rule.void
deleteAlertRule
(String guid) Deletes theAlertRule
from the server that matches the given GUID.getAlertRule
(String guid) Gets the alert rule specified by the GUID.getAlertRules
(String user) Gets all available alert rules from the server for the given user.Gets all the alert groups that the server knows about that you have permission to setsetAlertRule
(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.
-
Method Details
-
getAlertRules
Gets all available alert rules from the server for the given user. A user name of "*" or null returns all users' alerts.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.
- Returns:
- all
AlertRule
s from the server for the given user, or all rules if user is*
- Throws:
LiveViewException
- if there is a problem with the request or network issue
-
getAlertRule
Gets the alert rule specified by the GUID.- Parameters:
guid
- : Unique String identifier for theAlertRule
}- Returns:
- The
AlertRule
that matches the given guid. - Throws:
LiveViewException
- if there is a problem with the request or network issue or theAlertRule
is not found.- Since:
- 10.3
-
createAlertRule
AlertRule createAlertRule()Creates a new alert rule. The returned object must be added to the server once configured for it to take effect.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
setAlertRule(AlertRule)
- Returns:
- a new
AlertRule
- See Also:
-
setAlertRule
Adds if it does not previously exist, or overwrites if it does (matching by id), the given alert rule onto the server.Only alert rules created via by
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.
- Returns:
- the given
AlertRule
with the id set, if previously not set. - Throws:
LiveViewException
- if there is a problem with the request or network issue
-
deleteAlertRule
Deletes theAlertRule
from the server that matches the given GUID. A LiveViewException is thrown if the rule doesn't exist on the server.- Parameters:
guid
- : Unique String identifier for theAlertRule
}.- Throws:
LiveViewException
- if there is a problem with the request or network issue or no alert rule. can be found with the given guid.- Since:
- 10.3
-
validateAlertRule
Validates the given alert rule. A LiveViewException is thrown if the rule fails to validate properly.- Parameters:
rule
- TheAlertRule
to validate against the currently running server- Throws:
LiveViewException
- if there is a problem with the given rule
-
getKnownSettableAlertGroups
Gets all the alert groups that the server knows about that you have permission to set- Returns:
- A list of alert groups that you have permission to set and that the server knows about.
- Throws:
LiveViewException
- Since:
- 10.5
-