public class ExcelMandatoryClassificationFieldValidator extends java.lang.Object implements ExcelAttributeValidator<ExcelClassificationAttribute>
ExcelClassificationAttribute.isMandatory() returns true. If attribute is mandatory then the validator checks
whether ImportParameters.getCellValue() is not blank| Constructor and Description |
|---|
ExcelMandatoryClassificationFieldValidator() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
canHandle(ExcelClassificationAttribute excelAttribute,
ImportParameters importParameters)
Checks whether
ExcelClassificationAttribute.isMandatory() returns true. |
void |
setCommonI18NService(CommonI18NService commonI18NService) |
ExcelValidationResult |
validate(ExcelClassificationAttribute excelAttribute,
ImportParameters importParameters,
java.util.Map<java.lang.String,java.lang.Object> context)
Checks whether
ImportParameters.getCellValue() is not blank. |
public ExcelMandatoryClassificationFieldValidator()
public boolean canHandle(ExcelClassificationAttribute excelAttribute, ImportParameters importParameters)
ExcelClassificationAttribute.isMandatory() returns true.canHandle in interface ExcelAttributeValidator<ExcelClassificationAttribute>excelAttribute - importParameters - public ExcelValidationResult validate(ExcelClassificationAttribute excelAttribute, ImportParameters importParameters, java.util.Map<java.lang.String,java.lang.Object> context)
ImportParameters.getCellValue() is not blank.validate in interface ExcelAttributeValidator<ExcelClassificationAttribute>excelAttribute - importParameters - context - map which can be used as a cache. The map is shared between all request for given excel sheet.ExcelValidationResult which contains validation messages. If validator does not return any
validation issues then ExcelValidationResult.SUCCESS will be returned.public void setCommonI18NService(CommonI18NService commonI18NService)
Copyright © 2018 SAP SE. All Rights Reserved.