org.rhq.enterprise.gui.legacy.action.resource
Class ResourceForm

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
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
AddNotificationsForm, AddResourcesForm, ControlActionForm, DefinitionForm, EditMetricBaselineForm, MonitoringConfigForm, RemoveDefinitionForm, RemoveForm, RemoveNotificationsForm

public class ResourceForm
extends ScheduleForm

A subclass of BaseValidatorForm that adds convenience methods for dealing with appdef resource objects like Platform Server, & Service.

See Also:
Serialized Form

Nested Class Summary
static class 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
ResourceForm()
           
 
Method Summary
 ResourceForm.FormContext getContext()
           
 String getDescription()
          Returns the description.
 Integer getGroupId()
           
 Integer getId()
           
 String getLocation()
          Returns the location.
 String getName()
          Returns the name.
 Integer getResourceType()
          Returns the resourceType.
 List getResourceTypes()
          Returns the resourceTypes.
 Integer getRid()
          Returns the rid.
 Integer getType()
           
 void loadResourceValue(org.rhq.core.domain.resource.Resource resource)
          loads the server value
 void reset(org.apache.struts.action.ActionMapping mapping, javax.servlet.http.HttpServletRequest request)
           
 void setDescription(String description)
          Sets the description.
 void setGroupId(Integer groupId)
           
 void setId(Integer id)
           
 void setLocation(String location)
          Sets the location.
 void setName(String name)
          sets the name.
 void setResourceType(Integer resourceType)
          Sets the resourceType.
 void setResourceTypes(List resourceTypes)
          Sets the resourceTypes.
 void setRid(Integer rid)
          Sets the rid.
 void setType(Integer type)
           
 String toString()
           
 void updateResourceValue(org.rhq.core.domain.resource.Resource resource)
          loads the server value
 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.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

ResourceForm

public ResourceForm()
Method Detail

getName

public String getName()
Returns the name.

Returns:
String

setName

public void setName(String name)
sets the name.


getDescription

public String getDescription()
Returns the description.

Returns:
String

setDescription

public void setDescription(String description)
Sets the description.

Parameters:
description - The description to set

getLocation

public String getLocation()
Returns the location.

Returns:
Integer

setLocation

public void setLocation(String location)
Sets the location.

Parameters:
location - The location to set

getResourceTypes

public List getResourceTypes()
Returns the resourceTypes.

Returns:
List

setResourceTypes

public void setResourceTypes(List resourceTypes)
Sets the resourceTypes.

Parameters:
resourceTypes - The resourceTypes to set

getResourceType

public Integer getResourceType()
Returns the resourceType.

Returns:
Integer

setResourceType

public void setResourceType(Integer resourceType)
Sets the resourceType.

Parameters:
resourceType - The resourceType to set

getRid

public Integer getRid()
Returns the rid.

Returns:
String

setRid

public void setRid(Integer rid)
Sets the rid.

Parameters:
rid - The rid to set

loadResourceValue

public void loadResourceValue(org.rhq.core.domain.resource.Resource resource)
loads the server value


updateResourceValue

public void updateResourceValue(org.rhq.core.domain.resource.Resource resource)
loads the server value


reset

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

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 ScheduleForm

toString

public String toString()
Overrides:
toString in class ScheduleForm

getId

public Integer getId()

setId

public void setId(Integer id)

getType

public Integer getType()

setType

public void setType(Integer type)

getGroupId

public Integer getGroupId()

setGroupId

public void setGroupId(Integer groupId)

getContext

public ResourceForm.FormContext getContext()


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