org.broadleafcommerce.openadmin.web.form.entity
Class EntityFormValidator

java.lang.Object
  extended by org.broadleafcommerce.openadmin.web.form.entity.EntityFormValidator

@Component(value="blEntityFormValidator")
public class EntityFormValidator
extends Object

Validator used at the controller level to ensure that an Entity has passed validation from the PersistenceModule or CustomPersistenceHandler. This should be used as a final validation step after attempting the save

Author:
Phillip Verheyden

Constructor Summary
EntityFormValidator()
           
 
Method Summary
 boolean validate(EntityForm form, Entity entity, org.springframework.validation.Errors errors)
          Validates the form DTO against the passed in entity
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EntityFormValidator

public EntityFormValidator()
Method Detail

validate

public boolean validate(EntityForm form,
                        Entity entity,
                        org.springframework.validation.Errors errors)
Validates the form DTO against the passed in entity

Parameters:
form - the form DTO
entity - value obtained after attempting to save via AdminEntityService#updateEntity(EntityForm, String)
Returns:
true if entity does not have any validation errors, false otherwise.


Copyright © 2013. All Rights Reserved.