public interface BeanValidator
Interface for the Install4JBeanInfo.ATTRIBUTE_BEAN_VALIDATOR
value of a bean descriptor.
With a bean validator you can check at design-time if the values of the bean properties are valid
and notify the user if this is not the case.
The Install4JBeanInfo
class offers a number of convenience methods to help bean validators to
quickly check common conditions. It is most convenient if you make the bean info implement the
BeanValidator interface itself, in that case the convenience methods are directly accessible.
Install4JBeanInfo.checkNotEmpty(String, com.install4j.api.beans.Bean)
,
Install4JBeanInfo.checkNotEmpty(String, String, com.install4j.api.beans.Bean)
,
Install4JBeanInfo.isEmpty(String, com.install4j.api.beans.Bean)
,
Install4JBeanInfo.findPropertyDescriptor(String)
,
Install4JBeanInfo.getPropertyValue(java.beans.PropertyDescriptor, com.install4j.api.beans.Bean)
Method Summary | |
---|---|
void |
validateBean(Bean bean)
Called by the install4j GUI at design-time to check the validity of the bean properties. |
Method Detail |
---|
void validateBean(Bean bean) throws BeanValidationException
bean
- the bean that should be validated
BeanValidationException
- Throw this exception if the bean properties are not valid