private void validateDisbursementDateWithMeetingDates( final LocalDate expectedDisbursementDate, final Calendar calendar) { // disbursement date should fall on a meeting date if (!CalendarHelper.isValidRedurringDate( calendar.getRecurrence(), calendar.getStartDateLocalDate(), expectedDisbursementDate)) { final String errorMessage = "Expected disbursement date '" + expectedDisbursementDate + "' do not fall on a meeting date"; throw new LoanApplicationDateException( "disbursement.date.do.not.match.meeting.date", errorMessage, expectedDisbursementDate); } }
private void validateRepaymentsStartDateWithMeetingDates( final LocalDate repaymentsStartingFromDate, final Calendar calendar) { if (repaymentsStartingFromDate != null && !CalendarHelper.isValidRedurringDate( calendar.getRecurrence(), calendar.getStartDateLocalDate(), repaymentsStartingFromDate)) { final String errorMessage = "First repayment date '" + repaymentsStartingFromDate + "' do not fall on a meeting date"; throw new LoanApplicationDateException( "first.repayment.date.do.not.match.meeting.date", errorMessage, repaymentsStartingFromDate); } }