Interface ExcelValidator
-
- All Known Subinterfaces:
ExcelSingleMediaValidator
- All Known Implementing Classes:
ExcelBaseProductValidator,ExcelBooleanValidator,ExcelCatalogVersionValidator,ExcelCategoryValidator,ExcelDateValidator,ExcelEnumValidator,ExcelEurope1PricesValidator,ExcelGenericReferenceValidator,ExcelMandatoryFieldValidator,ExcelMediaCatalogVersionValidator,ExcelMediaCollectionImportValidator,ExcelMediaFilenameExtensionValidator,ExcelMediaImportValidator,ExcelNumberValidator,ExcelStringValidator
public interface ExcelValidatorExcel validator interface used by excel translators. This validator should be used for validating an excel cell. For each excel cell, excel import mechanism finds appropriate excel translator which can handle the cell. The translator has list of validators and for each validatorcanHandle(ImportParameters, AttributeDescriptorModel)is invoked. If a validator can handle the cell thenvalidate(ImportParameters, AttributeDescriptorModel, Map)is invoked and list of validation result is collected.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringCTX_MEDIA_CONTENT_ENTRIESSet of entries names inside media content zip attached to excel file
-
Method Summary
All Methods Instance Methods Abstract 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.ExcelValidationResultvalidate(ImportParameters importParameters, AttributeDescriptorModel attributeDescriptor, java.util.Map<java.lang.String,java.lang.Object> context)Validates given cell and returns validation result.
-
-
-
Field Detail
-
CTX_MEDIA_CONTENT_ENTRIES
static final java.lang.String CTX_MEDIA_CONTENT_ENTRIES
Set of entries names inside media content zip attached to excel file- See Also:
- Constant Field Values
-
-
Method Detail
-
validate
ExcelValidationResult validate(ImportParameters importParameters, AttributeDescriptorModel attributeDescriptor, java.util.Map<java.lang.String,java.lang.Object> context)
Validates given cell and returns validation result. If cell doesn't have validation issues thenExcelValidationResult.SUCCESSshould be returned.- Parameters:
importParameters-attributeDescriptor-context- - map which can be used as a cache. The map is shared between all request for given excel sheet.- Returns:
ExcelValidationResult
-
canHandle
boolean canHandle(ImportParameters importParameters, AttributeDescriptorModel attributeDescriptor)
Indicates whether given validator can handle a cell based on attribute descriptor and import parameters.- Parameters:
importParameters-attributeDescriptor-- Returns:
- boolean whether validator can handle the cell.
-
-