Package com.install4j.api.beaninfo
Class BeanValidationException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- com.install4j.api.beaninfo.BeanValidationException
-
- All Implemented Interfaces:
java.io.Serializable
public class BeanValidationException extends java.lang.Exception
Exception for notifying the user that a property value of a bean is not valid. Throw this exception in implementations ofBeanValidator.validateBean(com.install4j.api.beans.Bean)
. The user will be notified with a message that is constructed from the supplied information.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description BeanValidationException(java.lang.String errorMessage)
Constructor with an error message.BeanValidationException(java.lang.String errorMessage, java.lang.String propertyName)
Constructor with an error message and a property name.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getCustomizerTabName()
Get the name of the customizer tab that was set withsetCustomizerTabName
.java.lang.String
getPropertyName()
Get the name of the invalid property, ornull
if no property name was specified in the constructor.void
setCustomizerTabName(java.lang.String customizerTabName)
Set the name of the customizer tab, if the error message applies to a customizer.
-
-
-
Constructor Detail
-
BeanValidationException
public BeanValidationException(java.lang.String errorMessage)
Constructor with an error message.- Parameters:
errorMessage
- the error message
-
BeanValidationException
public BeanValidationException(java.lang.String errorMessage, java.lang.String propertyName)
Constructor with an error message and a property name. The specified property will be selected in the install4j GUI.- Parameters:
errorMessage
- the error messagepropertyName
- the name of the invalid property
-
-
Method Detail
-
getPropertyName
public java.lang.String getPropertyName()
Get the name of the invalid property, ornull
if no property name was specified in the constructor.- Returns:
- the property name
-
setCustomizerTabName
public void setCustomizerTabName(java.lang.String customizerTabName)
Set the name of the customizer tab, if the error message applies to a customizer. This is either thename
property of thejavax.swing.JComponent
or, if the customizer is ajavax.swing.JTabbedPane
, the name of the tab.- Parameters:
customizerTabName
- the name- See Also:
Install4JBeanInfo(String, String, String, boolean, boolean, Integer, Class, Class)
-
getCustomizerTabName
public java.lang.String getCustomizerTabName()
Get the name of the customizer tab that was set withsetCustomizerTabName
.- Returns:
- the name
- See Also:
setCustomizerTabName(String)
-
-