accounting-lib/src/main/java/org/gcube/accounting/datamodel/validations/FieldValidator.java

24 lines
597 B
Java

/**
*
*/
package org.gcube.accounting.datamodel.validations;
import java.io.Serializable;
import org.gcube.accounting.exception.InvalidValueException;
/**
* @author Luca Frosini (ISTI - CNR) http://www.lucafrosini.com/
*/
public interface FieldValidator {
/**
* Validate (and convert if needed) the provided property
* @param toValidate the property to validate
* @return the validated (and converted property)
* @throws InvalidValueException if the validation (or conversion) fails
*/
public Serializable validate(Serializable toValidate) throws InvalidValueException;
}