Class NotEmptyValidator
- java.lang.Object
-
- org.gcube.documentstore.records.implementation.validations.validators.NotEmptyValidator
-
- All Implemented Interfaces:
FieldAction
- Direct Known Subclasses:
NotEmptyIfNotNullValidator
public class NotEmptyValidator extends Object implements FieldAction
- Author:
- Luca Frosini (ISTI - CNR)
-
-
Constructor Summary
Constructors Constructor Description NotEmptyValidator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected booleanisValid(Serializable toValidate)Serializablevalidate(String key, Serializable value, Record record)Validate (and eventually convert) the value of the property identified by the key.
-
-
-
Method Detail
-
isValid
protected boolean isValid(Serializable toValidate)
-
validate
public Serializable validate(String key, Serializable value, Record record) throws InvalidValueException
Validate (and eventually convert) the value of the property identified by the key.- Specified by:
validatein interfaceFieldAction- Parameters:
key- The key of the propertyvalue- The value to be validated (and eventually converted) of the propertyrecord- the record the property is attached- Returns:
- the validated (and eventually converted) value of the property
- Throws:
InvalidValueException- if the validation or the eventual conversion fails
-
-