org.broadleafcommerce.openadmin.server.service.persistence.validation
Class PropertyValidationResult
java.lang.Object
org.broadleafcommerce.openadmin.server.service.persistence.validation.PropertyValidationResult
public class PropertyValidationResult
- extends Object
DTO representing a boolean whether or not it passed validation and String error message. An error message is not required
if the result is not an error
- Author:
- Phillip Verheyden (phillipuniverse)
- See Also:
PropertyValidator}
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
valid
protected boolean valid
errorMessage
protected String errorMessage
PropertyValidationResult
public PropertyValidationResult(boolean valid,
String errorMessage)
PropertyValidationResult
public PropertyValidationResult(boolean valid)
isValid
public boolean isValid()
- Returns:
- Whether or not this property passed validation
setValid
public void setValid(boolean valid)
- Set the validation result for this property
- Parameters:
valid -
getErrorMessage
public String getErrorMessage()
- Returns:
- the error message (or key in a message bundle) for the validation failure
setErrorMessage
public void setErrorMessage(String errorMessage)
- Sets the error message (or key in a message bundle) for the validation failure. If you have some sort
of custom error message for the validation failure it should be set here
- Parameters:
errorMessage -
Copyright © 2013. All Rights Reserved.