nl.openedge.baritus.validation.impl
Class NestedValidationActivationRule

java.lang.Object
  extended bynl.openedge.baritus.validation.impl.NestedValidationActivationRule
All Implemented Interfaces:
ValidationActivationRule

public class NestedValidationActivationRule
extends java.lang.Object
implements ValidationActivationRule

You can use a list of validators while registering just one by using NestedValidationActionRule.

Author:
Eelco Hillenius

Constructor Summary
NestedValidationActivationRule()
           
 
Method Summary
 void addAllRules(java.util.List rules)
          add list of rules to current list of rules.
 void addRule(int index, ValidationActivationRule rule)
          add a validation activation rule to the list at the provided position.
 void addRule(ValidationActivationRule rule)
          add a validation activation rule to the end of the list.
 boolean allowValidation(org.infohazard.maverick.flow.ControllerContext cctx, FormBeanContext formBeanContext)
          allows validation if all nested rules return true.
 void clear()
          clear the list of rules.
 java.util.List getRules()
          get list of validation activation rules.
 void removeRule(int index)
          remove a validation activation rule at the provided position
 void removeRule(ValidationActivationRule rule)
          remove a validation activation rule from list.
 void setRules(java.util.List list)
          set list of validation activation rules.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NestedValidationActivationRule

public NestedValidationActivationRule()
Method Detail

allowValidation

public boolean allowValidation(org.infohazard.maverick.flow.ControllerContext cctx,
                               FormBeanContext formBeanContext)
allows validation if all nested rules return true.

Specified by:
allowValidation in interface ValidationActivationRule
Parameters:
cctx - controller context
formBeanContext - form bean context
Returns:
boolean if all nested rules return true, false if one of them did not
See Also:
ValidationActivationRule.allowValidation(org.infohazard.maverick.flow.ControllerContext, nl.openedge.baritus.FormBeanContext)

addRule

public void addRule(ValidationActivationRule rule)
add a validation activation rule to the end of the list.

Parameters:
rule - validation activation rule to be added

addRule

public void addRule(int index,
                    ValidationActivationRule rule)
add a validation activation rule to the list at the provided position.

Parameters:
index - the position in the list at which the provided rule should be inserted
rule - validation activation rule to be added

addAllRules

public void addAllRules(java.util.List rules)
add list of rules to current list of rules.

Parameters:
rules - list of rules to be added

removeRule

public void removeRule(ValidationActivationRule rule)
remove a validation activation rule from list.

Parameters:
rule - validation activation rule to be removed

removeRule

public void removeRule(int index)
remove a validation activation rule at the provided position

Parameters:
index - the position at which the rule should be removed

clear

public void clear()
clear the list of rules.


getRules

public java.util.List getRules()
get list of validation activation rules.

Returns:
List validation activation rules

setRules

public void setRules(java.util.List list)
set list of validation activation rules.

Parameters:
list - validation activation rules


Copyright © 2003-2004 Open Edge. All Rights Reserved.