public interface AlertDefinitionManagerLocal
| Modifier and Type | Method and Description |
|---|---|
void |
copyAlertDefinitions(org.rhq.core.domain.auth.Subject subject,
Integer[] alertDefinitionIds) |
int |
createAlertDefinition(org.rhq.core.domain.auth.Subject subject,
org.rhq.core.domain.alert.AlertDefinition alertDefinition,
Integer resourceId,
boolean finalizeNotificationConfiguration)
Creates a new alert definition.
|
int |
createDependentAlertDefinition(org.rhq.core.domain.auth.Subject subject,
org.rhq.core.domain.alert.AlertDefinition alertDefinition,
int resourceId)
This is exactly the same as
createAlertDefinition(Subject, AlertDefinition, Integer, boolean) but
assumes the resource is part of a group (or has given resource type for templates) for which
a group or template alert definition is being created. |
int |
disableAlertDefinitions(org.rhq.core.domain.auth.Subject subject,
int[] alertDefinitionIds) |
int |
enableAlertDefinitions(org.rhq.core.domain.auth.Subject subject,
int[] alertDefinitionIds) |
List<org.rhq.core.domain.common.composite.IntegerOptionItem> |
findAlertDefinitionOptionItemsForGroup(org.rhq.core.domain.auth.Subject subject,
int groupId) |
List<org.rhq.core.domain.common.composite.IntegerOptionItem> |
findAlertDefinitionOptionItemsForResource(org.rhq.core.domain.auth.Subject subject,
int resourceId) |
org.rhq.core.domain.util.PageList<org.rhq.core.domain.alert.AlertDefinition> |
findAlertDefinitions(org.rhq.core.domain.auth.Subject subject,
int resourceId,
org.rhq.core.domain.util.PageControl pageControl) |
org.rhq.core.domain.util.PageList<org.rhq.core.domain.alert.AlertDefinition> |
findAlertDefinitionsByCriteria(org.rhq.core.domain.auth.Subject subject,
org.rhq.core.domain.criteria.AlertDefinitionCriteria criteria) |
List<org.rhq.core.domain.alert.AlertDefinition> |
findAllRecoveryDefinitionsById(org.rhq.core.domain.auth.Subject subject,
Integer alertDefinitionId) |
org.rhq.core.domain.alert.AlertDefinition |
getAlertDefinition(org.rhq.core.domain.auth.Subject subject,
int alertDefinitionId) |
org.rhq.core.domain.alert.AlertDefinition |
getAlertDefinitionById(org.rhq.core.domain.auth.Subject subject,
int alertDefinitionId) |
String[] |
getAlertNotificationConfigurationPreview(org.rhq.core.domain.auth.Subject sessionSubject,
org.rhq.core.domain.alert.notification.AlertNotification[] notifications) |
boolean |
isEnabled(Integer definitionId) |
boolean |
isGroupAlertDefinition(Integer definitionId) |
boolean |
isResourceAlertDefinition(Integer definitionId) |
boolean |
isTemplate(Integer definitionId) |
void |
purgeInternals(int alertDefinitionId) |
int |
purgeUnusedAlertDefinitions() |
int |
removeAlertDefinitions(org.rhq.core.domain.auth.Subject subject,
int[] alertDefinitionIds) |
org.rhq.core.domain.alert.AlertDefinition |
updateAlertDefinition(org.rhq.core.domain.auth.Subject subject,
int alertDefinitionId,
org.rhq.core.domain.alert.AlertDefinition alertDefinition,
boolean resetMatching) |
org.rhq.core.domain.alert.AlertDefinition |
updateAlertDefinitionInternal(org.rhq.core.domain.auth.Subject subject,
int alertDefinitionId,
org.rhq.core.domain.alert.AlertDefinition alertDefinition,
boolean resetMatching,
boolean checkPerms,
boolean finalizeNotifications) |
org.rhq.core.domain.alert.AlertDefinition |
updateDependentAlertDefinition(org.rhq.core.domain.auth.Subject subject,
int alertDefinitionId,
org.rhq.core.domain.alert.AlertDefinition alertDefinition,
boolean resetMatching)
This method is similar in use-case to
createDependentAlertDefinition(Subject, AlertDefinition, int). |
org.rhq.core.domain.util.PageList<org.rhq.core.domain.alert.AlertDefinition> findAlertDefinitions(org.rhq.core.domain.auth.Subject subject,
int resourceId,
org.rhq.core.domain.util.PageControl pageControl)
org.rhq.core.domain.alert.AlertDefinition getAlertDefinitionById(org.rhq.core.domain.auth.Subject subject,
int alertDefinitionId)
List<org.rhq.core.domain.common.composite.IntegerOptionItem> findAlertDefinitionOptionItemsForResource(org.rhq.core.domain.auth.Subject subject, int resourceId)
List<org.rhq.core.domain.common.composite.IntegerOptionItem> findAlertDefinitionOptionItemsForGroup(org.rhq.core.domain.auth.Subject subject, int groupId)
int createAlertDefinition(org.rhq.core.domain.auth.Subject subject,
org.rhq.core.domain.alert.AlertDefinition alertDefinition,
Integer resourceId,
boolean finalizeNotificationConfiguration)
throws InvalidAlertDefinitionException
createDependentAlertDefinition(Subject, AlertDefinition, int)
for further discussion of this.subject - the user creating the alert definitionalertDefinition - the new alert definition to persistresourceId - the resource id for which the def is being createdfinalizeNotificationConfiguration - if true, the configuration of the def's notifications is validated.
This is NOT what you want if, for example, you are merely creating a copy of an existing definition.
Some notifications might require more input when creating the notification than is then persisted in their configs
(prominent example being the CLI alert sender).
This would then cause the validation to fail every time you created a copy of a definition and tried
to persist it. Note that passing false AND having new, unpersisted notifications in the alert definition can
lead to invalid configuration being stored for the notifications.InvalidAlertDefinitionExceptionint createDependentAlertDefinition(org.rhq.core.domain.auth.Subject subject,
org.rhq.core.domain.alert.AlertDefinition alertDefinition,
int resourceId)
createAlertDefinition(Subject, AlertDefinition, Integer, boolean) but
assumes the resource is part of a group (or has given resource type for templates) for which
a group or template alert definition is being created.
This method assumes the caller already checked the subject has permissions to create a group or template alert definition on a group / resource type the resource is member of.
In another words this method is a helper to
GroupAlertDefinitionManagerLocal.createGroupAlertDefinitions(Subject, AlertDefinition, Integer) and
AlertTemplateManagerLocal.createAlertTemplate(Subject, AlertDefinition, Integer).
subject - the user that is creating the group or template alert definitionalertDefinition - the alert definition on the resourceresourceId - the resourceboolean isEnabled(Integer definitionId)
boolean isTemplate(Integer definitionId)
boolean isGroupAlertDefinition(Integer definitionId)
boolean isResourceAlertDefinition(Integer definitionId)
List<org.rhq.core.domain.alert.AlertDefinition> findAllRecoveryDefinitionsById(org.rhq.core.domain.auth.Subject subject, Integer alertDefinitionId)
void copyAlertDefinitions(org.rhq.core.domain.auth.Subject subject,
Integer[] alertDefinitionIds)
org.rhq.core.domain.alert.AlertDefinition updateAlertDefinition(org.rhq.core.domain.auth.Subject subject,
int alertDefinitionId,
org.rhq.core.domain.alert.AlertDefinition alertDefinition,
boolean resetMatching)
throws InvalidAlertDefinitionException,
AlertDefinitionUpdateException
subject - alertDefinitionId - alertDefinition - resetMatching - Incur the overhead of resetting any partial alert matching that has taken place. This *must*
be set true if updating conditions, dampening rules or the conditionExpressin (ANY vs ALL). If in doubt, set to true
as the loss of partial matching is better than corrupted matching.InvalidAlertDefinitionExceptionAlertDefinitionUpdateExceptionorg.rhq.core.domain.alert.AlertDefinition updateDependentAlertDefinition(org.rhq.core.domain.auth.Subject subject,
int alertDefinitionId,
org.rhq.core.domain.alert.AlertDefinition alertDefinition,
boolean resetMatching)
throws InvalidAlertDefinitionException,
AlertDefinitionUpdateException
createDependentAlertDefinition(Subject, AlertDefinition, int).
It assumes that the the update is part of some more complex operation (like updating alert definition on a group
or a template) and that authz checks have already been performed.
This method is therefore identical to updateAlertDefinition(Subject, int, AlertDefinition, boolean) but
does not perform any authorization checks.
subject - the user that is updating the alert definitionalertDefinitionId - alertDefinition - resetMatching - InvalidAlertDefinitionExceptionAlertDefinitionUpdateExceptionint purgeUnusedAlertDefinitions()
void purgeInternals(int alertDefinitionId)
org.rhq.core.domain.alert.AlertDefinition getAlertDefinition(org.rhq.core.domain.auth.Subject subject,
int alertDefinitionId)
org.rhq.core.domain.util.PageList<org.rhq.core.domain.alert.AlertDefinition> findAlertDefinitionsByCriteria(org.rhq.core.domain.auth.Subject subject,
org.rhq.core.domain.criteria.AlertDefinitionCriteria criteria)
int enableAlertDefinitions(org.rhq.core.domain.auth.Subject subject,
int[] alertDefinitionIds)
int disableAlertDefinitions(org.rhq.core.domain.auth.Subject subject,
int[] alertDefinitionIds)
int removeAlertDefinitions(org.rhq.core.domain.auth.Subject subject,
int[] alertDefinitionIds)
String[] getAlertNotificationConfigurationPreview(org.rhq.core.domain.auth.Subject sessionSubject, org.rhq.core.domain.alert.notification.AlertNotification[] notifications)
org.rhq.core.domain.alert.AlertDefinition updateAlertDefinitionInternal(org.rhq.core.domain.auth.Subject subject,
int alertDefinitionId,
org.rhq.core.domain.alert.AlertDefinition alertDefinition,
boolean resetMatching,
boolean checkPerms,
boolean finalizeNotifications)
throws InvalidAlertDefinitionException,
AlertDefinitionUpdateException
Copyright © 2008-2013 Red Hat, Inc.. All Rights Reserved.