public abstract class AlertSender<T extends ServerPluginComponent> extends Object
| Modifier and Type | Field and Description |
|---|---|
protected org.rhq.core.domain.configuration.Configuration |
alertParameters
Configuration from the per alert definition parameters
|
protected org.rhq.core.domain.configuration.Configuration |
extraParameters
Configuration from the per alert definition parameters
|
protected T |
pluginComponent
Global component holding persistent resources
|
protected org.rhq.core.domain.configuration.Configuration |
preferences
Configuration from the global per plugin type preferences
|
protected ServerPluginEnvironment |
serverPluginEnvironment
Environement of the plugin to e.g.
|
| Constructor and Description |
|---|
AlertSender() |
| Modifier and Type | Method and Description |
|---|---|
static String |
fence(List<?> elements)
Takes the list of elements e1, e2, e3 and fences
them with '|' delimiters such that the result looks
like "|e1|e2|e3|"
|
String |
previewConfiguration()
Allow users to see a preview of the stored configuration data without having to edit it.
|
abstract org.rhq.core.domain.alert.notification.SenderResult |
send(org.rhq.core.domain.alert.Alert alert)
This method is called to actually send an alert notification.
|
static <T> List<T> |
unfence(String fencedData,
Class<T> type)
Presumes the data is in the format "|a|b|c|d|e|"
where '|' delimits all elements as well as wraps
the entire expression.
|
static <T> List<T> |
unfence(String fencedData,
Class<T> type,
String delimiter) |
AlertSenderValidationResults |
validateAndFinalizeConfiguration(org.rhq.core.domain.auth.Subject subject)
Validates the alert and extra parameters.
|
protected org.rhq.core.domain.configuration.Configuration preferences
protected org.rhq.core.domain.configuration.Configuration alertParameters
protected org.rhq.core.domain.configuration.Configuration extraParameters
protected T extends ServerPluginComponent pluginComponent
protected ServerPluginEnvironment serverPluginEnvironment
public abstract org.rhq.core.domain.alert.notification.SenderResult send(org.rhq.core.domain.alert.Alert alert)
alert - the Alert to operate onpublic String previewConfiguration()
public AlertSenderValidationResults validateAndFinalizeConfiguration(org.rhq.core.domain.auth.Subject subject)
error messages set.
The implementation is free to change (add/update/delete) properties in either of the configurations (i.e. finalize them). This is to support scenarios where the user inputs values that need to be further processed in an alert sender specific way before they get stored into the database.
The default implementation makes no changes to the configurations.
subject - the subject requesting the changes in the configurationpublic static <T> List<T> unfence(String fencedData, Class<T> type)
Copyright © 2008-2014 Red Hat, Inc.. All Rights Reserved.