@Component(value="blTargetItemRulesValidator") public class TargetItemRulesValidator extends Object implements PropertyValidator
OfferType.ORDER_ITEM has at least one rule for the target criteria| Constructor and Description |
|---|
TargetItemRulesValidator() |
| Modifier and Type | Method and Description |
|---|---|
PropertyValidationResult |
validate(Entity entity,
Serializable instance,
Map<String,FieldMetadata> entityFieldMetadata,
Map<String,String> validationConfiguration,
BasicFieldMetadata propertyMetadata,
String propertyName,
String value)
Validates a property for an entity
|
public PropertyValidationResult validate(Entity entity, Serializable instance, Map<String,FieldMetadata> entityFieldMetadata, Map<String,String> validationConfiguration, BasicFieldMetadata propertyMetadata, String propertyName, String value)
PropertyValidatorvalidate in interface PropertyValidatorentity - Entity DTO of the entity attempting to saveinstance - actual object representation of entity. This can be cast to entity interfaces (like Sku or
Product)entityFieldMetadata - complete field metadata for all properties in entityvalidationConfiguration - the map represented by the set of ConfigurationItem for a
ValidationConfiguration on a property. This map could be null if this PropertyValidator is being
invoked outside of the context of a particular property (like a global validator)propertyMetadata - BasicFieldMetadata corresponding to the property that is being validpropertyName - the property name of the value attempting to be saved (could be a sub-entity obtained via dot
notation like 'defaultSku.name')value - the value attempted to be savedCopyright © 2015. All rights reserved.