org.rhq.enterprise.gui.legacy.action.resource.common.monitor.alerts.config
Class DefinitionForm

java.lang.Object
  extended by org.apache.struts.action.ActionForm
      extended by org.apache.struts.validator.ValidatorForm
          extended by org.rhq.enterprise.gui.legacy.action.BaseValidatorForm
              extended by org.rhq.enterprise.gui.legacy.action.CalendarForm
                  extended by org.rhq.enterprise.gui.legacy.action.ScheduleForm
                      extended by org.rhq.enterprise.gui.legacy.action.resource.ResourceForm
                          extended by org.rhq.enterprise.gui.legacy.action.resource.common.monitor.alerts.config.DefinitionForm
All Implemented Interfaces:
Serializable

public final class DefinitionForm
extends ResourceForm

Form for editing / creating new alert definitions.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class org.rhq.enterprise.gui.legacy.action.resource.ResourceForm
ResourceForm.FormContext
 
Field Summary
 
Fields inherited from class org.rhq.enterprise.gui.legacy.action.ScheduleForm
END_NEVER, END_ON_DATE, EVERY_DAY, EVERY_WEEKDAY, ON_DAY, ON_EACH, RECUR_DAILY, RECUR_MONTHLY, RECUR_NEVER, RECUR_WEEKLY, START_NOW, START_ON_DATE
 
Fields inherited from class org.rhq.enterprise.gui.legacy.action.CalendarForm
AM, PM
 
Fields inherited from class org.apache.struts.validator.ValidatorForm
page, validatorResults
 
Fields inherited from class org.apache.struts.action.ActionForm
multipartRequestHandler, servlet
 
Constructor Summary
DefinitionForm()
           
 
Method Summary
 void deleteCondition(int deletedCondition)
           
 void exportConditionsEnablement(org.rhq.core.domain.alert.AlertDefinition alertDef, javax.servlet.http.HttpServletRequest request, org.rhq.core.domain.auth.Subject subject)
          Export the conditions and enablement properties from this form to the specified alert def.
 void exportProperties(org.rhq.core.domain.alert.AlertDefinition alertDef)
          Export basic properties from this form to the AlertDefinitionValue.
 Integer getAd()
           
 Collection<Map.Entry<String,Integer>> getAlertnames()
           
 OptionItem[] getAvailabilityOptions()
           
 Collection getBaselines()
           
 int getCallTimeMetricId()
           
 String getCallTimeMetricName()
           
 List<org.rhq.core.domain.measurement.MeasurementDefinition> getCalltimeMetrics()
           
 String[] getCalltimeOperators()
           
 String[] getCalltimeOptions()
           
 String[] getComparators()
           
 ConditionBean getCondition(int index)
           
 String getConditionExpression()
           
 Collection<Map.Entry<String,String>> getConditionExpressionNames()
           
 ConditionBean[] getConditions()
           
 String getConsecutiveCountValue()
           
 String[] getControlActionStatuses()
           
 int getDeletedCondition()
           
 String getDescription()
          Returns the description.
 String getDurationCountPeriod()
           
 int getDurationCountPeriodUnits()
           
 String getDurationCountValue()
           
 String[] getEventSeverities()
           
 String getInverseCountValue()
           
 int getMetricId()
           
 String getMetricName()
           
 List<org.rhq.core.domain.measurement.MeasurementDefinition> getMetrics()
           
 String getName()
          Returns the name.
 int getNumConditions()
           
 String getPartialCountPeriod()
           
 String getPartialCountValue()
           
 int[] getPriorities()
           
 int getPriority()
           
 boolean getReadOnly()
           
 int getRecoverId()
           
 int[] getTimeUnits()
           
 List<org.rhq.core.domain.measurement.MeasurementDefinition> getTraits()
           
 int getWhenEnabled()
          Get when to enable the actions.
 void importConditionsEnablement(org.rhq.core.domain.alert.AlertDefinition alertDef, org.rhq.core.domain.auth.Subject subject)
          Import the conditions and enablement properties from the AlertDefinitionValue to this form.
 void importProperties(org.rhq.core.domain.alert.AlertDefinition alertDef)
          Import basic properties from The AlertDefinitionValue to this form.
 boolean isActive()
           
 boolean isAddingCondition()
           
 boolean isDisableForRecovery()
           
 boolean isFilteringControlActions()
           
 boolean isFilteringNotificationActions()
           
 boolean isReadOnly()
           
 boolean isResourceConfigurationSupported()
           
 void reset(org.apache.struts.action.ActionMapping mapping, javax.servlet.http.HttpServletRequest request)
           
 void resetConditions()
           
 void setActive(boolean active)
           
 void setAd(Integer ad)
           
 void setAddingCondition(boolean addingCondition)
           
 void setAlertnames(Collection<Map.Entry<String,Integer>> alertnames)
           
 void setAvailabilityActions(List<OptionItem> availabilityActions)
           
 void setBaselines(Collection baselines)
           
 void setCallTimeMetricId(int callTimeMetricId)
           
 void setCallTimeMetricName(String callTimeMetricName)
           
 void setCalltimeMetrics(List<org.rhq.core.domain.measurement.MeasurementDefinition> calltimeMetrics)
           
 void setCalltimeOperators(String[] calltimeOperators)
           
 void setCalltimeOptions(String[] calltimeOptions)
           
 void setConditionExpression(String conditionExpression)
           
 void setConditionExpressionNames(Collection<Map.Entry<String,String>> conditionExpressionNames)
           
 void setConsecutiveCountValue(String consecutiveTimes)
           
 void setDeletedCondition(int deletedCondition)
           
 void setDescription(String description)
          Sets the description.
 void setDisableForRecovery(boolean disableForRecovery)
           
 void setDurationCountPeriod(String durationCountPeriod)
           
 void setDurationCountPeriodUnits(int durationCountPeriodUnits)
           
 void setDurationCountValue(String durationCountValue)
           
 void setFilteringControlActions(boolean filteringControlActions)
           
 void setFilteringNotificationActions(boolean filteringNotificationActions)
           
 void setInverseCountValue(String inverseCountValue)
           
 void setMetricId(int metricId)
           
 void setMetricName(String metricName)
           
 void setMetrics(List<org.rhq.core.domain.measurement.MeasurementDefinition> metrics)
           
 void setName(String name)
          sets the name.
 void setNumConditions(int numConditions)
           
 void setPartialCountPeriod(String partialCountPeriod)
           
 void setPartialCountValue(String partialCountValue)
           
 void setPriority(int priority)
           
 void setReadOnly(boolean readOnly)
           
 void setRecoverId(int recoverId)
           
 void setResourceConfigurationSupported(boolean resourceConfigurationSupported)
           
 void setTraits(List<org.rhq.core.domain.measurement.MeasurementDefinition> traits)
           
 void setWhenEnabled(int whenEnabled)
           
 org.apache.struts.action.ActionErrors validate(org.apache.struts.action.ActionMapping mapping, javax.servlet.http.HttpServletRequest request)
          Only validate if 1) the form's ok or okassign button was clicked and 2) the mapping specifies an input form to return to.
 
Methods inherited from class org.rhq.enterprise.gui.legacy.action.resource.ResourceForm
getContext, getGroupId, getId, getLocation, getResourceType, getResourceTypes, getRid, getType, loadResourceValue, setGroupId, setId, setLocation, setResourceType, setResourceTypes, setRid, setType, toString, updateResourceValue
 
Methods inherited from class org.rhq.enterprise.gui.legacy.action.ScheduleForm
getControlActions, getEachDay, getEndTime, getIsNow, getMonthlyRecurrenceDay, getNumControlActions, getNumDays, getNumMonths, getNumWeeks, getRecurInterval, getRecurrenceDay, getRecurrenceFrequencyDaily, getRecurrenceFrequencyMonthly, getRecurrenceWeek, getStartTime, setControlActions, setEachDay, setEndTime, setMonthlyRecurrenceDay, setNumDays, setNumMonths, setNumWeeks, setRecurInterval, setRecurrenceDay, setRecurrenceFrequencyDaily, setRecurrenceFrequencyMonthly, setRecurrenceWeek, setStartTime
 
Methods inherited from class org.rhq.enterprise.gui.legacy.action.CalendarForm
calcHour, getEndAmPm, getEndDate, getEndDay, getEndHour, getEndMin, getEndMonth, getEndYear, getInitStartTime, getStartAmPm, getStartDate, getStartDay, getStartHour, getStartMin, getStartMonth, getStartYear, getWantEndDate, getYearOptions, populateEndDate, populateStartDate, setEndAmPm, setEndDay, setEndHour, setEndMin, setEndMonth, setEndYear, setStartAmPm, setStartDay, setStartHour, setStartMin, setStartMonth, setStartYear, setWantEndDate, shouldValidateDateRange, validateDateRange
 
Methods inherited from class org.rhq.enterprise.gui.legacy.action.BaseValidatorForm
getAdd, getCancel, getCreate, getDelete, getEnable, getInstall, getManualUninstall, getOk, getOkassign, getPn, getPs, getRemove, getReset, getUninventory, getUserset, isAddClicked, isCancelClicked, isCreateClicked, isDeleteClicked, isEnableClicked, isInstallClicked, isManualUninstallClicked, isOkAssignClicked, isOkClicked, isRemoveClicked, isResetClicked, isUsersetClicked, setAdd, setCancel, setCreate, setDelete, setEnable, setInstall, setOk, setOkassign, setPn, setPs, setRemove, setReset, setUninventory, setUserset, shouldValidate
 
Methods inherited from class org.apache.struts.validator.ValidatorForm
getPage, getResultValueMap, getValidationKey, getValidatorResults, setPage, setValidatorResults
 
Methods inherited from class org.apache.struts.action.ActionForm
getMultipartRequestHandler, getServlet, getServletWrapper, reset, setMultipartRequestHandler, setServlet, validate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DefinitionForm

public DefinitionForm()
Method Detail

getAd

public Integer getAd()

setAd

public void setAd(Integer ad)

getName

public String getName()
Description copied from class: ResourceForm
Returns the name.

Overrides:
getName in class ResourceForm
Returns:
String

setName

public void setName(String name)
Description copied from class: ResourceForm
sets the name.

Overrides:
setName in class ResourceForm

getDescription

public String getDescription()
Description copied from class: ResourceForm
Returns the description.

Overrides:
getDescription in class ResourceForm
Returns:
String

setDescription

public void setDescription(String description)
Description copied from class: ResourceForm
Sets the description.

Overrides:
setDescription in class ResourceForm
Parameters:
description - The description to set

getPriority

public int getPriority()

setPriority

public void setPriority(int priority)

isActive

public boolean isActive()

setActive

public void setActive(boolean active)

getRecoverId

public int getRecoverId()
Returns:
Returns the recoverId.

setRecoverId

public void setRecoverId(int recoverId)
Parameters:
recoverId - The recoverId to set.

getConditions

public ConditionBean[] getConditions()

getCondition

public ConditionBean getCondition(int index)

getMetricId

public int getMetricId()

setMetricId

public void setMetricId(int metricId)

getMetricName

public String getMetricName()

setMetricName

public void setMetricName(String metricName)

getCallTimeMetricId

public int getCallTimeMetricId()

setCallTimeMetricId

public void setCallTimeMetricId(int callTimeMetricId)

getCallTimeMetricName

public String getCallTimeMetricName()

setCallTimeMetricName

public void setCallTimeMetricName(String callTimeMetricName)

getNumConditions

public int getNumConditions()

setNumConditions

public void setNumConditions(int numConditions)

getWhenEnabled

public int getWhenEnabled()
Get when to enable the actions.


setWhenEnabled

public void setWhenEnabled(int whenEnabled)

getPartialCountValue

public String getPartialCountValue()

setPartialCountValue

public void setPartialCountValue(String partialCountValue)

getPartialCountPeriod

public String getPartialCountPeriod()

setPartialCountPeriod

public void setPartialCountPeriod(String partialCountPeriod)

getDurationCountValue

public String getDurationCountValue()

setDurationCountValue

public void setDurationCountValue(String durationCountValue)

getDurationCountPeriod

public String getDurationCountPeriod()

setDurationCountPeriod

public void setDurationCountPeriod(String durationCountPeriod)

getDurationCountPeriodUnits

public int getDurationCountPeriodUnits()

setDurationCountPeriodUnits

public void setDurationCountPeriodUnits(int durationCountPeriodUnits)

isDisableForRecovery

public boolean isDisableForRecovery()
Returns:
Returns the disableForRecovery.

setDisableForRecovery

public void setDisableForRecovery(boolean disableForRecovery)
Parameters:
disableForRecovery - The disableForRecovery to set.

isFilteringControlActions

public boolean isFilteringControlActions()

setFilteringControlActions

public void setFilteringControlActions(boolean filteringControlActions)

isFilteringNotificationActions

public boolean isFilteringNotificationActions()

setFilteringNotificationActions

public void setFilteringNotificationActions(boolean filteringNotificationActions)

isAddingCondition

public boolean isAddingCondition()

setAddingCondition

public void setAddingCondition(boolean addingCondition)

getDeletedCondition

public int getDeletedCondition()

setDeletedCondition

public void setDeletedCondition(int deletedCondition)

deleteCondition

public void deleteCondition(int deletedCondition)

getBaselines

public Collection getBaselines()

setBaselines

public void setBaselines(Collection baselines)

getMetrics

public List<org.rhq.core.domain.measurement.MeasurementDefinition> getMetrics()

setMetrics

public void setMetrics(List<org.rhq.core.domain.measurement.MeasurementDefinition> metrics)

getTraits

public List<org.rhq.core.domain.measurement.MeasurementDefinition> getTraits()

setTraits

public void setTraits(List<org.rhq.core.domain.measurement.MeasurementDefinition> traits)

getAlertnames

public Collection<Map.Entry<String,Integer>> getAlertnames()
Returns:
Returns the alertnames.

setAlertnames

public void setAlertnames(Collection<Map.Entry<String,Integer>> alertnames)
Parameters:
alertnames - The alertnames to set.

getControlActionStatuses

public String[] getControlActionStatuses()

getEventSeverities

public String[] getEventSeverities()

getAvailabilityOptions

public OptionItem[] getAvailabilityOptions()

getPriorities

public int[] getPriorities()

getTimeUnits

public int[] getTimeUnits()

getComparators

public String[] getComparators()

reset

public void reset(org.apache.struts.action.ActionMapping mapping,
                  javax.servlet.http.HttpServletRequest request)
Overrides:
reset in class ResourceForm

importProperties

public void importProperties(org.rhq.core.domain.alert.AlertDefinition alertDef)
Import basic properties from The AlertDefinitionValue to this form.

Parameters:
alertDef -

exportProperties

public void exportProperties(org.rhq.core.domain.alert.AlertDefinition alertDef)
Export basic properties from this form to the AlertDefinitionValue.

Parameters:
alertDef -

importConditionsEnablement

public void importConditionsEnablement(org.rhq.core.domain.alert.AlertDefinition alertDef,
                                       org.rhq.core.domain.auth.Subject subject)
                                throws Exception
Import the conditions and enablement properties from the AlertDefinitionValue to this form.

Throws:
Exception

exportConditionsEnablement

public void exportConditionsEnablement(org.rhq.core.domain.alert.AlertDefinition alertDef,
                                       javax.servlet.http.HttpServletRequest request,
                                       org.rhq.core.domain.auth.Subject subject)
                                throws Exception
Export the conditions and enablement properties from this form to the specified alert def.

Throws:
Exception

resetConditions

public void resetConditions()

validate

public org.apache.struts.action.ActionErrors validate(org.apache.struts.action.ActionMapping mapping,
                                                      javax.servlet.http.HttpServletRequest request)
Description copied from class: BaseValidatorForm
Only validate if 1) the form's ok or okassign button was clicked and 2) the mapping specifies an input form to return to. condition #2 can be false when a form has failed validation and has forwarded to the input page; the ok button request parameter will still be userset, but the prepare action for the input page will not have (another) input page specified.

Overrides:
validate in class ResourceForm

setAvailabilityActions

public void setAvailabilityActions(List<OptionItem> availabilityActions)

getConditionExpression

public String getConditionExpression()

setConditionExpression

public void setConditionExpression(String conditionExpression)

getConditionExpressionNames

public Collection<Map.Entry<String,String>> getConditionExpressionNames()

setConditionExpressionNames

public void setConditionExpressionNames(Collection<Map.Entry<String,String>> conditionExpressionNames)

isResourceConfigurationSupported

public boolean isResourceConfigurationSupported()

setResourceConfigurationSupported

public void setResourceConfigurationSupported(boolean resourceConfigurationSupported)

getConsecutiveCountValue

public String getConsecutiveCountValue()

setConsecutiveCountValue

public void setConsecutiveCountValue(String consecutiveTimes)

getInverseCountValue

public String getInverseCountValue()

setInverseCountValue

public void setInverseCountValue(String inverseCountValue)

isReadOnly

public boolean isReadOnly()

getReadOnly

public boolean getReadOnly()

setReadOnly

public void setReadOnly(boolean readOnly)

getCalltimeMetrics

public List<org.rhq.core.domain.measurement.MeasurementDefinition> getCalltimeMetrics()

setCalltimeMetrics

public void setCalltimeMetrics(List<org.rhq.core.domain.measurement.MeasurementDefinition> calltimeMetrics)

getCalltimeOptions

public String[] getCalltimeOptions()

setCalltimeOptions

public void setCalltimeOptions(String[] calltimeOptions)

getCalltimeOperators

public String[] getCalltimeOperators()

setCalltimeOperators

public void setCalltimeOperators(String[] calltimeOperators)


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