public class ERXValidation extends Object
ERXValidationFactory
in place.
The only place where this is used is when handling
ValidationExceptions
that have not been converted by the ERXValidationFactory. This class is
also used to handle formatter exceptions that are thrown number formatters in
WOComponents.Modifier and Type | Field and Description |
---|---|
static boolean |
DO_NOT_PUSH_INCORRECT_VALUE_ON_EO
holds the static constant for not pushing an incorrect value onto an eo
|
static boolean |
PUSH_INCORRECT_VALUE_ON_EO
holds the static constant for pushing an incorrect value onto an eo
|
Constructor and Description |
---|
ERXValidation() |
Modifier and Type | Method and Description |
---|---|
static String |
localizedDisplayNameForKey(com.webobjects.eocontrol.EOClassDescription ecd,
String key,
ERXLocalizer localizer)
Calculates a localized display name for a given entity and key using the supplied localizer
|
static void |
setPushChangesDefault(boolean val)
Sets pushing changes onto enterprise objects when a
validation exception occurs.
|
static void |
validationFailedWithException(Throwable e,
Object value,
String keyPath,
NSMutableDictionary errorMessages,
String displayPropertyKeyPath,
ERXLocalizer localizer)
Processes a validation exception to make it look better.
|
static void |
validationFailedWithException(Throwable e,
Object value,
String keyPath,
NSMutableDictionary errorMessages,
String displayPropertyKeyPath,
ERXLocalizer localizer,
com.webobjects.eoaccess.EOEntity entity)
Processes a validation exception to make it look better.
|
static void |
validationFailedWithException(Throwable e,
Object value,
String keyPath,
NSMutableDictionary errorMessages,
String displayPropertyKeyPath,
ERXLocalizer localizer,
com.webobjects.eoaccess.EOEntity entity,
boolean pushChanges)
Processes a validation exception to make it look better.
|
public static final boolean PUSH_INCORRECT_VALUE_ON_EO
public static final boolean DO_NOT_PUSH_INCORRECT_VALUE_ON_EO
public static void setPushChangesDefault(boolean val)
val
- sets whether incorrect values should be pushed
onto an objectpublic static void validationFailedWithException(Throwable e, Object value, String keyPath, NSMutableDictionary errorMessages, String displayPropertyKeyPath, ERXLocalizer localizer)
e
- validation exception.value
- that failed validation.keyPath
- that failed validation.errorMessages
- dictionary to place the formatted message into.displayPropertyKeyPath
- key used in the case of the formatter exception
to calculate the pretty display name.localizer
- to use to localize the exception.public static void validationFailedWithException(Throwable e, Object value, String keyPath, NSMutableDictionary errorMessages, String displayPropertyKeyPath, ERXLocalizer localizer, com.webobjects.eoaccess.EOEntity entity)
e
- validation exception.value
- that failed validation.keyPath
- that failed validation.errorMessages
- dictionary to place the formatted message into.displayPropertyKeyPath
- key used in the case of the formatter exception
to calculate the pretty display name.localizer
- to use to localize the exception.entity
- that the validation exception is happening too.public static void validationFailedWithException(Throwable e, Object value, String keyPath, NSMutableDictionary errorMessages, String displayPropertyKeyPath, ERXLocalizer localizer, com.webobjects.eoaccess.EOEntity entity, boolean pushChanges)
e
- validation exception.value
- that failed validation.keyPath
- that failed validation.errorMessages
- dictionary to place the formatted message into.displayPropertyKeyPath
- key used in the case of the formatter exception
to calculate the pretty display name.localizer
- to use to localize the exception.entity
- that the validation exception is happening too.pushChanges
- boolean to flag if the bad values should be pushed onto the
eo.public static String localizedDisplayNameForKey(com.webobjects.eocontrol.EOClassDescription ecd, String key, ERXLocalizer localizer)
ecd
- class description the key belongs tokey
- to localizelocalizer
- to use for localizing the contentCopyright © 2002 – 2020 Project Wonder.