public class CalendarForm extends BaseValidatorForm
BaseValidatorForm that contains all of the properties for a start and end date.| Constructor and Description |
|---|
CalendarForm() |
| Modifier and Type | Method and Description |
|---|---|
protected int |
calcHour(String hour,
String ampm) |
String |
getEndAmPm()
Getter for property endAmPm.
|
Date |
getEndDate()
Utility method that converts the fields associated with the the end time into a date.
|
Integer |
getEndDay()
Getter for property endDay.
|
String |
getEndHour()
Getter for property endHour.
|
String |
getEndMin()
Getter for property endMin.
|
Integer |
getEndMonth()
Getter for property endMonth.
|
Integer |
getEndYear()
Getter for property endYear.
|
protected Calendar |
getInitStartTime() |
String |
getStartAmPm()
Getter for property startAmPm.
|
Date |
getStartDate()
Utility method that converts the fields associated with the the start time into a date.
|
Integer |
getStartDay()
Getter for property startDay.
|
String |
getStartHour()
Getter for property startHour.
|
String |
getStartMin()
Getter for property startMin.
|
Integer |
getStartMonth()
Getter for property startMonth.
|
Integer |
getStartYear()
Getter for property startYear.
|
boolean |
getWantEndDate()
A flag indicating whether or not end date should be checked.
|
Collection<Integer> |
getYearOptions() |
void |
populateEndDate(Date d,
Locale userLocale)
Populates the form's end date fields with a date.
|
void |
populateStartDate(Date startDate,
Locale userLocale)
Utility method that populates fields associated with the the start date.
|
void |
reset(org.apache.struts.action.ActionMapping mapping,
javax.servlet.http.HttpServletRequest request) |
void |
setEndAmPm(String endAmPm)
Setter for property endAmPm.
|
void |
setEndDay(Integer endDay)
Setter for property endDay.
|
void |
setEndHour(String endHour)
Setter for property endHour.
|
void |
setEndMin(String endMin)
Setter for property endMin.
|
void |
setEndMonth(Integer endMonth)
Setter for property endMonth.
|
void |
setEndYear(Integer endYear)
Setter for property endYear.
|
void |
setStartAmPm(String startAmPm)
Setter for property startAmPm.
|
void |
setStartDay(Integer startDay)
Setter for property startDay.
|
void |
setStartHour(String startHour)
Setter for property startHour.
|
void |
setStartMin(String startMin)
Setter for property startMin.
|
void |
setStartMonth(Integer startMonth)
Setter for property startMonth.
|
void |
setStartYear(Integer startYear)
Setter for property startYear.
|
void |
setWantEndDate(boolean b) |
protected boolean |
shouldValidateDateRange() |
String |
toString() |
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.
|
protected void |
validateDateRange(org.apache.struts.action.ActionMapping mapping,
javax.servlet.http.HttpServletRequest request,
org.apache.struts.action.ActionErrors errs) |
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, shouldValidategetPage, getResultValueMap, getValidationKey, getValidatorResults, setPage, setValidatorResultspublic static final String AM
public static final String PM
public Date getEndDate()
public void populateEndDate(Date d, Locale userLocale)
date - A java.util.Date that represents the end date.public Date getStartDate()
protected int calcHour(String hour, String ampm) throws NumberFormatException
NumberFormatExceptionpublic void populateStartDate(Date startDate, Locale userLocale)
d - A java.util.Date that represents the start date.protected Calendar getInitStartTime()
public void reset(org.apache.struts.action.ActionMapping mapping,
javax.servlet.http.HttpServletRequest request)
reset in class BaseValidatorFormpublic org.apache.struts.action.ActionErrors validate(org.apache.struts.action.ActionMapping mapping,
javax.servlet.http.HttpServletRequest request)
BaseValidatorFormvalidate in class BaseValidatorFormprotected boolean shouldValidateDateRange()
protected final void validateDateRange(org.apache.struts.action.ActionMapping mapping,
javax.servlet.http.HttpServletRequest request,
org.apache.struts.action.ActionErrors errs)
public String toString()
toString in class BaseValidatorFormpublic boolean getWantEndDate()
public void setWantEndDate(boolean b)
public Integer getEndDay()
public void setEndDay(Integer endDay)
endDay - New value of property endDay.public Integer getEndMonth()
public void setEndMonth(Integer endMonth)
endMonth - New value of property endMonth.public Integer getEndYear()
public void setEndYear(Integer endYear)
endYear - New value of property endYear.public String getEndMin()
public void setEndMin(String endMin)
endMin - New value of property endMin.public String getEndHour()
public void setEndHour(String endHour)
endHour - New value of property endHour.public Integer getStartDay()
public void setStartDay(Integer startDay)
startDay - New value of property startDay.public String getStartAmPm()
public void setStartAmPm(String startAmPm)
startAmPm - New value of property startAmPm.public String getEndAmPm()
public void setEndAmPm(String endAmPm)
endAmPm - New value of property endAmPm.public Integer getStartYear()
public void setStartYear(Integer startYear)
startYear - New value of property startYear.public String getStartMin()
public void setStartMin(String startMin)
startMin - New value of property startMin.public String getStartHour()
public void setStartHour(String startHour)
startHour - New value of property startHour.public Integer getStartMonth()
public void setStartMonth(Integer startMonth)
startMonth - New value of property startMonth.public Collection<Integer> getYearOptions()
Copyright © 2008-2013 Red Hat, Inc.. All Rights Reserved.