cst.loggingTool.presentationLayer
Class DateFieldViewValidationUtility

java.lang.Object
  extended by cst.loggingTool.presentationLayer.DateFieldViewValidationUtility

public class DateFieldViewValidationUtility
extends java.lang.Object


 Copyright 2010 Medical Research Council Unit for Lifelong Health and Ageing
 Licensed under the Apache License, Version 2.0 (the "License");
 you may not use this file except in compliance with the License.
 You may obtain a copy of the License at
      http://www.apache.org/licenses/LICENSE-2.0
 Unless required by applicable law or agreed to in writing, software 
 distributed under the License is distributed on an "AS IS" BASIS,
 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 See the License for the specific language governing permissions and
 limitations under the License.  
 

Version:
1.0
Author:
Kevin Garwood (kgarwood@users.sourceforge.net)

Constructor Summary
DateFieldViewValidationUtility(SessionProperties sessionProperties, boolean useStrictValidation)
           
 
Method Summary
 CSTException validateChronology(TrialActivityModel trialActivityModel, java.util.ArrayList<DateFieldView> dateFieldViews)
          checks that the field values are in chronological order where the date values are step1 >= step2 >= step3 ....
 CSTException validateDateFieldViews(TrialActivityModel candidateTrialActivityModel, java.util.ArrayList<DateFieldView> dateFieldViews)
           
 CSTException validateDateValues(java.util.ArrayList<DateFieldView> dateFieldViews)
          check that all the date field values are valid.
 CSTException validateSequenceOfSteps(java.util.ArrayList<DateFieldView> dateFieldViews)
          checks that fields have not been populated in an incorrect order
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DateFieldViewValidationUtility

public DateFieldViewValidationUtility(SessionProperties sessionProperties,
                                      boolean useStrictValidation)
Method Detail

validateDateFieldViews

public CSTException validateDateFieldViews(TrialActivityModel candidateTrialActivityModel,
                                           java.util.ArrayList<DateFieldView> dateFieldViews)

validateChronology

public CSTException validateChronology(TrialActivityModel trialActivityModel,
                                       java.util.ArrayList<DateFieldView> dateFieldViews)
checks that the field values are in chronological order where the date values are step1 >= step2 >= step3 ....


validateSequenceOfSteps

public CSTException validateSequenceOfSteps(java.util.ArrayList<DateFieldView> dateFieldViews)
checks that fields have not been populated in an incorrect order

Parameters:
dateFieldViews -
Returns:

validateDateValues

public CSTException validateDateValues(java.util.ArrayList<DateFieldView> dateFieldViews)
check that all the date field values are valid. This method is intended to detect errors such as specifying too many days for a given month.

Parameters:
dateFieldViews -
Returns: