org.rhq.core.domain.alert.notification
Class AlertNotification

java.lang.Object
  extended by org.rhq.core.domain.alert.notification.AlertNotification
All Implemented Interfaces:
Serializable

public class AlertNotification
extends Object
implements Serializable

See Also:
Serialized Form

Field Summary
static String DELETE_BY_ID
           
static String QUERY_CLEANSE_PARAMETER_VALUE_FOR_ALERT_SENDER
           
static String QUERY_DELETE_BY_RESOURCES
           
static String QUERY_DELETE_BY_ROLE_ID
           
static String QUERY_DELETE_ORPHANED
           
static String QUERY_UPDATE_PARAMETER_FOR_NOTIFICATIONS
           
 
Constructor Summary
protected AlertNotification()
           
  AlertNotification(AlertNotification source)
           
  AlertNotification(String sender)
           
  AlertNotification(String sender, Configuration configuration)
           
 
Method Summary
 boolean equals(Object obj)
           
 boolean equalsData(AlertNotification other)
           
 AlertDefinition getAlertDefinition()
           
 Configuration getConfiguration()
          The configuration containing the properties that each individual alert sender requires.
 Configuration getExtraConfiguration()
          These are extra configuration property values that a particular sender instance might need.
 int getId()
           
 String getSenderName()
           
 int hashCode()
           
 void prepareForOrphanDelete()
           
 void setAlertDefinition(AlertDefinition alertDefinition)
           
 void setConfiguration(Configuration configuration)
           
 void setExtraConfiguration(Configuration extraConfiguration)
           
 void setSenderName(String senderName)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

DELETE_BY_ID

public static final String DELETE_BY_ID
See Also:
Constant Field Values

QUERY_DELETE_BY_RESOURCES

public static final String QUERY_DELETE_BY_RESOURCES
See Also:
Constant Field Values

QUERY_DELETE_ORPHANED

public static final String QUERY_DELETE_ORPHANED
See Also:
Constant Field Values

QUERY_DELETE_BY_ROLE_ID

public static final String QUERY_DELETE_BY_ROLE_ID
See Also:
Constant Field Values

QUERY_CLEANSE_PARAMETER_VALUE_FOR_ALERT_SENDER

public static final String QUERY_CLEANSE_PARAMETER_VALUE_FOR_ALERT_SENDER
See Also:
Constant Field Values

QUERY_UPDATE_PARAMETER_FOR_NOTIFICATIONS

public static final String QUERY_UPDATE_PARAMETER_FOR_NOTIFICATIONS
See Also:
Constant Field Values
Constructor Detail

AlertNotification

protected AlertNotification()

AlertNotification

public AlertNotification(String sender,
                         Configuration configuration)
Parameters:
sender - the type of alert sender for this AlertNotification
configuration - the custom data required for runtime configuration; it must be a new configuration object and not already persisted; in other words, the Configuration object as well as its Property children must have ids of 0.

AlertNotification

public AlertNotification(AlertNotification source)

AlertNotification

public AlertNotification(String sender)
Method Detail

getId

public int getId()

getAlertDefinition

@NotNull
public AlertDefinition getAlertDefinition()

setAlertDefinition

public void setAlertDefinition(AlertDefinition alertDefinition)

prepareForOrphanDelete

public void prepareForOrphanDelete()

getSenderName

public String getSenderName()

setSenderName

public void setSenderName(String senderName)

getConfiguration

public Configuration getConfiguration()
The configuration containing the properties that each individual alert sender requires. The properties in this configuration should match the property definitions defined in the alert server plugin descriptor.

Returns:
the configuration for the alert notification (properties included in this configuration will be specific to the sender type).

setConfiguration

public void setConfiguration(Configuration configuration)

getExtraConfiguration

public Configuration getExtraConfiguration()
These are extra configuration property values that a particular sender instance might need. These are only used/needed for specific alert implementations. One example where extra config is used is for the "resource operation" alert sender. If a particular notification uses this "resource operation" sender (where getConfiguration() will include things like the operation name that is to be invoked), its possible that the selected operation to invoke requires parameters to be passed to it. The user can enter this "extra" data and those extra properties (that is, the configuration properties to be passed to the operation as parametesr) will be stored here.

Returns:
extra configuration properties or null if not set

setExtraConfiguration

public void setExtraConfiguration(Configuration extraConfiguration)

toString

public String toString()
Overrides:
toString in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object obj)
Overrides:
equals in class Object

equalsData

public boolean equalsData(AlertNotification other)


Copyright © 2008-2011 Red Hat, Inc.. All Rights Reserved.