class JobSchedulerConfiguration extends AbstractConfiguration {

    void validate() {
        if (this.jobSchedulerType == null) {
            this.throwExceptionAndLogError("jobSchedulerType must not be null");
        }
        if (this.taskExecutorType == null) {
            this.throwExceptionAndLogError("taskExecutorType must not be null");
        }
        if (JobSchedulerType.CRON.equals(this.jobSchedulerType)) {
            this.validateCron();
        } else if (JobSchedulerType.PERIOD.equals(this.jobSchedulerType)) {
            this.validatePeriod();
        } else {
            this.throwExceptionAndLogError("Unknown jobSchedulerType: " + this.jobSchedulerType);
        }
    }

}