org.rhq.enterprise.server.alert
Interface AlertManagerLocal

All Known Implementing Classes:
AlertManagerBean

public interface AlertManagerLocal

Author:
Joseph Marques

Method Summary
 int acknowledgeAlerts(org.rhq.core.domain.auth.Subject user, int[] alertIds)
          Acknowledge the alerts (that got fired) so that admins know who is working on fixing the situation.
 int acknowledgeAlertsByContext(org.rhq.core.domain.auth.Subject subject, org.rhq.core.domain.common.EntityContext context)
           
 org.rhq.core.domain.alert.Alert createAlert(org.rhq.core.domain.alert.Alert alert)
           
 int deleteAlerts(long beginTime, long endTime)
           
 int deleteAlerts(org.rhq.core.domain.auth.Subject user, int[] ids)
          Remove the alerts with the specified id's.
 int deleteAlertsByContext(org.rhq.core.domain.auth.Subject subject, org.rhq.core.domain.common.EntityContext context)
           
 org.rhq.core.domain.util.PageList<org.rhq.core.domain.alert.Alert> findAlertsByCriteria(org.rhq.core.domain.auth.Subject subject, org.rhq.core.domain.criteria.AlertCriteria criteria)
           
 void fireAlert(int alertDefinitionId)
           
 int getAlertCountByMeasurementDefinitionAndAutoGroup(int measurementDefinitionId, int resourceParentId, int resourceTypeId, long beginDate, long endDate)
           
 int getAlertCountByMeasurementDefinitionAndResource(int measurementDefinitionId, int resourceId, long beginDate, long endDate)
           
 int getAlertCountByMeasurementDefinitionAndResourceGroup(int measurementDefinitionId, int groupId, long beginDate, long endDate)
           
 int getAlertCountByMeasurementDefinitionAndResources(int measurementDefinitionId, int[] resources, long beginDate, long endDate)
           
 int getAlertCountByMeasurementDefinitionId(Integer measurementDefinitionId, long begin, long end)
           
 Map<Integer,Integer> getAlertCountForSchedules(long begin, long end, List<Integer> scheduleIds)
           
 AlertSenderPluginManager getAlertPluginManager()
          Return the plugin manager that is managing alert sender plugins
 String prettyPrintAlertConditions(org.rhq.core.domain.alert.Alert alert, boolean shortVersion)
          Create a human readable description of the conditions that led to this alert.
 String prettyPrintAlertURL(org.rhq.core.domain.alert.Alert alert)
           
 Collection<String> sendAlertNotificationEmails(org.rhq.core.domain.alert.Alert alert, Collection<String> emailAddresses)
           
 void sendAlertNotifications(org.rhq.core.domain.alert.Alert alert)
           
 boolean willDefinitionBeDisabled(org.rhq.core.domain.alert.Alert alert)
          Tells us if the definition of the passed alert will be disabled after this alert was fired
 

Method Detail

createAlert

org.rhq.core.domain.alert.Alert createAlert(org.rhq.core.domain.alert.Alert alert)

deleteAlerts

int deleteAlerts(long beginTime,
                 long endTime)

getAlertCountByMeasurementDefinitionId

int getAlertCountByMeasurementDefinitionId(Integer measurementDefinitionId,
                                           long begin,
                                           long end)

getAlertCountByMeasurementDefinitionAndResourceGroup

int getAlertCountByMeasurementDefinitionAndResourceGroup(int measurementDefinitionId,
                                                         int groupId,
                                                         long beginDate,
                                                         long endDate)

getAlertCountByMeasurementDefinitionAndAutoGroup

int getAlertCountByMeasurementDefinitionAndAutoGroup(int measurementDefinitionId,
                                                     int resourceParentId,
                                                     int resourceTypeId,
                                                     long beginDate,
                                                     long endDate)

getAlertCountByMeasurementDefinitionAndResource

int getAlertCountByMeasurementDefinitionAndResource(int measurementDefinitionId,
                                                    int resourceId,
                                                    long beginDate,
                                                    long endDate)

fireAlert

void fireAlert(int alertDefinitionId)

sendAlertNotifications

void sendAlertNotifications(org.rhq.core.domain.alert.Alert alert)

getAlertCountByMeasurementDefinitionAndResources

int getAlertCountByMeasurementDefinitionAndResources(int measurementDefinitionId,
                                                     int[] resources,
                                                     long beginDate,
                                                     long endDate)

getAlertCountForSchedules

Map<Integer,Integer> getAlertCountForSchedules(long begin,
                                               long end,
                                               List<Integer> scheduleIds)

getAlertPluginManager

AlertSenderPluginManager getAlertPluginManager()
Return the plugin manager that is managing alert sender plugins

Returns:
The alert sender plugin manager

prettyPrintAlertConditions

String prettyPrintAlertConditions(org.rhq.core.domain.alert.Alert alert,
                                  boolean shortVersion)
Create a human readable description of the conditions that led to this alert.

Parameters:
alert - Alert to create human readable condition description
shortVersion - if true the messages printed are abbreviated to save space
Returns:
human readable condition log

willDefinitionBeDisabled

boolean willDefinitionBeDisabled(org.rhq.core.domain.alert.Alert alert)
Tells us if the definition of the passed alert will be disabled after this alert was fired

Parameters:
alert - alert to check
Returns:
true if the definition got disabled

sendAlertNotificationEmails

Collection<String> sendAlertNotificationEmails(org.rhq.core.domain.alert.Alert alert,
                                               Collection<String> emailAddresses)

prettyPrintAlertURL

String prettyPrintAlertURL(org.rhq.core.domain.alert.Alert alert)

findAlertsByCriteria

org.rhq.core.domain.util.PageList<org.rhq.core.domain.alert.Alert> findAlertsByCriteria(org.rhq.core.domain.auth.Subject subject,
                                                                                        org.rhq.core.domain.criteria.AlertCriteria criteria)

acknowledgeAlerts

int acknowledgeAlerts(org.rhq.core.domain.auth.Subject user,
                      int[] alertIds)
Acknowledge the alerts (that got fired) so that admins know who is working on fixing the situation.

Parameters:
user - calling user
alertIds - PKs of the alerts to ack
Returns:
number of alerts acknowledged

deleteAlerts

int deleteAlerts(org.rhq.core.domain.auth.Subject user,
                 int[] ids)
Remove the alerts with the specified id's.

Parameters:
user - caller
ids - primary keys of the alerts to delete
Returns:
number of alerts deleted

deleteAlertsByContext

int deleteAlertsByContext(org.rhq.core.domain.auth.Subject subject,
                          org.rhq.core.domain.common.EntityContext context)

acknowledgeAlertsByContext

int acknowledgeAlertsByContext(org.rhq.core.domain.auth.Subject subject,
                               org.rhq.core.domain.common.EntityContext context)


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