Package javax.portlet
Class ValidatorException
java.lang.Object
java.lang.Throwable
java.lang.Exception
javax.portlet.PortletException
javax.portlet.ValidatorException
- All Implemented Interfaces:
Serializable
The
ValidatorException is thrown by the validate method of a PreferencesValidator when the
validation of a preference failed.- Version:
- $Revision: 5441 $
- Author:
- Julien Viet
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionValidatorException(String text, Throwable cause, Collection failedKeys) Constructs a new portlet validator exception.ValidatorException(String text, Collection failedKeys) Constructs a new validator exception with the given text.ValidatorException(Throwable cause, Collection failedKeys) Constructs a new portlet validator exception when the portlet needs to throw an exception. -
Method Summary
Modifier and TypeMethodDescriptionReturns the keys that failed the validation.Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
ValidatorException
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 benull.- Parameters:
text- the exception textfailedKeys- keys that failed the validation; may benull
-
ValidatorException
Constructs a new portlet validator exception. Used, when the portlet needs to do one of the following:- throw an exception
- include a message about the "root cause" that interfered with its normal operation
- include a description message
null.- Parameters:
text- the exception textcause- the root causefailedKeys- keys that failed the validation; may benull
-
ValidatorException
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 benull.- Parameters:
cause- the root causefailedKeys- keys that failed the validation; may benull
-
-
Method Details
-
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 emptyEnumerationif no failed keys are available.- Returns:
- the keys that failed validation, or an empty
Enumerationif no failed keys are available.
-