org.springjutsu.validation.executors.impl
Class MatchesRuleExecutor

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

public class MatchesRuleExecutor
extends Object
implements RuleExecutor

Asserts that the model matches the argument in actual equality or string converted equality.

Author:
Clark Duplichien, Taylor Wicksell

Constructor Summary
MatchesRuleExecutor()
           
 
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

MatchesRuleExecutor

public MatchesRuleExecutor()
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.