public class ValidatorException extends PortletException
ValidatorException
is thrown by the
validate
method of a PreferencesValidator when
the validation of a preference failed.Constructor and Description |
---|
ValidatorException(String text,
Collection<String> failedKeys)
Constructs a new validator exception with the given text.
|
ValidatorException(String text,
Throwable cause,
Collection<String> failedKeys)
Constructs a new portlet validator exception.
|
ValidatorException(Throwable cause,
Collection<String> failedKeys)
Constructs a new portlet validator exception when the portlet needs to throw an
exception.
|
Modifier and Type | Method and Description |
---|---|
Enumeration<String> |
getFailedKeys()
Returns the keys that failed the validation.
|
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
public ValidatorException(String text, Collection<String> failedKeys)
The collection of failed keys may contain all failed keys, only the
first key that failed validation, or may be null
.
text
- the exception textfailedKeys
- keys that failed the validation; may be null
public ValidatorException(String text, Throwable cause, Collection<String> failedKeys)
The Collection of failed keys may contain all failed keys, only the
first key that failed validation, or may be null
.
text
- the exception textcause
- the root causefailedKeys
- keys that failed the validation; may be null
public ValidatorException(Throwable cause, Collection<String> failedKeys)
The Collection of failed keys may contain all failed keys, only the
first key that failed validation, or may be null
.
cause
- the root causefailedKeys
- keys that failed the validation; may be null
public Enumeration<String> getFailedKeys()
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.
Enumeration
if no failed keys are available.Copyright © 2004–2015 The Apache Software Foundation. All rights reserved.