Class CatalogVersionPermissionValidator
- java.lang.Object
-
- com.hybris.backoffice.excel.validators.ExcelGenericReferenceValidator
-
- com.hybris.backoffice.excel.validators.CatalogVersionPermissionValidator
-
- All Implemented Interfaces:
ExcelValidator
public class CatalogVersionPermissionValidator extends ExcelGenericReferenceValidator
-
-
Field Summary
-
Fields inherited from class com.hybris.backoffice.excel.validators.ExcelGenericReferenceValidator
VALIDATION_MESSAGE_KEY
-
Fields inherited from interface com.hybris.backoffice.excel.validators.ExcelValidator
CTX_MEDIA_CONTENT_ENTRIES
-
-
Constructor Summary
Constructors Constructor Description CatalogVersionPermissionValidator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancanHandle(ImportParameters importParameters, AttributeDescriptorModel attributeDescriptor)Validator can handle request only if call value is not emptyprotected CatalogVersionServicegetCatalogVersionService()protected UserServicegetUserService()voidsetCatalogVersionService(CatalogVersionService catalogVersionService)voidsetUserService(UserService userService)ExcelValidationResultvalidate(ImportParameters importParameters, AttributeDescriptorModel attributeDescriptor, java.util.Map<java.lang.String,java.lang.Object> context)Validates given cell and returns validation result.protected java.util.Optional<ValidationMessage>validateCatalogVersion(java.util.Map<java.lang.String,java.lang.String> parameters, AttributeDescriptorModel attributeDescriptor, CatalogVersionModel catalogVersion)-
Methods inherited from class com.hybris.backoffice.excel.validators.ExcelGenericReferenceValidator
buildFlexibleSearchQuery, getFlexibleSearchService, getRequiredAttributesFactory, getTypeService, isBlacklisted, prepareValidationMessage, recursivelyValidateAllLevels, setBlacklistedTypes, setExcelWorkbookEntriesService, setFlexibleSearchService, setRequiredAttributesFactory, setTypeService, validateRequiredAttribute, validateSingleLevel, validateSingleValue
-
-
-
-
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 interfaceExcelValidator- Overrides:
validatein classExcelGenericReferenceValidatorcontext- - map which can be used as a cache. The map is shared between all request for given excel sheet.- Returns:
ExcelValidationResult
-
validateCatalogVersion
protected java.util.Optional<ValidationMessage> validateCatalogVersion(java.util.Map<java.lang.String,java.lang.String> parameters, AttributeDescriptorModel attributeDescriptor, CatalogVersionModel catalogVersion)
-
canHandle
public boolean canHandle(ImportParameters importParameters, AttributeDescriptorModel attributeDescriptor)
Description copied from class:ExcelGenericReferenceValidatorValidator can handle request only if call value is not empty- Specified by:
canHandlein interfaceExcelValidator- Overrides:
canHandlein classExcelGenericReferenceValidator- Returns:
- boolean whether validator can handle the cell.
-
getUserService
protected UserService getUserService()
-
setUserService
public void setUserService(UserService userService)
-
getCatalogVersionService
protected CatalogVersionService getCatalogVersionService()
-
setCatalogVersionService
public void setCatalogVersionService(CatalogVersionService catalogVersionService)
-
-