Search in sources :

Example 1 with KieAfterDecorator

use of org.kie.workbench.common.services.backend.compiler.nio.decorators.KieAfterDecorator in project kie-wb-common by kiegroup.

the class KieMavenCompilerFactory method createAndAddNewCompiler.

private static AFCompiler createAndAddNewCompiler(KieDecorator decorator) {
    AFCompiler compiler;
    switch(decorator) {
        case NONE:
            compiler = new KieDefaultMavenCompiler();
            break;
        case KIE_AFTER:
            compiler = new KieAfterDecorator(new KieDefaultMavenCompiler());
            break;
        case KIE_AND_LOG_AFTER:
            compiler = new KieAfterDecorator(new OutputLogAfterDecorator(new KieDefaultMavenCompiler()));
            break;
        case JGIT_BEFORE:
            compiler = new JGITCompilerBeforeDecorator(new KieDefaultMavenCompiler());
            break;
        case JGIT_BEFORE_AND_LOG_AFTER:
            compiler = new JGITCompilerBeforeDecorator(new OutputLogAfterDecorator(new KieDefaultMavenCompiler()));
            break;
        case JGIT_BEFORE_AND_KIE_AFTER:
            compiler = new JGITCompilerBeforeDecorator(new KieAfterDecorator(new KieDefaultMavenCompiler()));
            break;
        case LOG_OUTPUT_AFTER:
            compiler = new OutputLogAfterDecorator(new KieDefaultMavenCompiler());
            break;
        case JGIT_BEFORE_AND_KIE_AND_LOG_AFTER:
            compiler = new JGITCompilerBeforeDecorator(new KieAfterDecorator(new OutputLogAfterDecorator(new KieDefaultMavenCompiler())));
            break;
        default:
            compiler = new KieDefaultMavenCompiler();
    }
    compilers.put(Decorator.NONE.name(), compiler);
    return compiler;
}
Also used : KieAfterDecorator(org.kie.workbench.common.services.backend.compiler.nio.decorators.KieAfterDecorator) JGITCompilerBeforeDecorator(org.kie.workbench.common.services.backend.compiler.nio.decorators.JGITCompilerBeforeDecorator) OutputLogAfterDecorator(org.kie.workbench.common.services.backend.compiler.nio.decorators.OutputLogAfterDecorator) AFCompiler(org.kie.workbench.common.services.backend.compiler.nio.AFCompiler)

Aggregations

AFCompiler (org.kie.workbench.common.services.backend.compiler.nio.AFCompiler)1 JGITCompilerBeforeDecorator (org.kie.workbench.common.services.backend.compiler.nio.decorators.JGITCompilerBeforeDecorator)1 KieAfterDecorator (org.kie.workbench.common.services.backend.compiler.nio.decorators.KieAfterDecorator)1 OutputLogAfterDecorator (org.kie.workbench.common.services.backend.compiler.nio.decorators.OutputLogAfterDecorator)1