public class ExcelMandatoryFieldValidator extends java.lang.Object implements ExcelValidator
AttributeDescriptorModel.getOptional() returns false. If field is localized then validator checks whether
ImportParameters.isoCode is equals to CommonI18NService.getCurrentLanguage().| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
VALIDATION_MANDATORY_FIELD_MESSAGE_KEY |
CTX_MEDIA_CONTENT_ENTRIES| Constructor and Description |
|---|
ExcelMandatoryFieldValidator() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
canHandle(ImportParameters importParameters,
AttributeDescriptorModel attributeDescriptor)
Indicates whether given validator can handle a cell based on attribute descriptor and import parameters.
|
CommonI18NService |
getCommonI18NService() |
void |
setCommonI18NService(CommonI18NService commonI18NService) |
ExcelValidationResult |
validate(ImportParameters importParameters,
AttributeDescriptorModel attributeDescriptor,
java.util.Map<java.lang.String,java.lang.Object> context)
Validates given cell and returns validation result.
|
public static final java.lang.String VALIDATION_MANDATORY_FIELD_MESSAGE_KEY
public ExcelValidationResult validate(ImportParameters importParameters, AttributeDescriptorModel attributeDescriptor, java.util.Map<java.lang.String,java.lang.Object> context)
ExcelValidatorExcelValidationResult.SUCCESS should be returned.validate in interface ExcelValidatorcontext - - map which can be used as a cache. The map is shared between all request for given excel sheet.ExcelValidationResultpublic boolean canHandle(ImportParameters importParameters, AttributeDescriptorModel attributeDescriptor)
ExcelValidatorcanHandle in interface ExcelValidatorpublic CommonI18NService getCommonI18NService()
public void setCommonI18NService(CommonI18NService commonI18NService)
Copyright © 2018 SAP SE. All Rights Reserved.