Package com.asakusafw.yaess.core

Examples of com.asakusafw.yaess.core.CommandScriptHandler


        for (ExecutionScript execution : executions) {
            switch (execution.getKind()) {
            case COMMAND: {
                CommandScript exec = (CommandScript) execution;
                String profileName = exec.getProfileName();
                CommandScriptHandler handler = profileName == null ? null : commandHandlers.get(profileName);
                if (handler == null) {
                    LOG.debug("Profile {} is not defined in comand script handlers, try wildcard: {}",
                            profileName,
                            exec.getId());
                    handler = commandHandlers.get(CommandScriptHandler.PROFILE_WILDCARD);
View Full Code Here


        CommandScript script = new CommandScript(
                "testing", set(), "profile", "module",
                Arrays.asList(shell.getAbsolutePath(), "Hello, world!"),
                map());

        CommandScriptHandler handler = handler();
        execute(script, handler);

        List<String> results = getOutput(shell);
        assertThat(results, is(Arrays.asList("Hello, world!")));
    }
View Full Code Here

        CommandScript script = new CommandScript(
                "testing", set(), "profile", "module",
                Arrays.asList(shell.getAbsolutePath(), "A", "B", "C", "D"),
                map());

        CommandScriptHandler handler = handler();
        execute(script, handler);

        List<String> results = getOutput(shell);
        assertThat(results, is(Arrays.asList("A", "B", "C", "D")));
    }
View Full Code Here

        CommandScript script = new CommandScript(
                "testing", set(), "profile", "module",
                Arrays.asList("Hello, world!"),
                map());

        CommandScriptHandler handler = handler("command.0", shell.getAbsolutePath());
        execute(script, handler);

        List<String> results = getOutput(shell);
        assertThat(results, is(Arrays.asList("Hello, world!")));
    }
View Full Code Here

        CommandScript script = new CommandScript(
                "testing", set(), "profile", "module",
                Arrays.asList("A", "B", "C"),
                map());

        CommandScriptHandler handler = handler(
                "command.0", shell.getAbsolutePath(),
                "command.1", "@[2]-@[0]-@[1]");
        execute(script, handler);

        List<String> results = getOutput(shell);
View Full Code Here

        CommandScript script = new CommandScript(
                "testing", set(), "profile", "module",
                Arrays.asList(shell.getAbsolutePath()),
                map("script", "SCRIPT", "override", "SCRIPT"));

        CommandScriptHandler handler = handler("env.handler", "HANDLER", "env.override", "HANDLER");
        execute(script, handler);

        List<String> results = getOutput(shell);
        assertThat(results, has(equalToIgnoringWhiteSpace("script=SCRIPT")));
        assertThat(results, has(equalToIgnoringWhiteSpace("handler=HANDLER")));
View Full Code Here

        CommandScript script = new CommandScript(
                "testing", set(), "profile", "module",
                Arrays.asList(shell.getAbsolutePath()),
                map("script", "SCRIPT", "override", "SCRIPT"));

        CommandScriptHandler handler = handler("env.handler", "HANDLER", "env.override", "HANDLER");

        RuntimeContext rc = RuntimeContext.DEFAULT
            .batchId("b")
            .mode(ExecutionMode.SIMULATION)
            .buildId("OK");
View Full Code Here

        CommandScript script = new CommandScript(
                "testing", set(), "profile", "module",
                Arrays.asList(shell.getAbsolutePath(), "Hello, world!"),
                map());

        CommandScriptHandler handler = handler();
        ExecutionContext context = new ExecutionContext(
                "tbatch", "tflow", "texec", ExecutionPhase.MAIN, map());
        handler.execute(PhaseMonitor.NULL, context, script);
    }
View Full Code Here

        CommandScript script = new CommandScript(
                "testing", set(), "profile", "module",
                Arrays.asList(shell.getAbsolutePath(), "Hello, world!"),
                map());

        CommandScriptHandler handler = handler();
        ExecutionContext context = new ExecutionContext(
                "tbatch", "tflow", "texec", ExecutionPhase.MAIN, map());
        handler.execute(ExecutionMonitor.NULL, context, script);
    }
View Full Code Here

        CommandScript script = new CommandScript(
                "testing", set(), "profile", "module",
                Arrays.asList("Hello, world!"),
                map());

        CommandScriptHandler handler = handler(
                "command.0", shell.getAbsolutePath(),
                "command.1", "@[1]");
        ExecutionContext context = new ExecutionContext(
                "tbatch", "tflow", "texec", ExecutionPhase.MAIN, map());
        handler.execute(ExecutionMonitor.NULL, context, script);
    }
View Full Code Here

TOP

Related Classes of com.asakusafw.yaess.core.CommandScriptHandler

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.