org.springjutsu.validation.executors.impl
Class RequiredRuleExecutor

java.lang.Object
  extended by org.springjutsu.validation.executors.impl.RequiredRuleExecutor
All Implemented Interfaces:
RuleExecutor

public class RequiredRuleExecutor
extends Object
implements RuleExecutor

Asserts that the required model is present.

Author:
Clark Duplichien, Taylor Wicksell

Constructor Summary
RequiredRuleExecutor()
           
 
Method Summary
 boolean validate(Object model, Object argument)
          Validate the given rule Generally, a rule should return valid if the model is null or empty, unless this is a rule to validate the presence of the object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RequiredRuleExecutor

public RequiredRuleExecutor()
Method Detail

validate

public boolean validate(Object model,
                        Object argument)
                 throws Exception
Description copied from interface: RuleExecutor
Validate the given rule Generally, a rule should return valid if the model is null or empty, unless this is a rule to validate the presence of the object.

Specified by:
validate in interface RuleExecutor
Parameters:
model - The object on which the rule operates
argument - Some argument providing details on how to operate on the object
Returns:
true if valid
Throws:
Exception - any exception to be handled by the parent framework.


Copyright © 2013 Spring Jutsu. All Rights Reserved.