All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.github.kunalk16.excel.file.validation.AbstractExcelFileValidator Maven / Gradle / Ivy

There is a newer version: 1.0.2
Show newest version
package com.github.kunalk16.excel.file.validation;

abstract class AbstractExcelFileValidator implements ExcelFileValidator {
    private final ExcelFileValidator nextExcelFileValidator;

    AbstractExcelFileValidator(ExcelFileValidator nextExcelFileValidator) {
        this.nextExcelFileValidator = nextExcelFileValidator;
    }

    public boolean validate(String filePath) {
        if (this.validateFile(filePath)) {
            if (this.nextExcelFileValidator != null) {
                return this.nextExcelFileValidator.validate(filePath);
            }
            return true;
        }

        return false;
    }

    protected abstract boolean validateFile(String filePath);
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy