| 
 | |||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.jaffa.rules.RulesEngine
This class provides methods to validate a field or a domain object. It will utilise the XML configuration files to determine the rules to invoke for the validations. If the variation has been set for the Thread [for eg. the Portlet Servlet or WebServicesWrapper calling the VariationContext.setVariation()], then that variation will be used to determine the rules.
| Constructor Summary | |
| RulesEngine() | |
| Method Summary | |
| static void | doAllValidationsForDomainField(String domainClassName,
                                                             String fieldName,
                                                             Object fieldValue,
                                                             UOW uow)This will invoke all the Rules defined for the field. | 
| static void | doAllValidationsForDomainObject(Object domainObject,
                                                               UOW uow)This will invoke all the Rules defined for the fields of the Domain object. | 
| static void | doMandatoryValidationsForDomainField(String domainClassName,
                                                                         String fieldName,
                                                                         Object fieldValue,
                                                                         UOW uow)This will only invoke the 'Mandatory' Rules defined for the field. | 
| static void | doMandatoryValidationsForDomainObject(Object domainObject,
                                                                           UOW uow)This will only invoke the 'Mandatory' Rules defined for the fields of the Domain object. | 
| Methods inherited from class java.lang.Object | 
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Constructor Detail | 
public RulesEngine()
| Method Detail | 
public static void doMandatoryValidationsForDomainField(String domainClassName,
                                                        String fieldName,
                                                        Object fieldValue,
                                                        UOW uow)
                                                 throws ValidationException,
                                                        FrameworkException
domainClassName - The domain class to which the field belongs.fieldName - The field to be validated.fieldValue - The value to be validated.uow - The UOW.
ValidationException - if any validation rule fails.
FrameworkException - if any framework error occurs.
public static void doAllValidationsForDomainField(String domainClassName,
                                                  String fieldName,
                                                  Object fieldValue,
                                                  UOW uow)
                                           throws ValidationException,
                                                  FrameworkException
domainClassName - The domain class to which the field belongs.fieldName - The field to be validated.fieldValue - The value to be validated.uow - The UOW.
ValidationException - if any validation rule fails.
FrameworkException - if any framework error occurs.
public static void doMandatoryValidationsForDomainObject(Object domainObject,
                                                         UOW uow)
                                                  throws ValidationException,
                                                         FrameworkException
domainObject - The domain object to be validated.uow - The UOW.
ValidationException - if any validation rule fails.
FrameworkException - if any framework error occurs.
public static void doAllValidationsForDomainObject(Object domainObject,
                                                   UOW uow)
                                            throws ValidationException,
                                                   FrameworkException
domainObject - The domain object to be validated.uow - The UOW.
ValidationException - if any validation rule fails.
FrameworkException - if any framework error occurs.| 
 | |||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||