Interface ExcelValidator
- All Known Subinterfaces:
ExcelSingleMediaValidator
- All Known Implementing Classes:
CatalogVersionPermissionValidator,ExcelBaseProductValidator,ExcelBooleanValidator,ExcelCatalogVersionValidator,ExcelCategoryValidator,ExcelDateValidator,ExcelEnumValidator,ExcelEurope1PricesValidator,ExcelGenericReferenceValidator,ExcelMandatoryFieldValidator,ExcelMediaCatalogVersionValidator,ExcelMediaCollectionImportValidator,ExcelMediaFilenameExtensionValidator,ExcelMediaImportValidator,ExcelNumberValidator,ExcelStringValidator
public interface ExcelValidator
Excel 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 validator
canHandle(ImportParameters, AttributeDescriptorModel) is invoked. If a validator can handle
the cell then validate(ImportParameters, AttributeDescriptorModel, Map) is invoked and list of
validation result is collected.-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringSet of entries names inside media content zip attached to excel file -
Method Summary
Modifier and TypeMethodDescriptionbooleancanHandle(ImportParameters importParameters, AttributeDescriptorModel attributeDescriptor) Indicates whether given validator can handle a cell based on attribute descriptor and import parameters.validate(ImportParameters importParameters, AttributeDescriptorModel attributeDescriptor, Map<String, Object> context) Validates given cell and returns validation result.
-
Field Details
-
CTX_MEDIA_CONTENT_ENTRIES
Set of entries names inside media content zip attached to excel file- See Also:
-
-
Method Details
-
validate
ExcelValidationResult validate(ImportParameters importParameters, AttributeDescriptorModel attributeDescriptor, Map<String, 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
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.
-