24 lines
596 B
Java
24 lines
596 B
Java
/**
|
|
*
|
|
*/
|
|
package org.gcube.accounting.datamodel.validators;
|
|
|
|
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;
|
|
|
|
}
|