private String validatePattern ( ) { String error = null ; switch ( getPatternType ( ) ) { case DAILY : error = isEveryWorkingDay ( ) ? null : validateInterval ( ) ; break ; case WEEKLY : error = validateInterval ( ) ; if ( null == error ) { error = validateWeekDaySet ( ) ; } break ; case MONTHLY : error = validateInterval ( ) ; if ( null == error ) { error = validateMonthSet ( ) ; if ( null == error ) { error = isWeekDaySet ( ) ? validateWeekOfMonthSet ( ) : validateDayOfMonth ( ) ; } } break ; case YEARLY : error = isWeekDaySet ( ) ? validateWeekOfMonthSet ( ) : validateDayOfMonth ( ) ; break ; case INDIVIDUAL : case NONE : default : } return error ; }
Check if all values used for calculating the series for a specific pattern are valid .