Package hec.script
Class ScriptEngine
java.lang.Object
hec.script.ScriptEngine
singleton class for the ScriptEngine
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final intstatic final intstatic final intstatic final int -
Method Summary
Modifier and TypeMethodDescriptionstatic voidclear()compile the script.compile the scriptstatic ScriptEngineengine()intintintintstatic Stringorg.python.util.PythonInterpreterstatic Scriptstatic Stringprotected StringremoveScriptHeader(String scriptText) voidsetForwardExceptions(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()
-