|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.rhq.enterprise.server.alert.AlertDefinitionManagerBean
public class AlertDefinitionManagerBean
| Constructor Summary | |
|---|---|
AlertDefinitionManagerBean()
|
|
| Method Summary | |
|---|---|
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 validateNotificationConfiguration)
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 AlertDefinitionManagerLocal.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 |
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 AlertDefinitionManagerLocal.createDependentAlertDefinition(Subject, AlertDefinition, int). |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public AlertDefinitionManagerBean()
| Method Detail |
|---|
public 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)
findAlertDefinitions in interface AlertDefinitionManagerLocal
public org.rhq.core.domain.alert.AlertDefinition getAlertDefinitionById(org.rhq.core.domain.auth.Subject subject,
int alertDefinitionId)
getAlertDefinitionById in interface AlertDefinitionManagerLocal
public List<org.rhq.core.domain.common.composite.IntegerOptionItem> findAlertDefinitionOptionItemsForResource(org.rhq.core.domain.auth.Subject subject,
int resourceId)
findAlertDefinitionOptionItemsForResource in interface AlertDefinitionManagerLocal
public List<org.rhq.core.domain.common.composite.IntegerOptionItem> findAlertDefinitionOptionItemsForGroup(org.rhq.core.domain.auth.Subject subject,
int groupId)
findAlertDefinitionOptionItemsForGroup in interface AlertDefinitionManagerLocal
public int createDependentAlertDefinition(org.rhq.core.domain.auth.Subject subject,
org.rhq.core.domain.alert.AlertDefinition alertDefinition,
int resourceId)
throws InvalidAlertDefinitionException
AlertDefinitionManagerLocalAlertDefinitionManagerLocal.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).
createDependentAlertDefinition in interface AlertDefinitionManagerLocalsubject - the user that is creating the group or template alert definitionalertDefinition - the alert definition on the resourceresourceId - the resource
InvalidAlertDefinitionException
public int createAlertDefinition(org.rhq.core.domain.auth.Subject subject,
org.rhq.core.domain.alert.AlertDefinition alertDefinition,
Integer resourceId,
boolean validateNotificationConfiguration)
throws InvalidAlertDefinitionException
AlertDefinitionManagerLocalAlertDefinitionManagerLocal.createDependentAlertDefinition(Subject, AlertDefinition, int)
for further discussion of this.
createAlertDefinition in interface AlertDefinitionManagerLocalsubject - the user creating the alert definitionalertDefinition - the new alert definition to persistresourceId - the resource id for which the def is being createdvalidateNotificationConfiguration - 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.
InvalidAlertDefinitionException
public int removeAlertDefinitions(org.rhq.core.domain.auth.Subject subject,
int[] alertDefinitionIds)
removeAlertDefinitions in interface AlertDefinitionManagerLocalremoveAlertDefinitions in interface AlertDefinitionManagerRemote
public int enableAlertDefinitions(org.rhq.core.domain.auth.Subject subject,
int[] alertDefinitionIds)
enableAlertDefinitions in interface AlertDefinitionManagerLocalenableAlertDefinitions in interface AlertDefinitionManagerRemotepublic boolean isEnabled(Integer definitionId)
isEnabled in interface AlertDefinitionManagerLocalpublic boolean isTemplate(Integer definitionId)
isTemplate in interface AlertDefinitionManagerLocalpublic boolean isGroupAlertDefinition(Integer definitionId)
isGroupAlertDefinition in interface AlertDefinitionManagerLocalpublic boolean isResourceAlertDefinition(Integer definitionId)
isResourceAlertDefinition in interface AlertDefinitionManagerLocal
public int disableAlertDefinitions(org.rhq.core.domain.auth.Subject subject,
int[] alertDefinitionIds)
disableAlertDefinitions in interface AlertDefinitionManagerLocaldisableAlertDefinitions in interface AlertDefinitionManagerRemote
public void copyAlertDefinitions(org.rhq.core.domain.auth.Subject subject,
Integer[] alertDefinitionIds)
copyAlertDefinitions in interface AlertDefinitionManagerLocal
public List<org.rhq.core.domain.alert.AlertDefinition> findAllRecoveryDefinitionsById(org.rhq.core.domain.auth.Subject subject,
Integer alertDefinitionId)
findAllRecoveryDefinitionsById in interface AlertDefinitionManagerLocal
public 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
updateAlertDefinition in interface AlertDefinitionManagerLocalresetMatching - 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.
InvalidAlertDefinitionException
AlertDefinitionUpdateException
public 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)
throws InvalidAlertDefinitionException,
AlertDefinitionUpdateException
AlertDefinitionManagerLocalAlertDefinitionManagerLocal.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 AlertDefinitionManagerLocal.updateAlertDefinition(Subject, int, AlertDefinition, boolean) but
does not perform any authorization checks.
updateDependentAlertDefinition in interface AlertDefinitionManagerLocalsubject - the user that is updating the alert definition
InvalidAlertDefinitionException
AlertDefinitionUpdateExceptionpublic void purgeInternals(int alertDefinitionId)
purgeInternals in interface AlertDefinitionManagerLocalpublic int purgeUnusedAlertDefinitions()
purgeUnusedAlertDefinitions in interface AlertDefinitionManagerLocal
public org.rhq.core.domain.alert.AlertDefinition getAlertDefinition(org.rhq.core.domain.auth.Subject subject,
int alertDefinitionId)
getAlertDefinition in interface AlertDefinitionManagerLocalgetAlertDefinition in interface AlertDefinitionManagerRemote
public 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)
findAlertDefinitionsByCriteria in interface AlertDefinitionManagerLocalfindAlertDefinitionsByCriteria in interface AlertDefinitionManagerRemote
public String[] getAlertNotificationConfigurationPreview(org.rhq.core.domain.auth.Subject sessionSubject,
org.rhq.core.domain.alert.notification.AlertNotification[] notifications)
getAlertNotificationConfigurationPreview in interface AlertDefinitionManagerLocalgetAlertNotificationConfigurationPreview in interface AlertDefinitionManagerRemote
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||