Package com.portal.web.fmt
Class DateValidator
java.lang.Object
com.portal.web.fmt.DateValidator
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
EventSearchValidator
Performs date validation on input date ranges.
If errors occur, it throws a
RemoteException with the error.
If no errors occur, it calls the appropriate method in the controller and
sets the input data, specifically, the start time and end time.- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidsetEndDate(String sDate) Sets the input data "end date."voidSets the input data "end day."voidsetEndMonth(String sMonth) Sets the input data "end month."voidsetEndYear(String sYear) Sets the input data "end year."voidsetStartDate(String sDate) Sets the input data "start date."voidsetStartDay(String sDay) Sets the optional input data "start day."voidsetStartMonth(String sMonth) Sets the input data "start month."voidsetStartYear(String sYear) Sets the input data "start year."voidvalidate(ResourceBundle bundle, PControllerBean cb) Validates the dates.voidvalidate(ResourceBundle bundle, PControllerBean cb, javax.servlet.http.HttpSession session) Validates the dates from an HTTP session.
-
Constructor Details
-
DateValidator
public DateValidator()
-
-
Method Details
-
setStartYear
Sets the input data "start year."- Parameters:
sStartYear- aStringwith the start year value
-
setEndYear
Sets the input data "end year."- Parameters:
sEndYear- aStringwith the end year value
-
setStartMonth
Sets the input data "start month."- Parameters:
sStartMonth- aStringwith the start month value
-
setEndMonth
Sets the input data "end month."- Parameters:
sEndMonth- aStringwith the end month value
-
setStartDay
Sets the optional input data "start day."- Parameters:
sStartDay- aStringwith the start day value
-
setEndDay
Sets the input data "end day."- Parameters:
sEndDay- aStringwith the end day value
-
setStartDate
Sets the input data "start date."- Parameters:
sStartDate- aStringwith the start date value
-
setEndDate
Sets the input data "end date."- Parameters:
sEndDate- aStringwith the end date value
-
validate
Validates the dates.- Parameters:
bundle- the resource bundlecb- the controller bean- Throws:
RemoteException- thrown for errors
-
validate
public void validate(ResourceBundle bundle, PControllerBean cb, javax.servlet.http.HttpSession session) throws RemoteException Validates the dates from an HTTP session.- Parameters:
bundle- the resource bundlecb- the controller beansession- the HTTP session- Throws:
RemoteException- thrown if the date format is invalid or if start time is greater than the end time
-