Package hec.script
Class ScriptEngine
java.lang.Object
hec.script.ScriptEngine
singleton class for the ScriptEngine
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
static final int
static final int
static final int
static final int
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
clear()
compile the script.compile the scriptstatic ScriptEngine
engine()
int
int
int
int
static String
org.python.util.PythonInterpreter
static Script
static String
protected String
removeScriptHeader
(String scriptText) void
setForwardExceptions
(boolean b)
-
Field Details
-
SUCCESS
public static final int SUCCESS- See Also:
-
NO_FILEMANAGER
public static final int NO_FILEMANAGER- See Also:
-
OPENFILE_FAILED
public static final int OPENFILE_FAILED- See Also:
-
ERROR_READING_FILE
public static final int ERROR_READING_FILE- See Also:
-
EXCEPTION_OCCURRED
public static final int EXCEPTION_OCCURRED- See Also:
-
-
Method Details
-
getCacheDirectory
-
init
-
engine
-
setForwardExceptions
public void setForwardExceptions(boolean b) -
compile
compile the script- Parameters:
script
-parent
-- Returns:
-
compile
compile the script.- Parameters:
script
- the script to compilefileName
- the file name of the scriptheaderLines
- the number of header lines the system put in the scriptparent
- the parent component to display the JOptionPane with- Returns:
- null if no errors otherwise the error string.
-
execute
-
execute
- Throws:
Exception
-
execute
public int execute(String scriptFile, String userName, String scriptName, Object[][] args) throws Exception - Throws:
Exception
-
execute
public int execute(String scriptText, String userName, String scriptName, Object[][] args, boolean clientApp) throws Exception - Throws:
Exception
-
removeScriptHeader
-
getNewScript
-
getInterpreter
public org.python.util.PythonInterpreter getInterpreter() -
clear
public static void clear()
-