Search in sources :

Example 1 with JGITCompilerBeforeDecorator

use of org.kie.workbench.common.services.backend.compiler.nio.decorators.JGITCompilerBeforeDecorator 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)

Example 2 with JGITCompilerBeforeDecorator

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

the class MavenCompilerFactory method createAndAddNewCompiler.

private static AFCompiler createAndAddNewCompiler(Decorator decorator) {
    AFCompiler<?> compiler;
    switch(decorator) {
        case NONE:
            compiler = new DefaultMavenCompiler();
            break;
        case JGIT_BEFORE:
            compiler = new JGITCompilerBeforeDecorator(new DefaultMavenCompiler());
            break;
        case LOG_OUTPUT_AFTER:
            compiler = new OutputLogAfterDecorator(new DefaultMavenCompiler());
            break;
        case JGIT_BEFORE_AND_LOG_AFTER:
            compiler = new JGITCompilerBeforeDecorator(new OutputLogAfterDecorator(new DefaultMavenCompiler()));
            break;
        default:
            compiler = new DefaultMavenCompiler();
    }
    compilers.put(Decorator.NONE.name(), compiler);
    return compiler;
}
Also used : JGITCompilerBeforeDecorator(org.kie.workbench.common.services.backend.compiler.nio.decorators.JGITCompilerBeforeDecorator) OutputLogAfterDecorator(org.kie.workbench.common.services.backend.compiler.nio.decorators.OutputLogAfterDecorator)

Aggregations

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