Class ExcelDateValidator
- java.lang.Object
-
- com.hybris.backoffice.excel.validators.ExcelDateValidator
-
- All Implemented Interfaces:
ExcelValidator
public class ExcelDateValidator extends java.lang.Object implements ExcelValidator
Default excel validator for date type. The validator checks whether given date is a correct date for format defined inExcelDateUtils.getDateTimeFormat()
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringVALIDATION_INCORRECTTYPE_DATE_MESSAGE_KEY-
Fields inherited from interface com.hybris.backoffice.excel.validators.ExcelValidator
CTX_MEDIA_CONTENT_ENTRIES
-
-
Constructor Summary
Constructors Constructor Description ExcelDateValidator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancanHandle(ImportParameters importParameters, AttributeDescriptorModel attributeDescriptor)Indicates whether given validator can handle a cell based on attribute descriptor and import parameters.ExcelDateUtilsgetExcelDateUtils()voidsetExcelDateUtils(ExcelDateUtils excelDateUtils)ExcelValidationResultvalidate(ImportParameters importParameters, AttributeDescriptorModel attributeDescriptor, java.util.Map<java.lang.String,java.lang.Object> context)Validates given cell and returns validation result.
-
-
-
Field Detail
-
VALIDATION_INCORRECTTYPE_DATE_MESSAGE_KEY
public static final java.lang.String VALIDATION_INCORRECTTYPE_DATE_MESSAGE_KEY
- See Also:
- Constant Field Values
-
-
Method Detail
-
validate
public ExcelValidationResult validate(ImportParameters importParameters, AttributeDescriptorModel attributeDescriptor, java.util.Map<java.lang.String,java.lang.Object> context)
Description copied from interface:ExcelValidatorValidates given cell and returns validation result. If cell doesn't have validation issues thenExcelValidationResult.SUCCESSshould be returned.- Specified by:
validatein interfaceExcelValidatorcontext- - map which can be used as a cache. The map is shared between all request for given excel sheet.- Returns:
ExcelValidationResult
-
canHandle
public boolean canHandle(ImportParameters importParameters, AttributeDescriptorModel attributeDescriptor)
Description copied from interface:ExcelValidatorIndicates whether given validator can handle a cell based on attribute descriptor and import parameters.- Specified by:
canHandlein interfaceExcelValidator- Returns:
- boolean whether validator can handle the cell.
-
getExcelDateUtils
public ExcelDateUtils getExcelDateUtils()
-
setExcelDateUtils
public void setExcelDateUtils(ExcelDateUtils excelDateUtils)
-
-