[ 
https://issues.apache.org/jira/browse/DROIDS-93?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12883731#action_12883731
 ] 

Eugen Paraschiv commented on DROIDS-93:
---------------------------------------

This is a simple usage example for the ChainTaskValidator implementation: 

final TaskValidator< Link > integrityTaskValidator = new 
IntegrityTaskValidator< Link >();
final TaskValidator< Link > maxDepthTaskValidator = new MaxDepthTaskValidator< 
Link >( 1 );

final ChainTaskValidator< Link > taskValidatorChain = new ChainTaskValidator< 
Link >();

taskValidatorChain.addTaskValidator( integrityTaskValidator );
taskValidatorChain.addTaskValidator( maxDepthTaskValidator );

simpleQueue.setTaskValidator( taskValidatorChain );

> Make the validation process more flexible with chain validators
> ---------------------------------------------------------------
>
>                 Key: DROIDS-93
>                 URL: https://issues.apache.org/jira/browse/DROIDS-93
>             Project: Droids
>          Issue Type: Improvement
>          Components: core
>    Affects Versions: 0.0.1
>            Reporter: Eugen Paraschiv
>            Priority: Critical
>             Fix For: 0.0.1
>
>         Attachments: ChainTaskValidator.patch
>
>
> The validation process needs more flexibility - a chain of validators that 
> are applied one after the other; when one would consider the entity invalid, 
> the process would stop (voters). This way the separation of each validation 
> rule can be done more cleanly and the validation process can be flexible by 
> just plugging in different validators as needed, rather than gathering all 
> the rules in a single validator. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to