net.sf.doolin.gui.validation
Class ChainedValidator<B>

java.lang.Object
  extended by net.sf.doolin.gui.validation.AbstractValidator<B>
      extended by net.sf.doolin.gui.validation.ChainedValidator<B>
Type Parameters:
B - Type of object for the view
All Implemented Interfaces:
GUIValidator<B>

public class ChainedValidator<B>
extends AbstractValidator<B>

Chain of validators.

Author:
Damien Coraboeuf

Constructor Summary
ChainedValidator()
           
 
Method Summary
 List<GUIValidator<B>> getValidators()
          Gets the validators.
 void setValidators(List<GUIValidator<B>> validators)
          Sets the validators.
 void subscribe(SubscriberValidator subscriberValidator, B model, Runnable runnable)
          Subscribes the validator to the model changes.
protected  void validate(GUIValidation validationResult, B model)
          Validate.
 
Methods inherited from class net.sf.doolin.gui.validation.AbstractValidator
getMsgMandatoryKey, isNotBlank, isNotNull, setMsgMandatoryKey, validate, validate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ChainedValidator

public ChainedValidator()
Method Detail

getValidators

public List<GUIValidator<B>> getValidators()
Gets the validators.

Returns:
the validators

setValidators

public void setValidators(List<GUIValidator<B>> validators)
Sets the validators.

Parameters:
validators - the new validators

validate

protected void validate(GUIValidation validationResult,
                        B model)
Description copied from class: AbstractValidator
Validate.

Specified by:
validate in class AbstractValidator<B>
Parameters:
validationResult - the validation result
model - the model to validate

subscribe

public void subscribe(SubscriberValidator subscriberValidator,
                      B model,
                      Runnable runnable)
Description copied from interface: GUIValidator
Subscribes the validator to the model changes.

Parameters:
subscriberValidator - Subscription validator
model - Model to subscribe to
runnable - Task to subscribe


Copyright © 2011. All Rights Reserved.