| java.lang.Object org.jaffa.rules.RulesEngine
RulesEngine | public class RulesEngine (Code) | | 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.
|
doAllValidationsForDomainField | public static void doAllValidationsForDomainField(String domainClassName, String fieldName, Object fieldValue, UOW uow) throws ValidationException, FrameworkException(Code) | | This will invoke all the Rules defined for the field.
Parameters: domainClassName - The domain class to which the field belongs. Parameters: fieldName - The field to be validated. Parameters: fieldValue - The value to be validated. Parameters: uow - The UOW. throws: ValidationException - if any validation rule fails. throws: FrameworkException - if any framework error occurs. |
doAllValidationsForDomainObject | public static void doAllValidationsForDomainObject(Object domainObject, UOW uow) throws ValidationException, FrameworkException(Code) | | This will invoke all the Rules defined for the fields of the Domain object.
Parameters: domainObject - The domain object to be validated. Parameters: uow - The UOW. throws: ValidationException - if any validation rule fails. throws: FrameworkException - if any framework error occurs. |
doMandatoryValidationsForDomainField | public static void doMandatoryValidationsForDomainField(String domainClassName, String fieldName, Object fieldValue, UOW uow) throws ValidationException, FrameworkException(Code) | | This will only invoke the 'Mandatory' Rules defined for the field.
Parameters: domainClassName - The domain class to which the field belongs. Parameters: fieldName - The field to be validated. Parameters: fieldValue - The value to be validated. Parameters: uow - The UOW. throws: ValidationException - if any validation rule fails. throws: FrameworkException - if any framework error occurs. |
doMandatoryValidationsForDomainObject | public static void doMandatoryValidationsForDomainObject(Object domainObject, UOW uow) throws ValidationException, FrameworkException(Code) | | This will only invoke the 'Mandatory' Rules defined for the fields of the Domain object.
Parameters: domainObject - The domain object to be validated. Parameters: uow - The UOW. throws: ValidationException - if any validation rule fails. throws: FrameworkException - if any framework error occurs. |
|
|