public class ExcelMediaImportValidator extends java.lang.Object implements ExcelSingleMediaValidator
AbstractExcelMediaImportTranslator.PARAM_FILE_PATH or
AbstractExcelMediaImportTranslator.PARAM_CODE is definedAbstractExcelMediaImportTranslator.PARAM_FILE_PATH exists in uploaded content| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
VALIDATION_DECLARED_MULTIPLE_REFERENCES |
static java.lang.String |
VALIDATION_MISSING_FILE_IN_ZIP |
static java.lang.String |
VALIDATION_MISSING_ZIP |
static java.lang.String |
VALIDATION_PATH_AND_CODE_EMPTY |
CTX_MEDIA_CONTENT_ENTRIES| Constructor and Description |
|---|
ExcelMediaImportValidator() |
| 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.
|
ExcelImportService |
getImportService()
Deprecated.
since 1808, not used anymore
|
TypeService |
getTypeService() |
protected boolean |
hasImportData(ImportParameters importParameters) |
void |
setImportService(ExcelImportService importService)
Deprecated.
since 1808, not used anymore
|
void |
setTypeService(TypeService typeService) |
ExcelValidationResult |
validate(ImportParameters importParameters,
AttributeDescriptorModel attributeDescriptor,
java.util.Map<java.lang.String,java.lang.Object> context)
Validates given cell and returns validation result.
|
java.util.List<ValidationMessage> |
validateSingleValue(java.util.Map<java.lang.String,java.lang.Object> context,
java.util.Map<java.lang.String,java.lang.String> parameters)
Allows to validate single media.
|
public static final java.lang.String VALIDATION_DECLARED_MULTIPLE_REFERENCES
public static final java.lang.String VALIDATION_PATH_AND_CODE_EMPTY
public static final java.lang.String VALIDATION_MISSING_FILE_IN_ZIP
public static final java.lang.String VALIDATION_MISSING_ZIP
public boolean canHandle(ImportParameters importParameters, AttributeDescriptorModel attributeDescriptor)
ExcelValidatorcanHandle in interface ExcelValidatorprotected boolean hasImportData(ImportParameters importParameters)
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 java.util.List<ValidationMessage> validateSingleValue(java.util.Map<java.lang.String,java.lang.Object> context, java.util.Map<java.lang.String,java.lang.String> parameters)
ExcelSingleMediaValidatorvalidateSingleValue in interface ExcelSingleMediaValidatorcontext - which allows to hold information about the file.parameters - values of excel's cell.public TypeService getTypeService()
public void setTypeService(TypeService typeService)
@Deprecated public ExcelImportService getImportService()
@Deprecated public void setImportService(ExcelImportService importService)
Copyright © 2018 SAP SE. All Rights Reserved.