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 TypeMethodDescriptionvoid
setEndDate
(String sDate) Sets the input data "end date."void
Sets the input data "end day."void
setEndMonth
(String sMonth) Sets the input data "end month."void
setEndYear
(String sYear) Sets the input data "end year."void
setStartDate
(String sDate) Sets the input data "start date."void
setStartDay
(String sDay) Sets the optional input data "start day."void
setStartMonth
(String sMonth) Sets the input data "start month."void
setStartYear
(String sYear) Sets the input data "start year."void
validate
(ResourceBundle bundle, PControllerBean cb) Validates the dates.void
validate
(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
- aString
with the start year value
-
setEndYear
Sets the input data "end year."- Parameters:
sEndYear
- aString
with the end year value
-
setStartMonth
Sets the input data "start month."- Parameters:
sStartMonth
- aString
with the start month value
-
setEndMonth
Sets the input data "end month."- Parameters:
sEndMonth
- aString
with the end month value
-
setStartDay
Sets the optional input data "start day."- Parameters:
sStartDay
- aString
with the start day value
-
setEndDay
Sets the input data "end day."- Parameters:
sEndDay
- aString
with the end day value
-
setStartDate
Sets the input data "start date."- Parameters:
sStartDate
- aString
with the start date value
-
setEndDate
Sets the input data "end date."- Parameters:
sEndDate
- aString
with 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
-