public Blaze build() { loadDependencies(); // also calls locate(), configure(), and resolveDependencies() compileScript(); return new Blaze(context, dependencies, engine, script); } }
public R runResult() throws BlazeException { if (used) { throw new BlazeException("Can only run once"); } R result = doRun(); used = true; return result; }
@Override public void execute(String task) throws BlazeException { try { this.invocable.invokeFunction(task); } catch (NoSuchMethodException e) { throw new NoSuchTaskException(task); } catch (ScriptException e) { throw new BlazeException("Unable to execute task in nashorn script", e); } }
public Blaze buildBlaze() { return new Blaze.Builder() .file(blazeFile) .directory(blazeDir) .build(); }
@Override public void init(Context initialContext) throws BlazeException { super.init(initialContext); }
/** * Fails a script with a supplied message to be logged. Does not trigger * a stacktrace to be logged! * @param message The message */ static public void fail(String message) { throw new MessageOnlyException(message); }
/** * Current context of execution. Usually bound to a thread local. * @return The current context */ static public Context currentContext() { return ContextHolder.get(); }
@Override public char[] passwordPrompt(String prompt, Object... args) { return this.prompter.passwordPrompt(prompt, args); }
@Override public String prompt(String prompt, Object... args) { return this.prompter.prompt(prompt, args); }
public R runResult() throws BlazeException { if (used) { throw new BlazeException("Can only run once"); } R result = doRun(); used = true; return result; }
@Override public void execute(String task) throws BlazeException { try { this.invocable.invokeFunction(task); } catch (NoSuchMethodException e) { throw new NoSuchTaskException(task); } catch (ScriptException e) { throw new BlazeException("Unable to execute task in nashorn script", e); } }
public Blaze buildBlaze() { return new Blaze.Builder() .file(blazeFile) .directory(blazeDir) .build(); }
public Blaze build() { loadDependencies(); // also calls locate(), configure(), and resolveDependencies() compileScript(); return new Blaze(context, dependencies, engine, script); } }
@Override public void init(Context initialContext) throws BlazeException { super.init(initialContext); }
/** * Fails a script with a supplied message to be logged. Does not trigger * a stacktrace to be logged! * @param message The message */ static public void fail(String message) { throw new MessageOnlyException(message); }
/** * Current context of execution. Usually bound to a thread local. * @return The current context */ static public Context currentContext() { return ContextHolder.get(); }
@Override public char[] passwordPrompt(String prompt, Object... args) { return this.prompter.passwordPrompt(prompt, args); }
@Override public void fail(String message) { throw new MessageOnlyException(message); }