public int execCommands(Map<String,?> props, String summaryForLogging, List<String> commands, Map<String,?> env) { return execWithLogging(props, summaryForLogging, commands, env, new ExecRunner() { @Override public int exec(ShellTool tool, Map<String,?> flags, List<String> cmds, Map<String,?> env) { return tool.execCommands(flags, cmds, env); }}); }
@Override public KnifeTaskFactory<String> requiringZeroAndReturningStdout() { return (KnifeTaskFactory<String>) super.requiringZeroAndReturningStdout(); } }
@Override public ProcessTaskWrapper<RET> newTask() { return new SystemProcessTaskWrapper("Knife"); }
public ProcessTaskFactory<Boolean> returningIsExitCodeZero() { if (requireExitCodeZero==null) allowingNonZeroExitCode(); return returning(new Function<ProcessTaskWrapper<?>,Boolean>() { public Boolean apply(ProcessTaskWrapper<?> input) { return input.getExitCode()==0; } }); }
public ProcessTaskFactory<String> requiringZeroAndReturningStdout() { requiringExitCodeZero(); return this.<String>returning(ScriptReturnType.STDOUT_STRING); }
@Override public <T2> KnifeTaskFactory<T2> returning(ScriptReturnType type) { return (KnifeTaskFactory<T2>) super.<T2>returning(type); }
@Override public KnifeTaskFactory<Boolean> returningIsExitCodeZero() { return (KnifeTaskFactory<Boolean>) super.returningIsExitCodeZero(); }
public static ProcessTaskFactory<Integer> exec(String ...commands) { return new ConcreteSystemProcessTaskFactory<Integer>(commands); }
@Override public ProcessTaskWrapper<RET> newTask() { return new SystemProcessTaskWrapper(); }
public int execScript(Map<String,?> props, String summaryForLogging, List<String> commands, Map<String,?> env) { return execWithLogging(props, summaryForLogging, commands, env, new ExecRunner() { @Override public int exec(ShellTool ssh, Map<String, ?> flags, List<String> cmds, Map<String, ?> env) { return ssh.execScript(flags, cmds, env); }}); }
@Override public <RET2> KnifeTaskFactory<RET2> returning(Function<ProcessTaskWrapper<?>, RET2> resultTransformation) { return (KnifeTaskFactory<RET2>) super.returning(resultTransformation); }