Search in sources :

Example 1 with Processor

use of org.asqatasun.processor.Processor in project Asqatasun by Asqatasun.

the class ProcessorServiceImpl method process.

@Override
public Collection<ProcessResult> process(Collection<Content> contentList, Collection<Test> testList) {
    Collection<ProcessResult> processResultList = new ArrayList<>();
    Processor processor = processorFactory.create();
    for (Content content : contentList) {
        if (content instanceof SSP) {
            processor.setSSP((SSP) content);
            for (Test test : testList) {
                if (!test.getNoProcess()) {
                    RuleImplementation ruleImplementation = ruleImplementationLoaderService.loadRuleImplementation(test);
                    processor.setRuleImplementation(ruleImplementation);
                    processor.run();
                    processResultList.add(processor.getResult());
                }
            }
        }
    }
    return processResultList;
}
Also used : SSP(org.asqatasun.entity.audit.SSP) Processor(org.asqatasun.processor.Processor) Test(org.asqatasun.entity.reference.Test) Content(org.asqatasun.entity.audit.Content) ArrayList(java.util.ArrayList) ProcessResult(org.asqatasun.entity.audit.ProcessResult) RuleImplementation(org.asqatasun.ruleimplementation.RuleImplementation)

Aggregations

ArrayList (java.util.ArrayList)1 Content (org.asqatasun.entity.audit.Content)1 ProcessResult (org.asqatasun.entity.audit.ProcessResult)1 SSP (org.asqatasun.entity.audit.SSP)1 Test (org.asqatasun.entity.reference.Test)1 Processor (org.asqatasun.processor.Processor)1 RuleImplementation (org.asqatasun.ruleimplementation.RuleImplementation)1