Class WorkbookMaxRowValidator

  • All Implemented Interfaces:
    WorkbookValidator

    public class WorkbookMaxRowValidator
    extends java.lang.Object
    implements WorkbookValidator
    Default excel validator for max row. The validator checks whether total number of rows is less than max row indicated in 'backoffice.excel.import.max.rows' property.
    • Field Detail

      • BACKOFFICE_EXCEL_IMPORT_MAX_ROWS_PROPERTY_KEY

        public static final java.lang.String BACKOFFICE_EXCEL_IMPORT_MAX_ROWS_PROPERTY_KEY
        See Also:
        Constant Field Values
    • Constructor Detail

      • WorkbookMaxRowValidator

        public WorkbookMaxRowValidator()
    • Method Detail

      • validate

        public java.util.List<ExcelValidationResult> validate​(org.apache.poi.ss.usermodel.Workbook workbook)
        Description copied from interface: WorkbookValidator
        Validates workbook. If workbook doesn't have validation issues then empty list should be returned.
        Specified by:
        validate in interface WorkbookValidator
        Returns:
        list of validation results. If workbook doesn't have validation issues then empty list should be returned.
      • getMaxRow

        protected java.lang.Integer getMaxRow()
      • prepareResult

        protected java.util.List<ExcelValidationResult> prepareResult​(int totalNumberOfRows)
      • getNumberOfCorrectRows

        protected int getNumberOfCorrectRows​(org.apache.poi.ss.usermodel.Sheet sheet)
      • isRowCorrect

        protected boolean isRowCorrect​(org.apache.poi.ss.usermodel.Row row)
      • getExcelTemplateService

        @Deprecated(since="1808",
                    forRemoval=true)
        public ExcelTemplateService getExcelTemplateService()
        Deprecated, for removal: This API element is subject to removal in a future version.
        since 1808.
      • setExcelTemplateService

        @Deprecated(since="1808",
                    forRemoval=true)
        public void setExcelTemplateService​(ExcelTemplateService excelTemplateService)
        Deprecated, for removal: This API element is subject to removal in a future version.
        since 1808.
      • setExcelSheetService

        public void setExcelSheetService​(ExcelSheetService excelSheetService)
      • setExcelCellService

        public void setExcelCellService​(ExcelCellService excelCellService)