Class WorkbookMaxRowValidator
- java.lang.Object
-
- com.hybris.backoffice.excel.validators.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 Summary
Fields Modifier and Type Field Description static java.lang.StringBACKOFFICE_EXCEL_IMPORT_MAX_ROWS_PROPERTY_KEYstatic intDEFAULT_MAX_ROWstatic intFIRST_DATA_ROW_INDEX
-
Constructor Summary
Constructors Constructor Description WorkbookMaxRowValidator()
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description ExcelCellServicegetExcelCellService()ExcelSheetServicegetExcelSheetService()ExcelTemplateServicegetExcelTemplateService()Deprecated, for removal: This API element is subject to removal in a future version.since 1808.protected java.lang.IntegergetMaxRow()protected intgetNumberOfCorrectRows(org.apache.poi.ss.usermodel.Sheet sheet)protected booleanisRowCorrect(org.apache.poi.ss.usermodel.Row row)protected java.util.List<ExcelValidationResult>prepareResult(int totalNumberOfRows)voidsetExcelCellService(ExcelCellService excelCellService)voidsetExcelSheetService(ExcelSheetService excelSheetService)voidsetExcelTemplateService(ExcelTemplateService excelTemplateService)Deprecated, for removal: This API element is subject to removal in a future version.since 1808.java.util.List<ExcelValidationResult>validate(org.apache.poi.ss.usermodel.Workbook workbook)Validates workbook.
-
-
-
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
-
DEFAULT_MAX_ROW
public static final int DEFAULT_MAX_ROW
- See Also:
- Constant Field Values
-
FIRST_DATA_ROW_INDEX
public static final int FIRST_DATA_ROW_INDEX
- See Also:
- Constant Field Values
-
-
Method Detail
-
validate
public java.util.List<ExcelValidationResult> validate(org.apache.poi.ss.usermodel.Workbook workbook)
Description copied from interface:WorkbookValidatorValidates workbook. If workbook doesn't have validation issues then empty list should be returned.- Specified by:
validatein interfaceWorkbookValidator- 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.
-
getExcelSheetService
public ExcelSheetService getExcelSheetService()
-
setExcelSheetService
public void setExcelSheetService(ExcelSheetService excelSheetService)
-
getExcelCellService
public ExcelCellService getExcelCellService()
-
setExcelCellService
public void setExcelCellService(ExcelCellService excelCellService)
-
-