|
WebObjects 5.4.2 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.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 NSValidation.ValidationException.additionalExceptions() |
static String |
ValidatedKeyUserInfoKey
Deprecated. Use NSValidation.ValidationException.key() |
static String |
ValidatedObjectUserInfoKey
Deprecated. User NSValidation.ValidationException.object() |
Constructor Summary | |
---|---|
NSValidation.ValidationException(String message)
Creates and returns a new exception with message as the message. |
|
NSValidation.ValidationException(String message,
NSDictionary userInfo)
Deprecated. Use NSValidation.ValidationException.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 |
additionalExceptions()
Returns the array in this NSValidation's userInfo dictionary for the AdditionalExceptionsKey. |
static NSValidation.ValidationException |
aggregateExceptionWithExceptions(NSArray aggregateExceptions)
Returns an exception that is the aggregate of the exceptions in the aggregateExceptions array. |
NSValidation.ValidationException |
exceptionAddingEntriesToUserInfo(Object object,
String key)
Deprecated. Use NSValidation.ValidationException.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 |
userInfo()
Deprecated. Access the individual entries using the NSValidation.ValidationException.key() and NSValidation.ValidationException.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
NSValidation.ValidationException.object()
@Deprecated public static final String ValidatedKeyUserInfoKey
NSValidation.ValidationException.key()
@Deprecated public static final String AdditionalExceptionsKey
NSValidation.ValidationException.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 implementorNSValidation.ValidationException.object()
,
NSValidation.ValidationException.key()
@Deprecated public NSValidation.ValidationException(String message, NSDictionary userInfo)
NSValidation.ValidationException.NSValidation.ValidationException(String, Object, String)
message
- exception messageuserInfo
- information array giving the related object and the keyNSValidation.ValidationException.NSValidation.ValidationException(String, Object, String)
Method Detail |
---|
public static NSValidation.ValidationException aggregateExceptionWithExceptions(NSArray 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
NSValidation.ValidationException.AdditionalExceptionsKey
public Object object()
NSValidation.ValidationException.ValidatedObjectUserInfoKey
public String key()
NSValidation.ValidationException.ValidatedKeyUserInfoKey
public NSArray additionalExceptions()
@Deprecated public NSDictionary userInfo()
NSValidation.ValidationException.key()
and NSValidation.ValidationException.object()
methods.
NSValidation.ValidationException.key()
,
NSValidation.ValidationException.object()
@Deprecated public NSValidation.ValidationException exceptionAddingEntriesToUserInfo(Object object, String key)
NSValidation.ValidationException.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
NSValidation.ValidationException.ValidatedKeyUserInfoKey
,
NSValidation.ValidationException.ValidatedObjectUserInfoKey
|
Last updated June 2008 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |