Package javax.portlet
Class ValidatorException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- javax.portlet.PortletException
-
- javax.portlet.ValidatorException
-
- All Implemented Interfaces:
java.io.Serializable
public class ValidatorException extends PortletException
TheValidatorException
is thrown by thevalidate
method of a PreferencesValidator when the validation of a preference failed.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.ArrayList
failedKeyVector
-
Constructor Summary
Constructors Modifier Constructor Description private
ValidatorException()
ValidatorException(java.lang.String text, java.lang.Throwable cause, java.util.Collection failedKeys)
Constructs a new portlet validator exception.ValidatorException(java.lang.String text, java.util.Collection failedKeys)
Constructs a new validator exception with the given text.ValidatorException(java.lang.Throwable cause, java.util.Collection failedKeys)
Constructs a new portlet validator exception when the portlet needs to throw an exception.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Enumeration
getFailedKeys()
Returns the keys that failed the validation.-
Methods inherited from class javax.portlet.PortletException
getCause, printStackTrace, printStackTrace, printStackTrace
-
-
-
-
Constructor Detail
-
ValidatorException
private ValidatorException()
-
ValidatorException
public ValidatorException(java.lang.String text, java.util.Collection failedKeys)
Constructs a new validator exception with the given text. The portlet container may use the text write it to a log.The collection of failed keys may contain all failed keys, only the first key that failed validation, or may be
null
.- Parameters:
text
- the exception textfailedKeys
- keys that failed the validation; may benull
-
ValidatorException
public ValidatorException(java.lang.String text, java.lang.Throwable cause, java.util.Collection failedKeys)
Constructs a new portlet validator exception. Used, when the portlet needs to do one of the following:- include a message about the "root cause" that interfered with its normal operation
- include a description message
throw an exception The Collection of failed keys may contain all failed keys, only the first key that failed validation, or may be
null
.- Parameters:
text
- the exception textcause
- the root causefailedKeys
- keys that failed the validation; may benull
-
ValidatorException
public ValidatorException(java.lang.Throwable cause, java.util.Collection failedKeys)
Constructs a new portlet validator exception when the portlet needs to throw an exception. The exception message is based on the localized message of the underlying exception.The Collection of failed keys may contain all failed keys, only the first key that failed validation, or may be
null
.- Parameters:
cause
- the root causefailedKeys
- keys that failed the validation; may benull
-
-
Method Detail
-
getFailedKeys
public java.util.Enumeration getFailedKeys()
Returns the keys that failed the validation.The Enumeration of failed keys may contain all failed keys, only the first key that failed validation, or an empty
Enumeration
if no failed keys are available.- Returns:
- the keys that failed validation, or an empty
Enumeration
if no failed keys are available.
-
-