Class WorkbookMaxRowValidator

java.lang.Object
com.hybris.backoffice.excel.validators.WorkbookMaxRowValidator
All Implemented Interfaces:
WorkbookValidator

public class WorkbookMaxRowValidator extends 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 Details

  • Constructor Details

    • WorkbookMaxRowValidator

      public WorkbookMaxRowValidator()
  • Method Details

    • validate

      public 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 Integer getMaxRow()
    • prepareResult

      protected 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.
    • getExcelSheetService

      public ExcelSheetService getExcelSheetService()
    • setExcelSheetService

      public void setExcelSheetService(ExcelSheetService excelSheetService)
    • getExcelCellService

      public ExcelCellService getExcelCellService()
    • setExcelCellService

      public void setExcelCellService(ExcelCellService excelCellService)