ERXValidation Class Reference
List of all members.
|
Static Public Member Functions |
| static String | localizedDisplayNameForKey (EOClassDescription ecd, String key, ERXLocalizer localizer) |
| static void | setPushChangesDefault (boolean val) |
| static void | validationFailedWithException (Throwable e, Object value, String keyPath, NSMutableDictionary errorMessages, String displayPropertyKeyPath, ERXLocalizer localizer, EOEntity entity, boolean pushChanges) |
| static void | validationFailedWithException (Throwable e, Object value, String keyPath, NSMutableDictionary errorMessages, String displayPropertyKeyPath, ERXLocalizer localizer, EOEntity entity) |
| static void | validationFailedWithException (Throwable e, Object value, String keyPath, NSMutableDictionary errorMessages, String displayPropertyKeyPath, ERXLocalizer localizer) |
Static Public Attributes |
| static final boolean | DO_NOT_PUSH_INCORRECT_VALUE_ON_EO = false |
| static final Logger | log = Logger.getLogger("er.validation.ERValidation") |
| static final boolean | PUSH_INCORRECT_VALUE_ON_EO = true |
Static Private Attributes |
| static boolean | pushChangesDefault = DO_NOT_PUSH_INCORRECT_VALUE_ON_EO |
Detailed Description
This is more of a legacy object that was used until we had
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.
Member Function Documentation
Calculates a localized display name for a given entity and key using the supplied localizer
- Parameters:
-
| ecd | class description the key belongs to |
| key | to localize |
| localizer | to use for localizing the content |
- Returns:
- the localized display name
| static void setPushChangesDefault |
( |
boolean |
val |
) |
[static] |
Sets pushing changes onto enterprise objects when a validation exception occurs.
- Parameters:
-
| val | sets whether incorrect values should be pushed onto an object |
| static void validationFailedWithException |
( |
Throwable |
e, |
|
|
Object |
value, |
|
|
String |
keyPath, |
|
|
NSMutableDictionary |
errorMessages, |
|
|
String |
displayPropertyKeyPath, |
|
|
ERXLocalizer |
localizer, |
|
|
EOEntity |
entity, |
|
|
boolean |
pushChanges | |
|
) |
| | [static] |
Processes a validation exception to make it look better. The resulting exception message is set in the errorMessages dictionary.
- Parameters:
-
| 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. |
Processes a validation exception to make it look better. The resulting exception message is set in the errorMessages dictionary. This method uses the default value for pushing values onto the eo.
- Parameters:
-
| 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. |
Processes a validation exception to make it look better. The resulting exception message is set in the errorMessages dictionary.
- Parameters:
-
| 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. |
Member Data Documentation
holds the static constant for not pushing an incorrect value onto an eo
final Logger log = Logger.getLogger("er.validation.ERValidation") [static] |
holds the static constant for pushing an incorrect value onto an eo
holds the default constant for pushing on values onto eos, defaults to false
The documentation for this class was generated from the following file:
- /opt/source/Wonder/Frameworks/Core/ERExtensions/Sources/er/extensions/validation/ERXValidation.java