org.broadleafcommerce.openadmin.server.service.persistence.validation
Class MatchesFieldValidator

java.lang.Object
  extended by org.broadleafcommerce.openadmin.server.service.persistence.validation.MatchesFieldValidator
All Implemented Interfaces:
PropertyValidator

public class MatchesFieldValidator
extends Object
implements PropertyValidator

Checks for equality between this field and a configured 'otherField'

Author:
Phillip Verheyden

Constructor Summary
MatchesFieldValidator()
           
 
Method Summary
 boolean validate(Entity entity, Map<String,String> validationConfiguration, Serializable instance, String value)
          Validates a property for an entity
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MatchesFieldValidator

public MatchesFieldValidator()
Method Detail

validate

public boolean validate(Entity entity,
                        Map<String,String> validationConfiguration,
                        Serializable instance,
                        String value)
Description copied from interface: PropertyValidator
Validates a property for an entity

Specified by:
validate in interface PropertyValidator
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)
value - the value attempted to be saved
Returns:
true if this passes validation, false otherwise.


Copyright © 2013. All Rights Reserved.