T - subclass of ExcelAttributepublic interface ExcelAttributeValidator<T extends ExcelAttribute>
ImportParameters. An implementation of this interface should use parsed values from to validate
user's input. Each instance of AbstractExcelImportWorkbookDecorator contains list of
ExcelAttributeValidator and appropriate validators are chosen based on
canHandle(ExcelAttribute, ImportParameters) method. If
canHandle(ExcelAttribute, ImportParameters) returns true then
validate(ExcelAttribute, ImportParameters, Map) method will be invoked.| Modifier and Type | Method and Description |
|---|---|
boolean |
canHandle(T excelAttribute,
ImportParameters importParameters)
Indicates whether validator is able to validate given cell value.
|
ExcelValidationResult |
validate(T excelAttribute,
ImportParameters importParameters,
java.util.Map<java.lang.String,java.lang.Object> context)
Validates given cell and returns validation result.
|
boolean canHandle(T excelAttribute, ImportParameters importParameters)
excelAttribute - importParameters - ExcelValidationResult validate(T excelAttribute, ImportParameters importParameters, java.util.Map<java.lang.String,java.lang.Object> context)
ExcelValidationResult.SUCCESS should be returned.excelAttribute - importParameters - context - map which can be used as a cache. The map is shared between all request for given excel sheet.Copyright © 2018 SAP SE. All Rights Reserved.