|
Project Wonder 2.0 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.gammastream.validity.GSVEngine
This is Validity's validation engine. This class loads and applies the rules you have modeled in your Validity model file. This class is accessed via a singleton accessor.
Field Summary | |
static String |
ERROR_DICTIONARY_KEY
Key used to access the Validity exception dictionary from NSValidation.Exception's userinfo dictionary. |
Method Summary | |
boolean |
checkRule(GSVRule rule,
String attributeName,
NSMutableDictionary errorDict,
Object eoObject,
int when)
May be called arbitrarily to validate an EO Object, though it is explicitly called by validateObject
Returns true if all validation succeeds.
|
boolean |
checkRule(GSVRule rule,
String attributeName,
NSMutableDictionary errorDict,
String value,
int when)
|
static NSValidation.ValidationException |
exceptionByAppendingErrorToException(String errorMessage,
String key,
NSValidation.ValidationException ex)
|
static GSVEngine |
sharedValidationEngine()
Creates a new GSVEngine if one is not already created, and returns the shared instance. |
boolean |
validateAttribute(Object object,
String attributeName,
GSVRule rule)
May be called arbitrarily to validate an object Returns true if all validation succeeds.
|
boolean |
validateEOObject(EOEnterpriseObject eoObject,
int when)
May be called arbitrarily to validate and eo object Returns true if all validation succeeds.
|
boolean |
validateEOObjectOnDelete(EOEnterpriseObject eoObject)
Called from an object being validated (i.e. validateForDelete()); |
boolean |
validateEOObjectOnInsert(EOEnterpriseObject eoObject)
Called from an object being validated (i.e. validateForInsert()); |
boolean |
validateEOObjectOnSave(EOEnterpriseObject eoObject)
Called from an object being validated (i.e. validateForSave()); |
boolean |
validateEOObjectOnUpdate(EOEnterpriseObject eoObject)
Called from an object being validated (i.e. validateForUpdate()); |
NSDictionary |
validateKeyAndValueInEntity(String key,
String value,
String entity)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static String ERROR_DICTIONARY_KEY
Method Detail |
public static GSVEngine sharedValidationEngine()
public static NSValidation.ValidationException exceptionByAppendingErrorToException(String errorMessage, String key, NSValidation.ValidationException ex)
public boolean validateEOObjectOnSave(EOEnterpriseObject eoObject)
public boolean validateEOObjectOnInsert(EOEnterpriseObject eoObject)
public boolean validateEOObjectOnUpdate(EOEnterpriseObject eoObject)
public boolean validateEOObjectOnDelete(EOEnterpriseObject eoObject)
public NSDictionary validateKeyAndValueInEntity(String key, String value, String entity)
public boolean validateEOObject(EOEnterpriseObject eoObject, int when)
true
if all validation succeeds.
Throws an NSValidation.ValidationException if one or more of the rules fails.
public boolean validateAttribute(Object object, String attributeName, GSVRule rule)
true
if all validation succeeds.
Throws an NSValidation.ValidationException if one or more of the rules fails.
public boolean checkRule(GSVRule rule, String attributeName, NSMutableDictionary errorDict, String value, int when)
public boolean checkRule(GSVRule rule, String attributeName, NSMutableDictionary errorDict, Object eoObject, int when)
validateObject
Returns true
if all validation succeeds.
Returns false
if the rule fails, and populates the error
dictionary with the error.
|
Last updated: Do, Dez 9, 2004 12:46 PM CET | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |