Package org.openbravo.base.validation
Class BasePropertyValidator
- java.lang.Object
-
- org.openbravo.base.validation.BasePropertyValidator
-
- All Implemented Interfaces:
PropertyValidator
- Direct Known Subclasses:
NumericPropertyValidator
,StringPropertyValidator
public abstract class BasePropertyValidator extends Object implements PropertyValidator
Base class for property validators. Property validators check length and min and max constraints of property values.- Author:
- mtaal
-
-
Constructor Summary
Constructors Constructor Description BasePropertyValidator()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description Property
getProperty()
void
setProperty(Property property)
abstract String
validate(Object value)
Validate the value against constraints implemented in the validator.
-
-
-
Method Detail
-
getProperty
public Property getProperty()
-
setProperty
public void setProperty(Property property)
-
validate
public abstract String validate(Object value)
Description copied from interface:PropertyValidator
Validate the value against constraints implemented in the validator. If the validation fails a message is returned. If validation passes then null is returned.- Specified by:
validate
in interfacePropertyValidator
- Parameters:
value
- the value to check- Returns:
- null if validation passes, otherwise a validation message is returned
- See Also:
PropertyValidator.validate(Object)
-
-