Package org.qdl_lang.workspace
Class WorkspaceCommands
- java.lang.Object
-
- org.qdl_lang.workspace.WorkspaceCommands
-
- All Implemented Interfaces:
edu.uiuc.ncsa.security.core.Logable,Serializable
- Direct Known Subclasses:
QDLSASWorkspaceCommands
public class WorkspaceCommands extends Object implements edu.uiuc.ncsa.security.core.Logable, Serializable
This is the helper class to theQDLWorkspacethat does the grunt work of the ) commands.Created by Jeff Gaynor
on 1/30/20 at 9:21 AM- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classWorkspaceCommands.RegexFileFilterstatic classWorkspaceCommands.SIEntriesSet of SIEntries by Process ID.static classWorkspaceCommands.WSInternalsstatic classWorkspaceCommands.WSLibEntry
-
Field Summary
-
Constructor Summary
Constructors Constructor Description WorkspaceCommands()WorkspaceCommands(edu.uiuc.ncsa.security.util.cli.IOInterface ioInterface)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected Object_doBufferCheck(edu.uiuc.ncsa.security.util.cli.InputLine inputLine)protected Object_doBufferCreate(edu.uiuc.ncsa.security.util.cli.InputLine inputLine)protected Object_doBufferDelete(edu.uiuc.ncsa.security.util.cli.InputLine inputLine)protected Object_doBufferEdit(edu.uiuc.ncsa.security.util.cli.InputLine inputLine)protected Object_doBufferLink(edu.uiuc.ncsa.security.util.cli.InputLine inputLine)protected Object_doBufferList(edu.uiuc.ncsa.security.util.cli.InputLine inputLine)protected Object_doBufferPath(edu.uiuc.ncsa.security.util.cli.InputLine inputLine)protected Object_doBufferReload(edu.uiuc.ncsa.security.util.cli.InputLine inputLine)protected Object_doBufferReset(edu.uiuc.ncsa.security.util.cli.InputLine inputLine)protected Object_doBufferRun(edu.uiuc.ncsa.security.util.cli.InputLine inputLine)protected Object_doBufferShow(edu.uiuc.ncsa.security.util.cli.InputLine inputLine)protected Object_doBufferWrite(edu.uiuc.ncsa.security.util.cli.InputLine inputLine)protected Object_doBufferWrite(edu.uiuc.ncsa.security.util.cli.InputLine inputLine, boolean doOuput)Used internally, This has a flag to suppress certain messages.protected Object_doEditor(edu.uiuc.ncsa.security.util.cli.InputLine inputLine)protected Object_doFileEdit(edu.uiuc.ncsa.security.util.cli.InputLine inputLine)protected Object_doFuncEdit(edu.uiuc.ncsa.security.util.cli.InputLine inputLine)protected void_doGUIEditor(BufferManager.BufferRecord br)protected boolean_doHelp(edu.uiuc.ncsa.security.util.cli.InputLine inputLine)Boolean values function that returns true if the inputline has some form of help in it.protected Object_doSIGet(edu.uiuc.ncsa.security.util.cli.InputLine inputLine)protected Object_doSIList(edu.uiuc.ncsa.security.util.cli.InputLine inputLine)protected Object_doSIRemove(edu.uiuc.ncsa.security.util.cli.InputLine inputLine)protected Object_doSIResume(edu.uiuc.ncsa.security.util.cli.InputLine inputLine)protected Object_doSISet(edu.uiuc.ncsa.security.util.cli.InputLine inputLine)protected Object_doVarEdit(edu.uiuc.ncsa.security.util.cli.InputLine inputLine)protected Object_envDrop(edu.uiuc.ncsa.security.util.cli.InputLine inputLine)protected Object_envGet(edu.uiuc.ncsa.security.util.cli.InputLine inputLine)protected Object_envList(edu.uiuc.ncsa.security.util.cli.InputLine inputLine)protected Object_envLoad(edu.uiuc.ncsa.security.util.cli.InputLine inputLine)protected Object_envSave(edu.uiuc.ncsa.security.util.cli.InputLine inputLine)protected Object_envSet(edu.uiuc.ncsa.security.util.cli.InputLine inputLine)protected Object_fileCopy(edu.uiuc.ncsa.security.util.cli.InputLine inputLine)Copies any two files on the system including between VFS.protected Object_fileCopy(String source, String target, boolean isBinary)protected Object_fileDelete(edu.uiuc.ncsa.security.util.cli.InputLine inputLine)protected Object_fileDir(edu.uiuc.ncsa.security.util.cli.InputLine inputLine)protected Object_fileMkDir(edu.uiuc.ncsa.security.util.cli.InputLine inputLine)protected Object_fileRmDir(edu.uiuc.ncsa.security.util.cli.InputLine inputLine)protected Object_fileVFS(edu.uiuc.ncsa.security.util.cli.InputLine inputLine)protected Object_funcsDrop(edu.uiuc.ncsa.security.util.cli.InputLine inputLine)protected Object_funcsHelp(edu.uiuc.ncsa.security.util.cli.InputLine inputLine)protected Object_funcsList(edu.uiuc.ncsa.security.util.cli.InputLine inputLine)protected Object_funcsListSystem(edu.uiuc.ncsa.security.util.cli.InputLine inputLine)protected Object_moduleImports(edu.uiuc.ncsa.security.util.cli.InputLine inputLine)protected Object_modulesList(edu.uiuc.ncsa.security.util.cli.InputLine inputLine)protected String_resolveLibFile(edu.uiuc.ncsa.security.util.cli.InputLine inputLine)protected void_saveAllBuffers()Save all of the buffers.protected Object_varsDrop(edu.uiuc.ncsa.security.util.cli.InputLine inputLine)protected Object_varsList(edu.uiuc.ncsa.security.util.cli.InputLine inputLine)protected Object_varsSystem(edu.uiuc.ncsa.security.util.cli.InputLine inputLine)protected Object_wsClear(edu.uiuc.ncsa.security.util.cli.InputLine inputLine)protected Object_wsEchoMode(edu.uiuc.ncsa.security.util.cli.InputLine inputLine)protected int_wsGet(edu.uiuc.ncsa.security.util.cli.InputLine inputLine)protected int_wsLibList(edu.uiuc.ncsa.security.util.cli.InputLine inputLine)This will either print out the information about a single workspace (if a file is given) or every workspace in a directory.protected Object_wsListDrop(edu.uiuc.ncsa.security.util.cli.InputLine inputLine)protected Object_wsLoad(edu.uiuc.ncsa.security.util.cli.InputLine inputLine)protected int_wsSave(edu.uiuc.ncsa.security.util.cli.InputLine inputLine)protected Object_wsSet(edu.uiuc.ncsa.security.util.cli.InputLine inputLine)boolean_xmlWSJavaLoad(InputStream fis)boolean_xmlWSJavaLoad(String fullPath)void_xmlWSJavaSave(OutputStream fos)long[]_xmlWSJavaSave(String path)void_xmlWSQDLLoad(QDLInterpreter qdlInterpreter, Reader reader)Just loads and runs aReader.long_xmlWSQDLSave(Writer fileWriter)long_xmlWSQDLSave(String path)protected StringapplyTemplates(String inline)protected voidcfLoad(edu.uiuc.ncsa.security.util.cli.InputLine inputLine, String cfgName)CF Loader for XML configurationn file.protected QDLInterpretercloneInterpreter(edu.uiuc.ncsa.security.util.cli.InputLine inputLine)voiddebug(String x)protected ObjectdoEnvCommand(edu.uiuc.ncsa.security.util.cli.InputLine inputLine)This has several states: clear (no args) -- clear the environment drop name -- remove a variable get name - show the value of a variable list (no args) - print the entire environment load filename - add the variables in the file to the current state save [file] - save the environment to a file.protected ObjectdoFileCommands(edu.uiuc.ncsa.security.util.cli.InputLine inputLine)protected ObjectdoFontCommand(edu.uiuc.ncsa.security.util.cli.InputLine inputLine)protected ObjectdoFuncs(edu.uiuc.ncsa.security.util.cli.InputLine inputLine)Modes are [list] - list all of the variables help [name argCount] - no arguments means list all, otherwise, find the function with the signature. drop name - remove a local function.protected ObjectdoHelp(edu.uiuc.ncsa.security.util.cli.InputLine inputLine)Just print the general helpprotected ObjectdoModulesCommand(edu.uiuc.ncsa.security.util.cli.InputLine inputLine)Optional list argument.protected ObjectdoSICommand(edu.uiuc.ncsa.security.util.cli.InputLine inputLine)protected ObjectdoVars(edu.uiuc.ncsa.security.util.cli.InputLine inputLine)Either show all variables (no arg or argument of "list") or
drop name -- remove the given symbol from the local symbol table.protected ObjectdoWS(edu.uiuc.ncsa.security.util.cli.InputLine inputLine)Commands are:
load filename -- loads the given file, replacing the current state save filename -- serializes the current workspace to the file clear -- clears the state completely. id -- print the currently named id, i.e., the name of the file if loadedvoideditDone(EditDoneEvent editDoneEvent)ObjecteditFile(List<String> input, List<String> output, String fileName)ObjecteditFunction(List<String> inputForm, List<String> output, String fName, int argCount)ObjecteditVariable(List<String> inputForm, List<String> output, String varName, boolean isText, boolean isStem)voiderror(String x)voiderror(String x, Throwable t)Objectexecute(String inline)Objectexecute2(String inline)protected voidfigureOutFont(edu.uiuc.ncsa.security.util.cli.InputLine inputLine)protected StringfontReport(Font font)protected StringformatBufferRecord(int ndx, BufferManager.BufferRecord br)protected voidfromCommandLine(edu.uiuc.ncsa.security.util.cli.InputLine inputLine)voidfromConfigFile(edu.uiuc.ncsa.security.util.cli.InputLine inputLine)voidfromConfigFile(edu.uiuc.ncsa.security.util.cli.InputLine inputLine, QDLEnvironment qe)WorkspaceCommandsfromJSON(net.sf.json.JSONObject jsonObject)booleanfromXML(XMLEventReader xer, boolean skipBadModules)edu.uiuc.ncsa.security.core.util.DoubleHashMap<String,String>getAltLookup()longgetAutosaveInterval()protected BufferManager.BufferRecordgetBR(edu.uiuc.ncsa.security.util.cli.InputLine inputLine)StringgetBufferDefaultSavePath()BufferManagergetBufferManager()static intgetCurrentPID()SIEntrygetCurrentSIEntry()StringgetDescription()edu.uiuc.ncsa.security.core.configuration.XPropertiesgetEnv()StringgetExternalEditorName()FontgetFont()protected List<String>getFunctionDocFromVariable(String name, int argCount)StringgetFunctionHelp(String text)List<String>getFunctionList()This is used in public facing queries to the workspace, from e.g.StringgetHelpTopic(String text)StringgetHelpTopicExample(String text)static WorkspaceCommandsgetInstance()Factory method to create an instance.static WorkspaceCommandsgetInstance(edu.uiuc.ncsa.security.util.cli.IOInterface ioInterface)QDLInterpretergetInterpreter()edu.uiuc.ncsa.security.util.cli.IOInterfacegetIoInterface()ObjectgetLastResult()List<LibLoader>getLibLoaders()Override for customLibLoaders.edu.uiuc.ncsa.security.core.util.MyLoggingFacadegetLogger()protected List<String>getModuleDocFromVariable(String name)HashMap<String,String>getOnlineExamples()HashMap<String,String>getOnlineHelp()edu.uiuc.ncsa.security.util.cli.editing.EditorsgetQdlEditors()QDLEnvironmentgetQdlEnvironment()WorkspaceCommands.SIEntriesgetSIEntries()protected SIInterruptListgetSIInterruptList(edu.uiuc.ncsa.security.util.cli.InputLine inputLine, String... flags)Create the interrupt list from the input line with any flags.StategetState()Creates the top-level state object for the system.SwingTerminalgetSwingTerminal()This is really only aSwingTerminalor SASterminal.protected FilegetTempDir()QDLWorkspacegetWorkspace()static WorkspaceCommandsProvidergetWorkspaceCommandsProvider()StringgetWSID()protected ObjectgetWSVariable(String key)Get a workspace variable.protected XMLEventReadergetXMLEventReader(String fullPath, boolean isCompressXML)booleanhasEditors()voidinfo(String x)voidinit(edu.uiuc.ncsa.security.util.cli.InputLine inputLine)Bootstraps the whole thing.protected voidinitAutosave()protected InputStreaminputStreamFromFile(File f)protected ObjectinvokeEditor(BufferManager.BufferRecord br, List<String> result)booleanisAnsiModeOn()booleanisAssertionsOn()booleanisAutosaveMessagesOn()booleanisAutosaveOn()booleanisCompressXML()booleanisDebugOn()booleanisEchoModeOn()static booleanisOffOrFalse(String x)static booleanisOnOrTrue(String x)booleanisPreprocessorOn()booleanisPrettyPrint()protected booleanisQELoaded()booleanisRunScript()booleanisSwingGUI()booleanisUseExternalEditor()protected voidlistEditors()voidloadQE(edu.uiuc.ncsa.security.util.cli.InputLine inputLine, String cfgName)WorkspaceCommandsnewInstance()Use this to create new instances of this with sameIOInterfaceas the instance.WorkspaceCommandsnewInstance(edu.uiuc.ncsa.security.util.cli.IOInterface ioInterface)protected voidoldLoad(edu.uiuc.ncsa.security.util.cli.InputLine inputLine, String cfgName)Uses Apache commons.protected StringonOrOff(boolean b)protected voidprintAllWSVars()protected ObjectprintList(edu.uiuc.ncsa.security.util.cli.InputLine inputLine, TreeSet<String> list)Any list of strings (functions, variables, modules, etc.) is listed using this formatting function.protected WorkspaceCommands.WSLibEntryprocessJavaLibEntry(boolean isVFS, String fullPath, File currentFile)Looks for a lib entry that was serialized using Java serialization.protected WorkspaceCommands.WSLibEntryprocessJSONLibEntry(boolean isVFS, String fullPath)protected WorkspaceCommands.WSLibEntryprocessJSONLibEntry(boolean isVFS, String fullPath, boolean compressionOn)protected WorkspaceCommands.WSLibEntryprocessXMLLibEntry(boolean isVFS, String fullPath, File currentFile)Looks at a lib entry that was serialized in XMLStringreadline()Stringreadline(String prompt)protected FileresolveAgainstRoot(String file)If this is a relative file, it is resolved against the root directory.protected String[]resolveRealHelpName(String text)ObjectrestoreFile(List<String> content, String fileName)ObjectrestoreFunction(List<String> inputForm, String fName, int argCount)ObjectrestoreVariable(String varName, List<String> content, boolean isText, boolean isStem)voidrunMacro(List<String> commands)voidsay(String x)Prints with the default indent and a linefeed.protected voidsayi(String x)prints with the current indent and a linefeed.protected voidsayii(String x)Double indent -- useful for lists.voidsetAnsiModeOn(boolean ansiModeOn)voidsetAssertionsOn(boolean assertionsOn)voidsetAutosaveInterval(long autosaveInterval)voidsetAutosaveMessagesOn(boolean autosaveMessagesOn)voidsetAutosaveOn(boolean autosaveOn)voidsetCompressXML(boolean compressXML)voidsetCurrentPID(int currentPID)voidsetDebugOn(boolean debugOn)voidsetDescription(String description)Human readable dscription of this workspace.voidsetEchoModeOn(boolean echoModeOn)voidsetEnv(edu.uiuc.ncsa.security.core.configuration.XProperties xp)voidsetExternalEditorName(String externalEditorName)voidsetFont(Font font)static voidsetInstance(WorkspaceCommands wc)voidsetIoInterface(edu.uiuc.ncsa.security.util.cli.IOInterface ioInterface)voidsetPreprocessorOn(boolean preprocessorOn)voidsetPrettyPrint(boolean prettyPrint)voidsetQdlEditors(edu.uiuc.ncsa.security.util.cli.editing.Editors qdlEditors)voidsetQdlEnvironment(QDLEnvironment qdlEnvironment)voidsetState(State state)This is used in serialization tests.voidsetSwingGUI(boolean swingGUI)voidsetSwingTerminal(SwingTerminal swingTerminal)protected voidsetupJavaModule(State state, QDLLoader loader, boolean importASAP)voidsetUseExternalEditor(boolean useExternalEditor)voidsetWorkspace(QDLWorkspace workspace)static voidsetWorkspaceCommandsProvider(WorkspaceCommandsProvider workspaceCommandsProvider)voidsetWSID(String wsID)protected voidshowGeneralHelp()protected voidshowHelp4Help()protected voidshutdown()protected voidsplashScreen()net.sf.json.JSONObjecttoJSON()voidtoXML(XMLStreamWriter xsw)protected booleanupdateWSState(WorkspaceCommands newCommands)This takes an updatedWorkspaceCommandsobject and updates the currently active workspace.protected booleanuseExternalEditor()protected edu.uiuc.ncsa.security.util.cli.InputLinevariableLookup(edu.uiuc.ncsa.security.util.cli.InputLine inputLine)Replaces ) commands prefixed with a by their value from the symbol table.voidwarn(String x)protected longwriteFile(String fullPath, String payload, boolean compress)write the payload to the correct file (VFS or local), compressing as needed.
-
-
-
Field Detail
-
SWITCH
public static final String SWITCH
- See Also:
- Constant Field Values
-
DISPLAY_WIDTH_SWITCH
public static final String DISPLAY_WIDTH_SWITCH
- See Also:
- Constant Field Values
-
FQ_SWITCH
public static final String FQ_SWITCH
- See Also:
- Constant Field Values
-
REGEX_SWITCH
public static final String REGEX_SWITCH
- See Also:
- Constant Field Values
-
COMPACT_ALIAS_SWITCH
public static final String COMPACT_ALIAS_SWITCH
- See Also:
- Constant Field Values
-
COLUMNS_VIEW_SWITCH
public static final String COLUMNS_VIEW_SWITCH
- See Also:
- Constant Field Values
-
SHOW_FAILURES
public static final String SHOW_FAILURES
- See Also:
- Constant Field Values
-
SHOW_ONLY_FAILURES
public static final String SHOW_ONLY_FAILURES
- See Also:
- Constant Field Values
-
SAVE_AS_JAVA_FLAG
public static final String SAVE_AS_JAVA_FLAG
- See Also:
- Constant Field Values
-
KEEP_WSF
public static final String KEEP_WSF
- See Also:
- Constant Field Values
-
LINE_EDITOR_NAME
public static final String LINE_EDITOR_NAME
- See Also:
- Constant Field Values
-
logger
public transient edu.uiuc.ncsa.security.core.util.MyLoggingFacade logger
-
FUNCS_COMMAND
protected static final String FUNCS_COMMAND
- See Also:
- Constant Field Values
-
HELP_COMMAND
protected static final String HELP_COMMAND
- See Also:
- Constant Field Values
-
OFF_COMMAND
public static final String OFF_COMMAND
- See Also:
- Constant Field Values
-
BUFFER2_COMMAND
protected static final String BUFFER2_COMMAND
- See Also:
- Constant Field Values
-
FONTS_COMMAND
protected static final String FONTS_COMMAND
- See Also:
- Constant Field Values
-
SHORT_BUFFER2_COMMAND
protected static final String SHORT_BUFFER2_COMMAND
- See Also:
- Constant Field Values
-
EXECUTE_COMMAND
protected static final String EXECUTE_COMMAND
- See Also:
- Constant Field Values
-
RESUME_COMMAND
protected static final String RESUME_COMMAND
- See Also:
- Constant Field Values
-
MODULES_COMMAND
protected static final String MODULES_COMMAND
- See Also:
- Constant Field Values
-
LOAD_COMMAND
protected static final String LOAD_COMMAND
- See Also:
- Constant Field Values
-
SAVE_COMMAND
protected static final String SAVE_COMMAND
- See Also:
- Constant Field Values
-
CLEAR_COMMAND
protected static final String CLEAR_COMMAND
- See Also:
- Constant Field Values
-
IMPORTS_COMMAND
protected static final String IMPORTS_COMMAND
- See Also:
- Constant Field Values
-
VARS_COMMAND
protected static final String VARS_COMMAND
- See Also:
- Constant Field Values
-
ENV_COMMAND
protected static final String ENV_COMMAND
- See Also:
- Constant Field Values
-
WS_COMMAND
protected static final String WS_COMMAND
- See Also:
- Constant Field Values
-
LIB_COMMAND
protected static final String LIB_COMMAND
- See Also:
- Constant Field Values
-
EDIT_COMMAND
protected static final String EDIT_COMMAND
- See Also:
- Constant Field Values
-
FILE_COMMAND
protected static final String FILE_COMMAND
- See Also:
- Constant Field Values
-
HISTORY_COMMAND
protected static final String HISTORY_COMMAND
- See Also:
- Constant Field Values
-
REPEAT_COMMAND
protected static final String REPEAT_COMMAND
- See Also:
- Constant Field Values
-
STATE_INDICATOR_COMMAND
protected static final String STATE_INDICATOR_COMMAND
- See Also:
- Constant Field Values
-
ECHO_COMMAND
protected static final String ECHO_COMMAND
- See Also:
- Constant Field Values
-
RC_NO_OP
public static final int RC_NO_OP
- See Also:
- Constant Field Values
-
RC_RELOAD
public static final int RC_RELOAD
- See Also:
- Constant Field Values
-
RC_CONTINUE
public static final int RC_CONTINUE
- See Also:
- Constant Field Values
-
RC_EXIT_NOW
public static final int RC_EXIT_NOW
- See Also:
- Constant Field Values
-
COMMAND_INDEX
protected int COMMAND_INDEX
-
ACTION_INDEX
protected int ACTION_INDEX
-
FIRST_ARG_INDEX
protected int FIRST_ARG_INDEX
-
QDL_VARIABLE_REFERENCE_MARKER
public static final String QDL_VARIABLE_REFERENCE_MARKER
On command line, this tells the CLI to interpret the attached name as a variable in QDL and retrieve its value- See Also:
- Constant Field Values
-
commandHistory
public List<String> commandHistory
The workspace commands are here so they can be serialized with the rest of the workspace. However, since the mechanism has to intercept every command before it gets forwarded toexecute(String), the logic for managing this list is inQDLWorkspace.
-
FONT_CHECK_COMMAND
public static final String FONT_CHECK_COMMAND
- See Also:
- Constant Field Values
-
FONT_LIST_COMMAND
public static final String FONT_LIST_COMMAND
- See Also:
- Constant Field Values
-
SI_MESSAGES
public static final String SI_MESSAGES
- See Also:
- Constant Field Values
-
SI_INTERRUPT_INCLUDE
public static final String SI_INTERRUPT_INCLUDE
- See Also:
- Constant Field Values
-
SI_INTERRUPT_INCLUDE_SHORT
public static final String SI_INTERRUPT_INCLUDE_SHORT
- See Also:
- Constant Field Values
-
SI_INTERRUPT_EXCLUDE
public static final String SI_INTERRUPT_EXCLUDE
- See Also:
- Constant Field Values
-
SI_INTERRUPT_EXCLUDE_SHORT
public static final String SI_INTERRUPT_EXCLUDE_SHORT
- See Also:
- Constant Field Values
-
SI_INTERRUPT_GO
public static final String SI_INTERRUPT_GO
- See Also:
- Constant Field Values
-
___SI_PID
protected int ___SI_PID
-
___SI_ACTIVE
protected int ___SI_ACTIVE
-
___SI_TIMESTAMP
protected int ___SI_TIMESTAMP
-
___SI_LINE_NR
protected int ___SI_LINE_NR
-
___SI_SIZE
protected int ___SI_SIZE
-
CLEAN_TEMP_DIR_SIZE_SWITCH
public static final String CLEAN_TEMP_DIR_SIZE_SWITCH
- See Also:
- Constant Field Values
-
BUFFER_RUN_I_MESSAGE_FLAG
protected String BUFFER_RUN_I_MESSAGE_FLAG
-
BUFFER_RUN_CLONE_STATE_FLAG
protected String BUFFER_RUN_CLONE_STATE_FLAG
-
BUFFER_RUN_CLEAN_STATE_FLAG
protected String BUFFER_RUN_CLEAN_STATE_FLAG
-
DEFAULT_WORKSPACE_PID
public static final int DEFAULT_WORKSPACE_PID
- See Also:
- Constant Field Values
-
currentPID
protected static int currentPID
-
EDITOR_ADD
public static final String EDITOR_ADD
- See Also:
- Constant Field Values
-
EDITOR_USE
public static final String EDITOR_USE
- See Also:
- Constant Field Values
-
EDITOR_LIST
public static final String EDITOR_LIST
- See Also:
- Constant Field Values
-
EDITOR_REMOVE
public static final String EDITOR_REMOVE
- See Also:
- Constant Field Values
-
EDITOR_CLEAR_SCREEN
public static String EDITOR_CLEAR_SCREEN
-
BUFFER_RECORD_SEPARATOR
public String BUFFER_RECORD_SEPARATOR
-
BUFFER_IN_MEMORY_ONLY_SWITCH
protected static final String BUFFER_IN_MEMORY_ONLY_SWITCH
- See Also:
- Constant Field Values
-
LOAD_ENV_AS_INPUT_FORM
protected static final String LOAD_ENV_AS_INPUT_FORM
- See Also:
- Constant Field Values
-
LIST_MODULES_SWITCH
public static final String LIST_MODULES_SWITCH
- See Also:
- Constant Field Values
-
LIST_INTRINSIC_SWITCH
public static final String LIST_INTRINSIC_SWITCH
- See Also:
- Constant Field Values
-
LIST_EXTRINSIC_SWITCH
public static final String LIST_EXTRINSIC_SWITCH
- See Also:
- Constant Field Values
-
EDIT_TEXT_FLAG
public static final String EDIT_TEXT_FLAG
- See Also:
- Constant Field Values
-
ONLINE_HELP_EXAMPLE_FLAG
public static final String ONLINE_HELP_EXAMPLE_FLAG
- See Also:
- Constant Field Values
-
ONLINE_HELP_COMMAND
public static final String ONLINE_HELP_COMMAND
- See Also:
- Constant Field Values
-
PRETTY_PRINT_SHORT
public static final String PRETTY_PRINT_SHORT
- See Also:
- Constant Field Values
-
PRETTY_PRINT
public static final String PRETTY_PRINT
- See Also:
- Constant Field Values
-
ECHO
public static final String ECHO
- See Also:
- Constant Field Values
-
UNICODE_ON
public static final String UNICODE_ON
- See Also:
- Constant Field Values
-
JAVA_TRACE
public static final String JAVA_TRACE
- See Also:
- Constant Field Values
-
START_TS
public static final String START_TS
- See Also:
- Constant Field Values
-
ROOT_DIR
public static final String ROOT_DIR
- See Also:
- Constant Field Values
-
SAVE_DIR
public static final String SAVE_DIR
- See Also:
- Constant Field Values
-
COMPRESS_XML
public static final String COMPRESS_XML
- See Also:
- Constant Field Values
-
WS_ID
public static final String WS_ID
- See Also:
- Constant Field Values
-
DESCRIPTION
public static final String DESCRIPTION
- See Also:
- Constant Field Values
-
CURRENT_WORKSPACE_FILE
public static final String CURRENT_WORKSPACE_FILE
- See Also:
- Constant Field Values
-
AUTOSAVE_ON
public static final String AUTOSAVE_ON
- See Also:
- Constant Field Values
-
AUTOSAVE_MESSAGES_ON
public static final String AUTOSAVE_MESSAGES_ON
- See Also:
- Constant Field Values
-
AUTOSAVE_INTERVAL
public static final String AUTOSAVE_INTERVAL
- See Also:
- Constant Field Values
-
EXTERNAL_EDITOR
public static final String EXTERNAL_EDITOR
- See Also:
- Constant Field Values
-
SHORT_EXTERNAL_EDITOR
public static final String SHORT_EXTERNAL_EDITOR
- See Also:
- Constant Field Values
-
USE_EXTERNAL_EDITOR
public static final String USE_EXTERNAL_EDITOR
- See Also:
- Constant Field Values
-
ENABLE_LIBRARY_SUPPORT
public static final String ENABLE_LIBRARY_SUPPORT
- See Also:
- Constant Field Values
-
ASSERTIONS_ON
public static final String ASSERTIONS_ON
- See Also:
- Constant Field Values
-
ANSI_MODE_ON
public static final String ANSI_MODE_ON
- See Also:
- Constant Field Values
-
PREPROCESSOR_ON
public static final String PREPROCESSOR_ON
- See Also:
- Constant Field Values
-
OVERWRITE_BASE_FUNCTIONS_ON
public static final String OVERWRITE_BASE_FUNCTIONS_ON
- See Also:
- Constant Field Values
-
LIB_LIST_FORCE_FORMAT_SWITCH
public static final String LIB_LIST_FORCE_FORMAT_SWITCH
- See Also:
- Constant Field Values
-
ALL_WS_VARS
public static String[] ALL_WS_VARS
-
SILENT_SAVE_FLAG
public static String SILENT_SAVE_FLAG
-
NO_BUFFERS_SAVE_FLAG
public static String NO_BUFFERS_SAVE_FLAG
-
DEFAULT_QDL_DUMP_FILE_EXTENSION
public static final String DEFAULT_QDL_DUMP_FILE_EXTENSION
- See Also:
- Constant Field Values
-
DEFAULT_XML_SAVE_FILE_EXTENSION
public static final String DEFAULT_XML_SAVE_FILE_EXTENSION
- See Also:
- Constant Field Values
-
ALTERNATE_XML_SAVE_FILE_EXTENSION
public static final String ALTERNATE_XML_SAVE_FILE_EXTENSION
- See Also:
- Constant Field Values
-
DEFAULT_JAVA_SERIALIZATION_FILE_EXTENSION
public static final String DEFAULT_JAVA_SERIALIZATION_FILE_EXTENSION
- See Also:
- Constant Field Values
-
JSON_SERIALIZATION_FILE_EXTENSION
public static final String JSON_SERIALIZATION_FILE_EXTENSION
- See Also:
- Constant Field Values
-
UNCOMPRESSED_INDEX
public static int UNCOMPRESSED_INDEX
-
COMPRESSED_INDEX
public static int COMPRESSED_INDEX
-
RELOAD_FLAG
public final String RELOAD_FLAG
- See Also:
- Constant Field Values
-
SKIP_BAD_MODULES_FLAG
public final String SKIP_BAD_MODULES_FLAG
- See Also:
- Constant Field Values
-
INDENT
public static final String INDENT
- See Also:
- Constant Field Values
-
defaultIndent
protected String defaultIndent
-
CLA_MODULES
public static final String CLA_MODULES
- See Also:
- Constant Field Values
-
CLA_MACRO
public static final String CLA_MACRO
- See Also:
- Constant Field Values
-
CLA_ENVIRONMENT
public static final String CLA_ENVIRONMENT
- See Also:
- Constant Field Values
-
CLA_HOME_DIR
public static final String CLA_HOME_DIR
- See Also:
- Constant Field Values
-
CLA_LOG_DIR
public static final String CLA_LOG_DIR
- See Also:
- Constant Field Values
-
CLA_BOOT_SCRIPT
public static final String CLA_BOOT_SCRIPT
- See Also:
- Constant Field Values
-
CLA_VERBOSE_ON
public static final String CLA_VERBOSE_ON
- See Also:
- Constant Field Values
-
CLA_LONG_FORMAT_ON
public static final String CLA_LONG_FORMAT_ON
- See Also:
- Constant Field Values
-
CLA_NO_BANNER
public static final String CLA_NO_BANNER
- See Also:
- Constant Field Values
-
CLA_SHOW_BANNER
public static final String CLA_SHOW_BANNER
- See Also:
- Constant Field Values
-
CLA_LOGO
public static final String CLA_LOGO
- See Also:
- Constant Field Values
-
CLA_DEBUG_ON
public static final String CLA_DEBUG_ON
- See Also:
- Constant Field Values
-
CLA_RUN_SCRIPT_ON
public static final String CLA_RUN_SCRIPT_ON
- See Also:
- Constant Field Values
-
CLA_PREPROCESSOR_ON
public static final String CLA_PREPROCESSOR_ON
- See Also:
- Constant Field Values
-
CLA_SCRIPT_PATH
public static final String CLA_SCRIPT_PATH
- See Also:
- Constant Field Values
-
CLA_MODULE_PATH
public static final String CLA_MODULE_PATH
- See Also:
- Constant Field Values
-
CLA_LIB_PATH
public static final String CLA_LIB_PATH
- See Also:
- Constant Field Values
-
HOME_DIR_ARG
public static final String HOME_DIR_ARG
- See Also:
- Constant Field Values
-
WS_ARG_CAPUT
public static final String WS_ARG_CAPUT
- See Also:
- Constant Field Values
-
-
Method Detail
-
getLogger
public edu.uiuc.ncsa.security.core.util.MyLoggingFacade getLogger()
-
getEnv
public edu.uiuc.ncsa.security.core.configuration.XProperties getEnv()
-
setEnv
public void setEnv(edu.uiuc.ncsa.security.core.configuration.XProperties xp)
-
isSwingGUI
public boolean isSwingGUI()
-
setSwingGUI
public void setSwingGUI(boolean swingGUI)
-
splashScreen
protected void splashScreen()
-
showHelp4Help
protected void showHelp4Help()
-
showGeneralHelp
protected void showGeneralHelp()
-
variableLookup
protected edu.uiuc.ncsa.security.util.cli.InputLine variableLookup(edu.uiuc.ncsa.security.util.cli.InputLine inputLine)
Replaces ) commands prefixed with a by their value from the symbol table.- Parameters:
inputLine-- Returns:
-
getWorkspace
public QDLWorkspace getWorkspace()
-
setWorkspace
public void setWorkspace(QDLWorkspace workspace)
-
shutdown
protected void shutdown()
-
doFontCommand
protected Object doFontCommand(edu.uiuc.ncsa.security.util.cli.InputLine inputLine)
-
_doGUIEditor
protected void _doGUIEditor(BufferManager.BufferRecord br)
-
editDone
public void editDone(EditDoneEvent editDoneEvent)
-
getSIEntries
public WorkspaceCommands.SIEntries getSIEntries()
-
doSICommand
protected Object doSICommand(edu.uiuc.ncsa.security.util.cli.InputLine inputLine)
-
_doSIRemove
protected Object _doSIRemove(edu.uiuc.ncsa.security.util.cli.InputLine inputLine)
-
_doSIGet
protected Object _doSIGet(edu.uiuc.ncsa.security.util.cli.InputLine inputLine)
-
_doSISet
protected Object _doSISet(edu.uiuc.ncsa.security.util.cli.InputLine inputLine)
-
getSIInterruptList
protected SIInterruptList getSIInterruptList(edu.uiuc.ncsa.security.util.cli.InputLine inputLine, String... flags)
Create the interrupt list from the input line with any flags. A null response means no such interrupts were found.- Parameters:
inputLine-flags-- Returns:
-
_doSIResume
protected Object _doSIResume(edu.uiuc.ncsa.security.util.cli.InputLine inputLine)
-
cloneInterpreter
protected QDLInterpreter cloneInterpreter(edu.uiuc.ncsa.security.util.cli.InputLine inputLine)
-
_doSIList
protected Object _doSIList(edu.uiuc.ncsa.security.util.cli.InputLine inputLine)
-
doFileCommands
protected Object doFileCommands(edu.uiuc.ncsa.security.util.cli.InputLine inputLine) throws Throwable
- Throws:
Throwable
-
useExternalEditor
protected boolean useExternalEditor()
-
_doFileEdit
protected Object _doFileEdit(edu.uiuc.ncsa.security.util.cli.InputLine inputLine) throws Throwable
- Throws:
Throwable
-
restoreFile
public Object restoreFile(List<String> content, String fileName) throws Throwable
- Throws:
Throwable
-
getBufferManager
public BufferManager getBufferManager()
-
_doBufferReload
protected Object _doBufferReload(edu.uiuc.ncsa.security.util.cli.InputLine inputLine) throws Throwable
- Throws:
Throwable
-
getBufferDefaultSavePath
public String getBufferDefaultSavePath()
-
_doBufferPath
protected Object _doBufferPath(edu.uiuc.ncsa.security.util.cli.InputLine inputLine)
-
_doBufferCheck
protected Object _doBufferCheck(edu.uiuc.ncsa.security.util.cli.InputLine inputLine)
-
_doBufferReset
protected Object _doBufferReset(edu.uiuc.ncsa.security.util.cli.InputLine inputLine)
-
_doBufferRun
protected Object _doBufferRun(edu.uiuc.ncsa.security.util.cli.InputLine inputLine)
-
getCurrentPID
public static int getCurrentPID()
-
setCurrentPID
public void setCurrentPID(int currentPID)
-
_saveAllBuffers
protected void _saveAllBuffers() throws ThrowableSave all of the buffers. This just invokes the save method since there is a lot of state to ferret out and it is best to hand it off.- Throws:
Throwable
-
_doBufferWrite
protected Object _doBufferWrite(edu.uiuc.ncsa.security.util.cli.InputLine inputLine) throws Throwable
- Throws:
Throwable
-
_doBufferWrite
protected Object _doBufferWrite(edu.uiuc.ncsa.security.util.cli.InputLine inputLine, boolean doOuput) throws Throwable
Used internally, This has a flag to suppress certain messages.- Parameters:
inputLine-doOuput-- Returns:
- Throws:
Throwable
-
isUseExternalEditor
public boolean isUseExternalEditor()
-
setUseExternalEditor
public void setUseExternalEditor(boolean useExternalEditor)
-
getExternalEditorName
public String getExternalEditorName()
-
setExternalEditorName
public void setExternalEditorName(String externalEditorName)
-
_doEditor
protected Object _doEditor(edu.uiuc.ncsa.security.util.cli.InputLine inputLine)
-
_doBufferEdit
protected Object _doBufferEdit(edu.uiuc.ncsa.security.util.cli.InputLine inputLine) throws Throwable
- Throws:
Throwable
-
invokeEditor
protected Object invokeEditor(BufferManager.BufferRecord br, List<String> result)
-
getTempDir
protected File getTempDir()
-
getBR
protected BufferManager.BufferRecord getBR(edu.uiuc.ncsa.security.util.cli.InputLine inputLine)
-
_doBufferDelete
protected Object _doBufferDelete(edu.uiuc.ncsa.security.util.cli.InputLine inputLine)
-
_fileDir
protected Object _fileDir(edu.uiuc.ncsa.security.util.cli.InputLine inputLine)
-
_fileMkDir
protected Object _fileMkDir(edu.uiuc.ncsa.security.util.cli.InputLine inputLine)
-
_fileRmDir
protected Object _fileRmDir(edu.uiuc.ncsa.security.util.cli.InputLine inputLine)
-
_fileDelete
protected Object _fileDelete(edu.uiuc.ncsa.security.util.cli.InputLine inputLine)
-
_fileCopy
protected Object _fileCopy(edu.uiuc.ncsa.security.util.cli.InputLine inputLine)
Copies any two files on the system including between VFS.
-
_doBufferList
protected Object _doBufferList(edu.uiuc.ncsa.security.util.cli.InputLine inputLine)
-
_doBufferShow
protected Object _doBufferShow(edu.uiuc.ncsa.security.util.cli.InputLine inputLine)
-
formatBufferRecord
protected String formatBufferRecord(int ndx, BufferManager.BufferRecord br)
-
_doBufferLink
protected Object _doBufferLink(edu.uiuc.ncsa.security.util.cli.InputLine inputLine)
-
_doHelp
protected boolean _doHelp(edu.uiuc.ncsa.security.util.cli.InputLine inputLine)
Boolean values function that returns true if the inputline has some form of help in it.- Parameters:
inputLine-- Returns:
-
_doBufferCreate
protected Object _doBufferCreate(edu.uiuc.ncsa.security.util.cli.InputLine inputLine)
-
doEnvCommand
protected Object doEnvCommand(edu.uiuc.ncsa.security.util.cli.InputLine inputLine)
This has several states:- clear (no args) -- clear the environment
- drop name -- remove a variable
- get name - show the value of a variable
- list (no args) - print the entire environment
- load filename - add the variables in the file to the current state
- save [file] - save the environment to a file. No arg means to use the current env file.
- set key value - set a variable to a given value.
- Parameters:
inputLine-- Returns:
-
_envSave
protected Object _envSave(edu.uiuc.ncsa.security.util.cli.InputLine inputLine)
-
_envLoad
protected Object _envLoad(edu.uiuc.ncsa.security.util.cli.InputLine inputLine)
-
_envDrop
protected Object _envDrop(edu.uiuc.ncsa.security.util.cli.InputLine inputLine)
-
_envGet
protected Object _envGet(edu.uiuc.ncsa.security.util.cli.InputLine inputLine)
-
_envSet
protected Object _envSet(edu.uiuc.ncsa.security.util.cli.InputLine inputLine)
-
_envList
protected Object _envList(edu.uiuc.ncsa.security.util.cli.InputLine inputLine)
-
doModulesCommand
protected Object doModulesCommand(edu.uiuc.ncsa.security.util.cli.InputLine inputLine)
Optional list argument. Print out the current modules the system knows about- Parameters:
inputLine-- Returns:
-
_moduleImports
protected Object _moduleImports(edu.uiuc.ncsa.security.util.cli.InputLine inputLine)
-
_modulesList
protected Object _modulesList(edu.uiuc.ncsa.security.util.cli.InputLine inputLine)
-
doFuncs
protected Object doFuncs(edu.uiuc.ncsa.security.util.cli.InputLine inputLine)
Modes are- [list] - list all of the variables
- help [name argCount] - no arguments means list all, otherwise, find the function with the signature.
- drop name - remove a local function. This does not remove a function from a module.
- Parameters:
inputLine-- Returns:
-
_doFuncEdit
protected Object _doFuncEdit(edu.uiuc.ncsa.security.util.cli.InputLine inputLine)
-
editFunction
public Object editFunction(List<String> inputForm, List<String> output, String fName, int argCount)
-
_funcsDrop
protected Object _funcsDrop(edu.uiuc.ncsa.security.util.cli.InputLine inputLine)
-
_funcsHelp
protected Object _funcsHelp(edu.uiuc.ncsa.security.util.cli.InputLine inputLine)
-
printList
protected Object printList(edu.uiuc.ncsa.security.util.cli.InputLine inputLine, TreeSet<String> list)
Any list of strings (functions, variables, modules, etc.) is listed using this formatting function. If understands command line switches for width, columns and does some regex's too.- Parameters:
inputLine-list- A simple list items, e.g., names of functions or variables.- Returns:
-
_funcsListSystem
protected Object _funcsListSystem(edu.uiuc.ncsa.security.util.cli.InputLine inputLine)
-
_funcsList
protected Object _funcsList(edu.uiuc.ncsa.security.util.cli.InputLine inputLine)
-
getFunctionList
public List<String> getFunctionList()
This is used in public facing queries to the workspace, from e.g. an SAS instance getting/updating the current functions in the workspace.- Returns:
-
doVars
protected Object doVars(edu.uiuc.ncsa.security.util.cli.InputLine inputLine)
Either show all variables (no arg or argument of "list") or
drop name -- remove the given symbol from the local symbol table. This does not effect modules.- Parameters:
inputLine-- Returns:
-
_doVarEdit
protected Object _doVarEdit(edu.uiuc.ncsa.security.util.cli.InputLine inputLine)
-
editVariable
public Object editVariable(List<String> inputForm, List<String> output, String varName, boolean isText, boolean isStem)
-
restoreVariable
public Object restoreVariable(String varName, List<String> content, boolean isText, boolean isStem)
-
_varsSystem
protected Object _varsSystem(edu.uiuc.ncsa.security.util.cli.InputLine inputLine)
-
_varsDrop
protected Object _varsDrop(edu.uiuc.ncsa.security.util.cli.InputLine inputLine)
-
_varsList
protected Object _varsList(edu.uiuc.ncsa.security.util.cli.InputLine inputLine)
-
doHelp
protected Object doHelp(edu.uiuc.ncsa.security.util.cli.InputLine inputLine)
Just print the general help)help (* | name) [arg_count]* will print the first line of all user defined functions in the workspace.
Otherwise name is the name of a function, system or user defined
The optional arg_count is ignored for system functions, but will call up detailed information for the user functions.- Parameters:
inputLine-- Returns:
-
getFunctionDocFromVariable
protected List<String> getFunctionDocFromVariable(String name, int argCount)
-
doWS
protected Object doWS(edu.uiuc.ncsa.security.util.cli.InputLine inputLine)
Commands are:
- load filename -- loads the given file, replacing the current state
- save filename -- serializes the current workspace to the file
- clear -- clears the state completely.
- id -- print the currently named id, i.e., the name of the file if loaded
- Parameters:
inputLine-- Returns:
-
_wsListDrop
protected Object _wsListDrop(edu.uiuc.ncsa.security.util.cli.InputLine inputLine)
-
_fileVFS
protected Object _fileVFS(edu.uiuc.ncsa.security.util.cli.InputLine inputLine)
-
isPreprocessorOn
public boolean isPreprocessorOn()
-
setPreprocessorOn
public void setPreprocessorOn(boolean preprocessorOn)
-
isPrettyPrint
public boolean isPrettyPrint()
-
setPrettyPrint
public void setPrettyPrint(boolean prettyPrint)
-
isOnOrTrue
public static boolean isOnOrTrue(String x)
-
isOffOrFalse
public static boolean isOffOrFalse(String x)
-
onOrOff
protected String onOrOff(boolean b)
-
printAllWSVars
protected void printAllWSVars()
-
getWSVariable
protected Object getWSVariable(String key)
Get a workspace variable. These may be strings or booleans.- Parameters:
key-- Returns:
-
_wsGet
protected int _wsGet(edu.uiuc.ncsa.security.util.cli.InputLine inputLine)
-
_wsLibList
protected int _wsLibList(edu.uiuc.ncsa.security.util.cli.InputLine inputLine) throws ThrowableThis will either print out the information about a single workspace (if a file is given) or every workspace in a directory. It accepts regexes as a file filter too
)ws lib /home/me/qdl/var/ws -r ws.*\\.*
Prints out all the ws info for ws*.* in the directory. If a file is given, the regex is ignored.- Parameters:
inputLine-- Returns:
- Throws:
Throwable
-
_resolveLibFile
protected String _resolveLibFile(edu.uiuc.ncsa.security.util.cli.InputLine inputLine)
-
processJSONLibEntry
protected WorkspaceCommands.WSLibEntry processJSONLibEntry(boolean isVFS, String fullPath) throws Throwable
- Throws:
Throwable
-
processJSONLibEntry
protected WorkspaceCommands.WSLibEntry processJSONLibEntry(boolean isVFS, String fullPath, boolean compressionOn) throws Throwable
- Throws:
Throwable
-
processXMLLibEntry
protected WorkspaceCommands.WSLibEntry processXMLLibEntry(boolean isVFS, String fullPath, File currentFile) throws Throwable
Looks at a lib entry that was serialized in XML- Parameters:
isVFS-fullPath-currentFile-- Returns:
- Throws:
Throwable
-
processJavaLibEntry
protected WorkspaceCommands.WSLibEntry processJavaLibEntry(boolean isVFS, String fullPath, File currentFile) throws Throwable
Looks for a lib entry that was serialized using Java serialization.- Parameters:
isVFS-fullPath-currentFile-- Returns:
- Throws:
Throwable
-
_wsSet
protected Object _wsSet(edu.uiuc.ncsa.security.util.cli.InputLine inputLine)
-
listEditors
protected void listEditors()
-
getDescription
public String getDescription()
-
setDescription
public void setDescription(String description)
Human readable dscription of this workspace.
-
getWSID
public String getWSID()
-
setWSID
public void setWSID(String wsID)
-
_wsEchoMode
protected Object _wsEchoMode(edu.uiuc.ncsa.security.util.cli.InputLine inputLine)
-
_wsClear
protected Object _wsClear(edu.uiuc.ncsa.security.util.cli.InputLine inputLine)
-
_wsSave
protected int _wsSave(edu.uiuc.ncsa.security.util.cli.InputLine inputLine)
-
_xmlWSQDLLoad
public void _xmlWSQDLLoad(QDLInterpreter qdlInterpreter, Reader reader) throws Throwable
Just loads and runs aReader. This is mostly used in serialization tests.- Parameters:
reader-- Throws:
Throwable
-
getLastResult
public Object getLastResult()
-
writeFile
protected long writeFile(String fullPath, String payload, boolean compress) throws Throwable
write the payload to the correct file (VFS or local), compressing as needed.- Parameters:
fullPath-payload-compress-- Returns:
- Throws:
Throwable
-
_xmlWSJavaSave
public void _xmlWSJavaSave(OutputStream fos) throws IOException
- Throws:
IOException
-
getXMLEventReader
protected XMLEventReader getXMLEventReader(String fullPath, boolean isCompressXML) throws Throwable
- Throws:
Throwable
-
inputStreamFromFile
protected InputStream inputStreamFromFile(File f) throws Throwable
- Throws:
Throwable
-
_xmlWSJavaLoad
public boolean _xmlWSJavaLoad(String fullPath)
-
_xmlWSJavaLoad
public boolean _xmlWSJavaLoad(InputStream fis)
-
_wsLoad
protected Object _wsLoad(edu.uiuc.ncsa.security.util.cli.InputLine inputLine) throws Throwable
- Throws:
Throwable
-
getInterpreter
public QDLInterpreter getInterpreter()
-
isDebugOn
public boolean isDebugOn()
- Specified by:
isDebugOnin interfaceedu.uiuc.ncsa.security.core.Logable
-
setDebugOn
public void setDebugOn(boolean debugOn)
- Specified by:
setDebugOnin interfaceedu.uiuc.ncsa.security.core.Logable
-
debug
public void debug(String x)
- Specified by:
debugin interfaceedu.uiuc.ncsa.security.core.Logable
-
info
public void info(String x)
- Specified by:
infoin interfaceedu.uiuc.ncsa.security.core.Logable
-
warn
public void warn(String x)
- Specified by:
warnin interfaceedu.uiuc.ncsa.security.core.Logable
-
error
public void error(String x)
- Specified by:
errorin interfaceedu.uiuc.ncsa.security.core.Logable
-
say
public void say(String x)
Prints with the default indent and a linefeed.- Parameters:
x-
-
sayi
protected void sayi(String x)
prints with the current indent and a linefeed.- Parameters:
x-
-
sayii
protected void sayii(String x)
Double indent -- useful for lists.- Parameters:
x-
-
setState
public void setState(State state)
This is used in serialization tests. Generally you should never set the state this way.- Parameters:
state-
-
getState
public State getState()
Creates the top-level state object for the system. All other state objects are dervied from it.- Returns:
-
resolveAgainstRoot
protected File resolveAgainstRoot(String file)
If this is a relative file, it is resolved against the root directory. Otherwise, it is just returned.
Absolute as per spec means it starts with a / on unix, or drive:\ on Windows.- Parameters:
file-- Returns:
-
isCompressXML
public boolean isCompressXML()
-
setCompressXML
public void setCompressXML(boolean compressXML)
-
hasEditors
public boolean hasEditors()
-
getQdlEditors
public edu.uiuc.ncsa.security.util.cli.editing.Editors getQdlEditors()
-
setQdlEditors
public void setQdlEditors(edu.uiuc.ncsa.security.util.cli.editing.Editors qdlEditors)
-
fromConfigFile
public void fromConfigFile(edu.uiuc.ncsa.security.util.cli.InputLine inputLine) throws Throwable- Throws:
Throwable
-
getQdlEnvironment
public QDLEnvironment getQdlEnvironment()
-
setQdlEnvironment
public void setQdlEnvironment(QDLEnvironment qdlEnvironment)
-
oldLoad
protected void oldLoad(edu.uiuc.ncsa.security.util.cli.InputLine inputLine, String cfgName) throws ThrowableUses Apache commons. This should be replaced by the CF loader system- Parameters:
inputLine-cfgName-- Throws:
Throwable
-
cfLoad
protected void cfLoad(edu.uiuc.ncsa.security.util.cli.InputLine inputLine, String cfgName) throws ThrowableCF Loader for XML configurationn file.- Parameters:
inputLine-cfgName-- Throws:
Throwable
-
loadQE
public void loadQE(edu.uiuc.ncsa.security.util.cli.InputLine inputLine, String cfgName) throws Throwable- Throws:
Throwable
-
isQELoaded
protected boolean isQELoaded()
-
fromConfigFile
public void fromConfigFile(edu.uiuc.ncsa.security.util.cli.InputLine inputLine, QDLEnvironment qe) throws Throwable- Throws:
Throwable
-
figureOutFont
protected void figureOutFont(edu.uiuc.ncsa.security.util.cli.InputLine inputLine)
-
initAutosave
protected void initAutosave()
-
init
public void init(edu.uiuc.ncsa.security.util.cli.InputLine inputLine) throws ThrowableBootstraps the whole thing.- Parameters:
inputLine-- Throws:
Throwable
-
isRunScript
public boolean isRunScript()
-
fromCommandLine
protected void fromCommandLine(edu.uiuc.ncsa.security.util.cli.InputLine inputLine) throws Throwable- Throws:
Throwable
-
isEchoModeOn
public boolean isEchoModeOn()
-
setEchoModeOn
public void setEchoModeOn(boolean echoModeOn)
-
readline
public String readline()
-
getIoInterface
public edu.uiuc.ncsa.security.util.cli.IOInterface getIoInterface()
-
setIoInterface
public void setIoInterface(edu.uiuc.ncsa.security.util.cli.IOInterface ioInterface)
-
toXML
public void toXML(XMLStreamWriter xsw) throws XMLStreamException
- Throws:
XMLStreamException
-
fromJSON
public WorkspaceCommands fromJSON(net.sf.json.JSONObject jsonObject) throws Throwable
- Throws:
Throwable
-
updateWSState
protected boolean updateWSState(WorkspaceCommands newCommands)
This takes an updatedWorkspaceCommandsobject and updates the currently active workspace. When this is done, there is new state and all the values ofr newCommnads have been migrated. This takes care to get theIOInterfaceright since if that is not handled correctly, the entire workspace hangs unrecoverably.- Parameters:
newCommands-- Returns:
-
fromXML
public boolean fromXML(XMLEventReader xer, boolean skipBadModules) throws XMLStreamException
- Throws:
XMLStreamException
-
isAutosaveOn
public boolean isAutosaveOn()
-
setAutosaveOn
public void setAutosaveOn(boolean autosaveOn)
-
getAutosaveInterval
public long getAutosaveInterval()
-
setAutosaveInterval
public void setAutosaveInterval(long autosaveInterval)
-
isAutosaveMessagesOn
public boolean isAutosaveMessagesOn()
-
setAutosaveMessagesOn
public void setAutosaveMessagesOn(boolean autosaveMessagesOn)
-
isAssertionsOn
public boolean isAssertionsOn()
-
setAssertionsOn
public void setAssertionsOn(boolean assertionsOn)
-
isAnsiModeOn
public boolean isAnsiModeOn()
-
setAnsiModeOn
public void setAnsiModeOn(boolean ansiModeOn)
-
getSwingTerminal
public SwingTerminal getSwingTerminal()
This is really only aSwingTerminalor SASterminal.- Returns:
-
setSwingTerminal
public void setSwingTerminal(SwingTerminal swingTerminal)
-
getWorkspaceCommandsProvider
public static WorkspaceCommandsProvider getWorkspaceCommandsProvider()
-
setWorkspaceCommandsProvider
public static void setWorkspaceCommandsProvider(WorkspaceCommandsProvider workspaceCommandsProvider)
-
getInstance
public static WorkspaceCommands getInstance()
Factory method to create an instance. This is needed if you intend to override this class, since there is a bootstrapping issue with the QDLWorkspace otherwise. set this as needed first.- Returns:
-
getInstance
public static WorkspaceCommands getInstance(edu.uiuc.ncsa.security.util.cli.IOInterface ioInterface)
-
setInstance
public static void setInstance(WorkspaceCommands wc)
-
newInstance
public WorkspaceCommands newInstance()
Use this to create new instances of this with sameIOInterfaceas the instance. The idea is that the static factory creates a single instance and that can be used to create others. This allows for overrides to be used in the base classes. Set the static method once and override the non-static methods.- Returns:
-
newInstance
public WorkspaceCommands newInstance(edu.uiuc.ncsa.security.util.cli.IOInterface ioInterface)
-
getFont
public Font getFont()
-
setFont
public void setFont(Font font)
-
getLibLoaders
public List<LibLoader> getLibLoaders()
Override for customLibLoaders. These will be processed in the order given.- Returns:
-
getCurrentSIEntry
public SIEntry getCurrentSIEntry()
-
-