public abstract void execute() throws Throwable;
// clean prep
protected void execLocally(String command)
throws IOException, InterruptedException, NonZeroExitCodeException {
CollectLogPolicy localCollector = new CollectLogPolicy(logger);
command = Templates.getTemplateResult(command, templateDefaults);
LocalCommand localCmd = localCommandFactory.create(localCollector, command);
if(localCmd.getExitCode() != 0) {
throw new NonZeroExitCodeException(String.format(
"Command '%s' failed with exit status %d and output '%s'",
command, localCmd.getExitCode(), localCollector.getOutput()));
}
}