|
WebObjects 5.4 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
com.webobjects.foundation.NSValidation.ValidationException
public static class NSValidation.ValidationException
Instances of the NSValidation.ValidationException class are created and thrown when an error condition is encountered during the validation of an object that implements NSValidation.
Field Summary | |
---|---|
static String |
AdditionalExceptionsKey
Deprecated. Use additionalExceptions() |
static String |
ValidatedKeyUserInfoKey
Deprecated. Use key() |
static String |
ValidatedObjectUserInfoKey
Deprecated. User object() |
Constructor Summary | |
---|---|
NSValidation.ValidationException(String message)
Creates and returns a new exception with message as the message. |
|
NSValidation.ValidationException(String message,
NSDictionary<String,Object> userInfo)
Deprecated. Use NSValidation.ValidationException(String, Object, String) |
|
NSValidation.ValidationException(String message,
Object object,
String key)
Creates and returns a new exception with message as the message and a userInfo dictionary specifying object for the ValidatedObjectUserInfoKey and key for the ValidatedKeyUserInfoKey. |
Method Summary | |
---|---|
NSArray<NSValidation.ValidationException> |
additionalExceptions()
Returns the array in this NSValidation's userInfo dictionary for the AdditionalExceptionsKey. |
static NSValidation.ValidationException |
aggregateExceptionWithExceptions(NSArray<NSValidation.ValidationException> aggregateExceptions)
Returns an exception that is the aggregate of the exceptions in the aggregateExceptions array. |
NSValidation.ValidationException |
exceptionAddingEntriesToUserInfo(Object object,
String key)
Deprecated. Use exceptionWithObjectAndKey(java.lang.Object, java.lang.String) |
NSValidation.ValidationException |
exceptionWithObjectAndKey(Object object,
String key)
Returns a new exception with the same message as this ValidationException, but whose userInfo dictionary contains object and key . |
String |
key()
|
Object |
object()
|
NSDictionary<String,Object> |
userInfo()
Deprecated. Access the individual entries using the key() and object() methods. |
Methods inherited from class java.lang.Throwable |
---|
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
@Deprecated public static final String ValidatedObjectUserInfoKey
object()
@Deprecated public static final String ValidatedKeyUserInfoKey
key()
@Deprecated public static final String AdditionalExceptionsKey
additionalExceptions()
Constructor Detail |
---|
public NSValidation.ValidationException(String message)
message
- message giving the datails of the exceptionpublic NSValidation.ValidationException(String message, Object object, String key)
message
as the message and a userInfo dictionary specifying object for the ValidatedObjectUserInfoKey and key
for the ValidatedKeyUserInfoKey.
message
- exception messageobject
- object on the destination showed by the keypathkey
- property of the NSValidation implementorobject()
,
key()
@Deprecated public NSValidation.ValidationException(String message, NSDictionary<String,Object> userInfo)
NSValidation.ValidationException(String, Object, String)
message
- exception messageuserInfo
- information array giving the related object and the keyNSValidation.ValidationException(String, Object, String)
Method Detail |
---|
public static NSValidation.ValidationException aggregateExceptionWithExceptions(NSArray<NSValidation.ValidationException> aggregateExceptions)
aggregateExceptions
array. The returned aggregate exception has the message and userInfo dictionary of the first exception in the aggregateExceptions
array, but the userInfo dictionary is
augmented with the list of subexceptions under the key AdditionalExceptionsKey.
aggregateExceptions
- array of the exceptions
AdditionalExceptionsKey
public Object object()
ValidatedObjectUserInfoKey
public String key()
ValidatedKeyUserInfoKey
public NSArray<NSValidation.ValidationException> additionalExceptions()
@Deprecated public NSDictionary<String,Object> userInfo()
key()
and object()
methods.
key()
,
object()
@Deprecated public NSValidation.ValidationException exceptionAddingEntriesToUserInfo(Object object, String key)
exceptionWithObjectAndKey(java.lang.Object, java.lang.String)
object
and key
.
object
- object on the destination showed by the keypathkey
- property of this ValidationException
public NSValidation.ValidationException exceptionWithObjectAndKey(Object object, String key)
object
and key
. When validation exceptions are raised by certain validation methods such as validateValueForKey
, this method is
invoked on the exception to create a duplicate exception with object and property information stored to the new exception's userInfo dictionary. The information is stored under the keys ValidatedObjectUserInfoKey, ValidatedKeyUserInfoKey, respectively. The exception this method returns
has the same message as the original, receiving exception; the only difference is the userInfo dictionary.
object
- object on the destination showed by the keypathkey
- property of the NSValidation implementor
ValidatedKeyUserInfoKey
,
ValidatedObjectUserInfoKey
|
Last updated Tuesday, October 9, 2007 08:58 PDT | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |