org.rhq.core.domain.alert
Class AlertDefinition

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

public class AlertDefinition
extends Object
implements Serializable

See Also:
Serialized Form

Field Summary
static String QUERY_DELETE_BY_RESOURCES
           
static String QUERY_FIND_ALL
           
static String QUERY_FIND_ALL_BY_RECOVERY_DEFINITION_ID
           
static String QUERY_FIND_ALL_COMPOSITES
           
static String QUERY_FIND_ALL_COMPOSITES_ADMIN
           
static String QUERY_FIND_BY_ALERT_TEMPLATE_ID
           
static String QUERY_FIND_BY_GROUP_ALERT_DEFINITION_ID
           
static String QUERY_FIND_BY_RESOURCE
           
static String QUERY_FIND_BY_RESOURCE_GROUP
           
static String QUERY_FIND_BY_RESOURCE_TYPE
           
static String QUERY_FIND_DEFINITION_ID_BY_CONDITION_ID
           
static String QUERY_FIND_OPTION_ITEMS_BY_GROUP
           
static String QUERY_FIND_OPTION_ITEMS_BY_RESOURCE
           
static String QUERY_FIND_RESOURCE_IDS_NEEDING_GROUP_APPLICATION
           
static String QUERY_FIND_RESOURCE_IDS_NEEDING_TEMPLATE_APPLICATION
           
static String QUERY_FIND_UNUSED_DEFINITION_IDS
           
static String QUERY_IS_ENABLED
           
static String QUERY_IS_GROUP_ALERT_DEFINITION
           
static String QUERY_IS_TEMPLATE
           
static String QUERY_UPDATE_SET_DELETED
           
static String QUERY_UPDATE_SET_DISABLED
           
static String QUERY_UPDATE_SET_ENABLED
           
static String QUERY_UPDATE_SET_PARENTS_NULL
           
 
Constructor Summary
AlertDefinition()
          Creates a new alert definition.
AlertDefinition(AlertDefinition alertDef)
          Creates a skeletal copy of the specified alert definition.
AlertDefinition(AlertDefinition alertDef, boolean copyIds)
           
 
Method Summary
 void addAlert(Alert alert)
           
 void addAlertNotification(AlertNotification alertNotification)
           
 void addCondition(AlertCondition condition)
           
 void calculateContext()
           
 boolean equals(Object obj)
           
 AlertDampening getAlertDampening()
           
 Set<AlertDampeningEvent> getAlertDampeningEvents()
           
 Set<AlertNotification> getAlertNotifications()
           
 Set<Alert> getAlerts()
           
 BooleanExpression getConditionExpression()
           
 Set<AlertCondition> getConditions()
           
 AlertDefinitionContext getContext()
           
 boolean getControlFiltered()
           
 long getCtime()
           
 boolean getDeleted()
           
 String getDescription()
           
 boolean getEnabled()
           
 AlertDefinition getGroupAlertDefinition()
           
 int getId()
           
 long getMtime()
           
 String getName()
           
 boolean getNotifyFiltered()
           
 OperationDefinition getOperationDefinition()
           
 Integer getParentId()
           
 AlertPriority getPriority()
           
 Integer getRecoveryId()
           
 Resource getResource()
           
 ResourceGroup getResourceGroup()
           
 ResourceType getResourceType()
           
 boolean getWillRecover()
           
 int hashCode()
           
 boolean isReadOnly()
           
 boolean removeAlertDampeningEvent(AlertDampeningEvent event)
           
 void removeAllAlertNotifications()
           
 void removeAllConditions()
           
 void setAlertDampening(AlertDampening alertDampening)
           
 void setAlertNotifications(Set<AlertNotification> alertNotifications)
           
 void setConditionExpression(BooleanExpression conditionExpression)
           
 void setConditions(Set<AlertCondition> conditions)
           
 void setContext(AlertDefinitionContext context)
           
 void setControlFiltered(boolean controlFiltered)
           
 void setDeleted(boolean deleted)
           
 void setDescription(String description)
           
 void setEnabled(boolean enabled)
           
 void setGroupAlertDefinition(AlertDefinition groupAlertDefinition)
           
 void setId(int id)
           
 void setName(String name)
           
 void setNotifyFiltered(boolean notifyFiltered)
           
 void setOperationDefinition(OperationDefinition operationDefinition)
           
 void setParentId(Integer parentId)
           
 void setPriority(AlertPriority priority)
           
 void setReadOnly(boolean readOnly)
           
 void setRecoveryId(Integer actOnTriggerId)
           
 void setResource(Resource resource)
           
 void setResourceGroup(ResourceGroup resourceGroup)
           
 void setResourceType(ResourceType resourceType)
           
 void setWillRecover(boolean willRecover)
           
 String toSimpleString()
           
 String toString()
           
 void update(AlertDefinition alertDef, boolean copyIds)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

QUERY_FIND_ALL

public static final String QUERY_FIND_ALL
See Also:
Constant Field Values

QUERY_FIND_ALL_BY_RECOVERY_DEFINITION_ID

public static final String QUERY_FIND_ALL_BY_RECOVERY_DEFINITION_ID
See Also:
Constant Field Values

QUERY_FIND_BY_ALERT_TEMPLATE_ID

public static final String QUERY_FIND_BY_ALERT_TEMPLATE_ID
See Also:
Constant Field Values

QUERY_FIND_BY_GROUP_ALERT_DEFINITION_ID

public static final String QUERY_FIND_BY_GROUP_ALERT_DEFINITION_ID
See Also:
Constant Field Values

QUERY_FIND_RESOURCE_IDS_NEEDING_TEMPLATE_APPLICATION

public static final String QUERY_FIND_RESOURCE_IDS_NEEDING_TEMPLATE_APPLICATION
See Also:
Constant Field Values

QUERY_FIND_OPTION_ITEMS_BY_RESOURCE

public static final String QUERY_FIND_OPTION_ITEMS_BY_RESOURCE
See Also:
Constant Field Values

QUERY_FIND_OPTION_ITEMS_BY_GROUP

public static final String QUERY_FIND_OPTION_ITEMS_BY_GROUP
See Also:
Constant Field Values

QUERY_FIND_BY_RESOURCE

public static final String QUERY_FIND_BY_RESOURCE
See Also:
Constant Field Values

QUERY_FIND_BY_RESOURCE_TYPE

public static final String QUERY_FIND_BY_RESOURCE_TYPE
See Also:
Constant Field Values

QUERY_FIND_BY_RESOURCE_GROUP

public static final String QUERY_FIND_BY_RESOURCE_GROUP
See Also:
Constant Field Values

QUERY_DELETE_BY_RESOURCES

public static final String QUERY_DELETE_BY_RESOURCES
See Also:
Constant Field Values

QUERY_FIND_UNUSED_DEFINITION_IDS

public static final String QUERY_FIND_UNUSED_DEFINITION_IDS
See Also:
Constant Field Values

QUERY_FIND_DEFINITION_ID_BY_CONDITION_ID

public static final String QUERY_FIND_DEFINITION_ID_BY_CONDITION_ID
See Also:
Constant Field Values

QUERY_IS_ENABLED

public static final String QUERY_IS_ENABLED
See Also:
Constant Field Values

QUERY_IS_TEMPLATE

public static final String QUERY_IS_TEMPLATE
See Also:
Constant Field Values

QUERY_IS_GROUP_ALERT_DEFINITION

public static final String QUERY_IS_GROUP_ALERT_DEFINITION
See Also:
Constant Field Values

QUERY_UPDATE_SET_DELETED

public static final String QUERY_UPDATE_SET_DELETED
See Also:
Constant Field Values

QUERY_UPDATE_SET_ENABLED

public static final String QUERY_UPDATE_SET_ENABLED
See Also:
Constant Field Values

QUERY_UPDATE_SET_DISABLED

public static final String QUERY_UPDATE_SET_DISABLED
See Also:
Constant Field Values

QUERY_UPDATE_SET_PARENTS_NULL

public static final String QUERY_UPDATE_SET_PARENTS_NULL
See Also:
Constant Field Values

QUERY_FIND_RESOURCE_IDS_NEEDING_GROUP_APPLICATION

public static final String QUERY_FIND_RESOURCE_IDS_NEEDING_GROUP_APPLICATION
See Also:
Constant Field Values

QUERY_FIND_ALL_COMPOSITES

public static final String QUERY_FIND_ALL_COMPOSITES
See Also:
Constant Field Values

QUERY_FIND_ALL_COMPOSITES_ADMIN

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

AlertDefinition

public AlertDefinition()
Creates a new alert definition.


AlertDefinition

public AlertDefinition(AlertDefinition alertDef)
Creates a skeletal copy of the specified alert definition.

Parameters:
alertDef - the alert definition to be copied

AlertDefinition

public AlertDefinition(AlertDefinition alertDef,
                       boolean copyIds)
Method Detail

update

public void update(AlertDefinition alertDef,
                   boolean copyIds)

getId

public int getId()

setId

public void setId(int id)

getName

public String getName()

setName

public void setName(String name)

getCtime

public long getCtime()

getMtime

public long getMtime()

getParentId

public Integer getParentId()

setParentId

public void setParentId(Integer parentId)

getGroupAlertDefinition

public AlertDefinition getGroupAlertDefinition()

setGroupAlertDefinition

public void setGroupAlertDefinition(AlertDefinition groupAlertDefinition)

getResource

public Resource getResource()

setResource

public void setResource(Resource resource)

getResourceGroup

public ResourceGroup getResourceGroup()

setResourceGroup

public void setResourceGroup(ResourceGroup resourceGroup)

getResourceType

public ResourceType getResourceType()

setResourceType

public void setResourceType(ResourceType resourceType)

getDescription

public String getDescription()

setDescription

public void setDescription(String description)

getPriority

public AlertPriority getPriority()

setPriority

public void setPriority(AlertPriority priority)

getEnabled

public boolean getEnabled()

setEnabled

public void setEnabled(boolean enabled)

getAlertDampening

public AlertDampening getAlertDampening()

setAlertDampening

public void setAlertDampening(AlertDampening alertDampening)

getWillRecover

public boolean getWillRecover()

setWillRecover

public void setWillRecover(boolean willRecover)

getNotifyFiltered

public boolean getNotifyFiltered()

setNotifyFiltered

public void setNotifyFiltered(boolean notifyFiltered)

getControlFiltered

public boolean getControlFiltered()

setControlFiltered

public void setControlFiltered(boolean controlFiltered)

getRecoveryId

public Integer getRecoveryId()

setRecoveryId

public void setRecoveryId(Integer actOnTriggerId)

getDeleted

public boolean getDeleted()

setDeleted

public void setDeleted(boolean deleted)

isReadOnly

public boolean isReadOnly()

setReadOnly

public void setReadOnly(boolean readOnly)

getConditionExpression

public BooleanExpression getConditionExpression()

setConditionExpression

public void setConditionExpression(BooleanExpression conditionExpression)

getConditions

public Set<AlertCondition> getConditions()

setConditions

public void setConditions(Set<AlertCondition> conditions)

addCondition

public void addCondition(AlertCondition condition)

removeAllConditions

public void removeAllConditions()

getAlerts

public Set<Alert> getAlerts()

addAlert

public void addAlert(Alert alert)

getAlertNotifications

public Set<AlertNotification> getAlertNotifications()

setAlertNotifications

public void setAlertNotifications(Set<AlertNotification> alertNotifications)

addAlertNotification

public void addAlertNotification(AlertNotification alertNotification)

removeAllAlertNotifications

public void removeAllAlertNotifications()

getOperationDefinition

public OperationDefinition getOperationDefinition()

setOperationDefinition

public void setOperationDefinition(OperationDefinition operationDefinition)

getAlertDampeningEvents

public Set<AlertDampeningEvent> getAlertDampeningEvents()

removeAlertDampeningEvent

public boolean removeAlertDampeningEvent(AlertDampeningEvent event)

calculateContext

public void calculateContext()

setContext

public void setContext(AlertDefinitionContext context)

getContext

public AlertDefinitionContext getContext()

equals

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

hashCode

public int hashCode()
Overrides:
hashCode in class Object

toSimpleString

public String toSimpleString()

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2008-2009 RHQ Project Advisory Board (Red Hat, Inc.). All Rights Reserved.