use of eu.esdihumboldt.util.validator.LengthValidator.Type in project hale by halestudio.
the class LengthValidatorFactory method restore.
@Override
public Validator restore(Value value) throws Exception {
ValueProperties props = value.as(ValueProperties.class);
Type type = Type.valueOf(props.getSafe(P_TYPE).as(String.class));
int length = props.getSafe(P_LENGTH).as(Integer.class);
return new LengthValidator(type, length);
}
Aggregations