org.rhq.enterprise.server.alert
Interface AlertNotificationManagerLocal

All Known Implementing Classes:
AlertNotificationManagerBean

public interface AlertNotificationManagerLocal

Author:
Joseph Marques

Method Summary
 void addAlertNotification(Subject user, int alertDefinitionId, java.lang.String senderName, Configuration configuration)
          Add a new AlertNotification to the passed definition
 int addEmailNotifications(Subject subject, java.lang.Integer alertDefinitionId, java.lang.String[] emails)
           
 int addRoleNotifications(Subject subject, java.lang.Integer alertDefinitionId, java.lang.Integer[] roleIds)
           
 int addSubjectNotifications(Subject subject, java.lang.Integer alertDefinitionId, java.lang.Integer[] subjectId)
           
 AlertSenderInfo getAlertInfoForSender(java.lang.String shortName)
           
 Configuration getAlertPropertiesConfiguration(AlertNotification notification)
           
 ConfigurationDefinition getConfigurationDefinitionForSender(java.lang.String shortName)
           
 PageList<EmailNotification> getEmailNotifications(java.lang.Integer[] alertNotificationIds, PageControl pageControl)
           
 PageList<EmailNotification> getEmailNotifications(java.lang.Integer alertDefinitionId, PageControl pageControl)
           
 java.util.List<AlertNotification> getNotificationsForAlertDefinition(Subject user, int alertDefinitionId)
          Return notifications for a certain alertDefinitionId NOTE: this only returns notifications that have an AlertSender defined.
 PageList<RoleNotification> getRoleNotifications(java.lang.Integer[] alertNotificationIds, PageControl pageControl)
           
 PageList<RoleNotification> getRoleNotifications(java.lang.Integer alertDefinitionId, PageControl pageControl)
           
 PageList<RoleNotification> getRoleNotificationsByRoles(java.lang.Integer[] roleIds, PageControl pageControl)
           
 PageList<SnmpNotification> getSnmpNotifications(java.lang.Integer alertDefinitionId, PageControl pageControl)
           
 PageList<SubjectNotification> getSubjectNotifications(java.lang.Integer[] alertNotificationIds, PageControl pageControl)
           
 PageList<SubjectNotification> getSubjectNotifications(java.lang.Integer alertDefinitionId, PageControl pageControl)
           
 PageList<SubjectNotification> getSubjectNotificationsBySubjects(java.lang.Integer[] subjectId, PageControl pageControl)
           
 java.util.List<java.lang.String> listAllAlertSenders()
          Return a list of all available AlertSenders in the system by their shortname.
 int purgeOrphanedAlertNotifications()
           
 int removeNotifications(Subject subject, java.lang.Integer alertDefinitionId, java.lang.Integer[] notificationIds)
          Remove the passed notifications from the passed alert definition (all identified by their id)
 

Method Detail

addEmailNotifications

int addEmailNotifications(Subject subject,
                          java.lang.Integer alertDefinitionId,
                          java.lang.String[] emails)

addRoleNotifications

int addRoleNotifications(Subject subject,
                         java.lang.Integer alertDefinitionId,
                         java.lang.Integer[] roleIds)

addSubjectNotifications

int addSubjectNotifications(Subject subject,
                            java.lang.Integer alertDefinitionId,
                            java.lang.Integer[] subjectId)

getEmailNotifications

PageList<EmailNotification> getEmailNotifications(java.lang.Integer alertDefinitionId,
                                                  PageControl pageControl)

getRoleNotifications

PageList<RoleNotification> getRoleNotifications(java.lang.Integer alertDefinitionId,
                                                PageControl pageControl)

getSubjectNotifications

PageList<SubjectNotification> getSubjectNotifications(java.lang.Integer alertDefinitionId,
                                                      PageControl pageControl)

getSnmpNotifications

PageList<SnmpNotification> getSnmpNotifications(java.lang.Integer alertDefinitionId,
                                                PageControl pageControl)

getEmailNotifications

PageList<EmailNotification> getEmailNotifications(java.lang.Integer[] alertNotificationIds,
                                                  PageControl pageControl)

getRoleNotifications

PageList<RoleNotification> getRoleNotifications(java.lang.Integer[] alertNotificationIds,
                                                PageControl pageControl)

getSubjectNotifications

PageList<SubjectNotification> getSubjectNotifications(java.lang.Integer[] alertNotificationIds,
                                                      PageControl pageControl)

getRoleNotificationsByRoles

PageList<RoleNotification> getRoleNotificationsByRoles(java.lang.Integer[] roleIds,
                                                       PageControl pageControl)

getSubjectNotificationsBySubjects

PageList<SubjectNotification> getSubjectNotificationsBySubjects(java.lang.Integer[] subjectId,
                                                                PageControl pageControl)

removeNotifications

int removeNotifications(Subject subject,
                        java.lang.Integer alertDefinitionId,
                        java.lang.Integer[] notificationIds)
Remove the passed notifications from the passed alert definition (all identified by their id)

Parameters:
subject - Caller
alertDefinitionId - alert definition to modify
notificationIds - Notifications to remove
Returns:
number of notifications removed

purgeOrphanedAlertNotifications

int purgeOrphanedAlertNotifications()

getAlertPropertiesConfiguration

Configuration getAlertPropertiesConfiguration(AlertNotification notification)

listAllAlertSenders

java.util.List<java.lang.String> listAllAlertSenders()
Return a list of all available AlertSenders in the system by their shortname.

Returns:
list of senders.

getConfigurationDefinitionForSender

ConfigurationDefinition getConfigurationDefinitionForSender(java.lang.String shortName)

addAlertNotification

void addAlertNotification(Subject user,
                          int alertDefinitionId,
                          java.lang.String senderName,
                          Configuration configuration)
Add a new AlertNotification to the passed definition

Parameters:
user - subject of the caller
alertDefinitionId - Id of the alert definition
senderName - shortName of the AlertSender
configuration - Properties for this alert sender.

getNotificationsForAlertDefinition

java.util.List<AlertNotification> getNotificationsForAlertDefinition(Subject user,
                                                                     int alertDefinitionId)
Return notifications for a certain alertDefinitionId NOTE: this only returns notifications that have an AlertSender defined.

Parameters:
user - Subject of the caller
alertDefinitionId - Id of the alert definition
Returns:
list of defined notification of the passed alert definition

getAlertInfoForSender

AlertSenderInfo getAlertInfoForSender(java.lang.String shortName)


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