public class DefaultScriptContext extends java.lang.Object implements ScriptContext
Constructor and Description |
---|
DefaultScriptContext()
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
__step__(java.lang.Object... args)
Enter a step.
|
void |
abort(java.lang.String message)
Abort the current script.
|
void |
echo(java.lang.String message)
Echo a message.
|
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.
|
java.io.File |
getPath(java.lang.String path)
Return the absolute path of a file defined relative to the script file.
|
ScriptLogger |
getScriptLogger()
Return the associated ScriptLogger.
|
ScriptSource |
getScriptSource()
Return the script source.
|
ScriptWrapper<?> |
getScriptWrapper()
Return the script wrapper.
|
void |
setLogger(ScriptLogger logger)
Set the associated ScriptLogger.
|
void |
setScriptSource(ScriptSource source)
Set the Script source.
|
void |
setScriptWrapper(ScriptWrapper<?> wrapper)
Set the script wrapper.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
clearTab, echo, echo, getAdditionalHelper, getAdditionalHelpers, getHelper, getScriptFile, hasAdditionalHelpers, setProgress, setTab
public void setScriptWrapper(ScriptWrapper<?> wrapper)
setScriptWrapper
in interface ScriptContext
wrapper
- the script wrapperpublic ScriptWrapper<?> getScriptWrapper()
getScriptWrapper
in interface ScriptContext
public void setScriptSource(ScriptSource source)
setScriptSource
in interface ScriptContext
source
- the script sourcepublic void setLogger(ScriptLogger logger)
setLogger
in interface ScriptContext
logger
- the associated ScriptLoggerpublic ScriptLogger getScriptLogger()
getScriptLogger
in interface ScriptContext
public ScriptSource getScriptSource()
getScriptSource
in interface ScriptContext
public void echo(java.lang.String message)
echo
in interface ScriptContext
message
- the message textpublic void echo(java.lang.String message, java.lang.String htmlColor)
echo
in interface ScriptContext
message
- the message texthtmlColor
- the message colorpublic void error(java.lang.String message)
error
in interface ScriptContext
message
- the message textpublic java.io.File getPath(java.lang.String path)
getPath
in interface ScriptContext
path
- the relative pathpublic void abort(java.lang.String message) throws AbortScriptException
abort
in interface ScriptContext
message
- the abort messageAbortScriptException
- the exception used to abort the Scriptpublic void __step__(java.lang.Object... args)
__step__
in interface ScriptContext
args
- the argumentsCopyright © 2019-2024 Herve Girod. All Rights Reserved. Documentation and source under the BSD licence