Package org.qdl_lang.scripting
Class Scripts
- java.lang.Object
-
- org.qdl_lang.vfs.FileEntryConstants
-
- org.qdl_lang.scripting.Scripts
-
public class Scripts extends FileEntryConstants
Utilities for converting a singleQDLScript
to or from JSON. If you need to work withScriptSet
s, then consultJSONScriptUtil
.Created by Jeff Gaynor
on 2/5/20 at 11:06 AM
-
-
Field Summary
Fields Modifier and Type Field Description static String
CODE
Identifies the JSON array of lines of codestatic String
EXEC_PHASE
Identifies a phase of execution where this may be invoked.static String
LANG_VERSION
The version of the language this script is compatible with.static String
LANGUAGE
The language this script is written instatic String
RUN
Identifies a call to construct a script_load() command call.static String
SCRIPT
Identifies this objectstatic String
SCRIPT_VERSION
The revision of this script.-
Fields inherited from class org.qdl_lang.vfs.FileEntryConstants
CREATE_TIME, ID, LAST_MODIFIED, LENGTH
-
-
Constructor Summary
Constructors Constructor Description Scripts()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static QDLScript
fromJSON(net.sf.json.JSONObject rawJSON)
static void
main(String[] args)
static net.sf.json.JSONObject
toJSON(StringBuffer script, edu.uiuc.ncsa.security.core.configuration.XProperties prop)
Returns a script object of the form {"script" : {"key0" : "value0",..., "code":[lines]}} where the key and value pairs are information in the properties file.static net.sf.json.JSONObject
toJSON(QDLScript script)
-
-
-
Field Detail
-
CODE
public static final String CODE
Identifies the JSON array of lines of code- See Also:
- Constant Field Values
-
RUN
public static final String RUN
Identifies a call to construct a script_load() command call. Note that scripts are loaded in to the current environment and run because on the server, the environment has been initialized. If we were to use script_run, then none of the state after the call would be available to the scripting engine.- See Also:
- Constant Field Values
-
SCRIPT
public static final String SCRIPT
Identifies this object- See Also:
- Constant Field Values
-
EXEC_PHASE
public static final String EXEC_PHASE
Identifies a phase of execution where this may be invoked. The phases are defined on the server, this merely provides a place to put it- See Also:
- Constant Field Values
-
LANG_VERSION
public static final String LANG_VERSION
The version of the language this script is compatible with.- See Also:
- Constant Field Values
-
SCRIPT_VERSION
public static final String SCRIPT_VERSION
The revision of this script.- See Also:
- Constant Field Values
-
LANGUAGE
public static final String LANGUAGE
The language this script is written in- See Also:
- Constant Field Values
-
-
Method Detail
-
toJSON
public static net.sf.json.JSONObject toJSON(StringBuffer script, edu.uiuc.ncsa.security.core.configuration.XProperties prop)
Returns a script object of the form {"script" : {"key0" : "value0",..., "code":[lines]}} where the key and value pairs are information in the properties file.- Parameters:
script
-prop
-- Returns:
-
toJSON
public static net.sf.json.JSONObject toJSON(QDLScript script)
-
fromJSON
public static QDLScript fromJSON(net.sf.json.JSONObject rawJSON)
-
main
public static void main(String[] args)
-
-