@Component(value="blRequiredPropertyValidator") public class RequiredPropertyValidator extends java.lang.Object implements GlobalPropertyValidator
BasicFieldMetadata.getRequired() has a non-empty value being
set.| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
ERROR_MESSAGE |
| Constructor and Description |
|---|
RequiredPropertyValidator() |
| Modifier and Type | Method and Description |
|---|---|
PropertyValidationResult |
validate(Entity entity,
java.io.Serializable instance,
java.util.Map<java.lang.String,FieldMetadata> entityFieldMetadata,
BasicFieldMetadata propertyMetadata,
java.lang.String propertyName,
java.lang.String value)
Validates a property for an entity
|
public PropertyValidationResult validate(Entity entity, java.io.Serializable instance, java.util.Map<java.lang.String,FieldMetadata> entityFieldMetadata, BasicFieldMetadata propertyMetadata, java.lang.String propertyName, java.lang.String value)
GlobalPropertyValidatorvalidate in interface GlobalPropertyValidatorentity - 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 entitypropertyMetadata - 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 © 2018. All Rights Reserved.