public interface ScriptContext
Modifier and Type | Method and Description |
---|---|
default void |
__step__(java.lang.Object... args)
Enter a step.
|
void |
abort(java.lang.String message)
Abort the current script.
|
default void |
clearTab()
Clear the current value of the tab for the text.
|
default void |
echo(java.lang.Number number)
Echo a number.
|
default void |
echo(java.lang.Number number,
java.lang.String htmlColor)
Echo a number with a specified color.
|
void |
echo(java.lang.String message)
Echo a message.
|
default void |
echo(java.lang.String message,
java.lang.String htmlColor)
Echo a message with a specified color.
|
void |
error(java.lang.String message)
Error a message.
|
default java.lang.Object |
getAdditionalHelper(java.lang.String name)
Return the additional helper with a specified name.
|
default java.util.Map<java.lang.String,java.lang.Object> |
getAdditionalHelpers()
Return the additional helpers.
|
default ScriptHelper |
getHelper()
Return the script helper.
|
java.io.File |
getPath(java.lang.String path)
Return the absolute path of a file defined relative to the script file.
|
default java.io.File |
getScriptFile()
Return the script file.
|
ScriptLogger |
getScriptLogger()
Return the associated ScriptLogger.
|
ScriptSource |
getScriptSource()
Return the script source.
|
default ScriptWrapper<?> |
getScriptWrapper()
Return the script wrapper.
|
default boolean |
hasAdditionalHelpers()
Return true if there are additional helpers.
|
void |
setLogger(ScriptLogger logger)
Set the associated ScriptLogger.
|
default void |
setProgress(float value)
Set the value of the script progression.
|
void |
setScriptSource(ScriptSource source)
Set the Script source.
|
default void |
setScriptWrapper(ScriptWrapper<?> wrapper)
Set the script wrapper.
|
default void |
setTab(int tabs)
Set the current value for of the tab for the text.
|
default void setScriptWrapper(ScriptWrapper<?> wrapper)
wrapper
- the script wrapperdefault ScriptWrapper<?> getScriptWrapper()
default ScriptHelper getHelper()
void setScriptSource(ScriptSource source)
source
- the script sourcevoid setLogger(ScriptLogger logger)
logger
- the associated ScriptLoggerScriptLogger getScriptLogger()
default java.util.Map<java.lang.String,java.lang.Object> getAdditionalHelpers()
default java.lang.Object getAdditionalHelper(java.lang.String name)
name
- the helper namedefault boolean hasAdditionalHelpers()
ScriptSource getScriptSource()
default java.io.File getScriptFile()
void echo(java.lang.String message)
message
- the message textdefault void echo(java.lang.String message, java.lang.String htmlColor)
echo(java.lang.String)
.message
- the message texthtmlColor
- the message colordefault void echo(java.lang.Number number)
number
- the numberdefault void echo(java.lang.Number number, java.lang.String htmlColor)
number
- the numberhtmlColor
- the number colorvoid error(java.lang.String message)
message
- the message textdefault void clearTab()
default void setTab(int tabs)
tabs
. Do nothing by default.tabs
- the current value for of the tab for the textdefault void setProgress(float value)
value
- the valuejava.io.File getPath(java.lang.String path)
path
- the relative pathvoid abort(java.lang.String message) throws AbortScriptException
message
- the abort messageAbortScriptException
- the exception used to abort the Scriptdefault void __step__(java.lang.Object... args)
args
- the argumentsCopyright © 2019-2024 Herve Girod. All Rights Reserved. Documentation and source under the BSD licence