org.broadleafcommerce.openadmin.server.service.persistence.validation
Interface PropertyValidator

All Known Implementing Classes:
MatchesFieldValidator, RegexPropertyValidator

public interface PropertyValidator

Author:
Phillip Verheyden

Method Summary
 boolean validate(Entity entity, Map<String,String> validationConfiguration, Serializable instance, String value)
          Validates a property for an entity
 

Method Detail

validate

boolean validate(Entity entity,
                 Map<String,String> validationConfiguration,
                 Serializable instance,
                 String value)
Validates a property for an entity

Parameters:
entity - Entity DTO of the entity attempting to save
validationConfiguration - the map represented by the set of ConfigurationItem for a ValidationConfiguration on a property
instance - actual object representation of entity. This can be cast to entity interfaces (like Sku or Product)
property - 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 saved
Returns:
true if this passes validation, false otherwise.


Copyright © 2013. All Rights Reserved.