Class ExcelMultivalueClassificationFieldValidator
java.lang.Object
com.hybris.backoffice.excel.validators.classification.ExcelMultivalueClassificationFieldValidator
- All Implemented Interfaces:
ExcelAttributeValidator<ExcelClassificationAttribute>
public class ExcelMultivalueClassificationFieldValidator
extends Object
implements ExcelAttributeValidator<ExcelClassificationAttribute>
Allows to handle multivalue types. It splits the values and delegates to not multivalued validators.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleancanHandle(ExcelClassificationAttribute excelAttribute, ImportParameters importParameters) Indicates whether validator is able to validate given cell value.voidsetValidators(List<ExcelAttributeValidator<ExcelClassificationAttribute>> validators) validate(ExcelClassificationAttribute excelAttribute, ImportParameters importParameters, Map<String, Object> context) Validates given cell and returns validation result.
-
Constructor Details
-
ExcelMultivalueClassificationFieldValidator
public ExcelMultivalueClassificationFieldValidator()
-
-
Method Details
-
canHandle
public boolean canHandle(@Nonnull ExcelClassificationAttribute excelAttribute, @Nonnull ImportParameters importParameters) Description copied from interface:ExcelAttributeValidatorIndicates whether validator is able to validate given cell value.- Specified by:
canHandlein interfaceExcelAttributeValidator<ExcelClassificationAttribute>- Returns:
- boolean whether validator can validate the cell
-
validate
public ExcelValidationResult validate(@Nonnull ExcelClassificationAttribute excelAttribute, @Nonnull ImportParameters importParameters, @Nonnull Map<String, Object> context) Description copied from interface:ExcelAttributeValidatorValidates given cell and returns validation result. If cell doesn't have validation issues thenExcelValidationResult.SUCCESSshould be returned.- Specified by:
validatein interfaceExcelAttributeValidator<ExcelClassificationAttribute>context- map which can be used as a cache. The map is shared between all request for given excel sheet.- Returns:
-
setValidators
-