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 theQDLWorkspace
that 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 class
WorkspaceCommands.RegexFileFilter
static class
WorkspaceCommands.SIEntries
static class
WorkspaceCommands.WSInternals
static class
WorkspaceCommands.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 void
_doFontList(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
_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 QDLInterpreter
cloneInterpreter(edu.uiuc.ncsa.security.util.cli.InputLine inputLine)
void
debug(String x)
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.protected Object
doFileCommands(edu.uiuc.ncsa.security.util.cli.InputLine inputLine)
protected Object
doFontCommand(edu.uiuc.ncsa.security.util.cli.InputLine inputLine)
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.protected Object
doHelp(edu.uiuc.ncsa.security.util.cli.InputLine inputLine)
Just print the general helpprotected Object
doModulesCommand(edu.uiuc.ncsa.security.util.cli.InputLine inputLine)
Optional list argument.protected Object
doSICommand(edu.uiuc.ncsa.security.util.cli.InputLine inputLine)
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.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 loadedvoid
editDone(EditDoneEvent editDoneEvent)
Object
editFile(List<String> input, List<String> output, String fileName)
Object
editFunction(List<String> inputForm, List<String> output, String fName, int argCount)
Object
editVariable(List<String> inputForm, List<String> output, String varName, boolean isText, boolean isStem)
void
error(String x)
void
error(String x, Throwable t)
Object
execute(String inline)
Object
execute2(String inline)
protected void
figureOutFont(edu.uiuc.ncsa.security.util.cli.InputLine inputLine)
protected String
fontReport(Font font)
protected String
formatBufferRecord(int ndx, BufferManager.BufferRecord br)
protected void
fromCommandLine(edu.uiuc.ncsa.security.util.cli.InputLine inputLine)
void
fromConfigFile(edu.uiuc.ncsa.security.util.cli.InputLine inputLine)
void
fromConfigFile(edu.uiuc.ncsa.security.util.cli.InputLine inputLine, QDLEnvironment qe)
WorkspaceCommands
fromJSON(net.sf.json.JSONObject jsonObject)
boolean
fromXML(XMLEventReader xer, boolean skipBadModules)
edu.uiuc.ncsa.security.core.util.DoubleHashMap<String,String>
getAltLookup()
long
getAutosaveInterval()
protected BufferManager.BufferRecord
getBR(edu.uiuc.ncsa.security.util.cli.InputLine inputLine)
String
getBufferDefaultSavePath()
BufferManager
getBufferManager()
String
getDescription()
edu.uiuc.ncsa.security.core.configuration.XProperties
getEnv()
String
getExternalEditorName()
Font
getFont()
protected List<String>
getFunctionDocFromVariable(String name, int argCount)
String
getFunctionHelp(String text)
List<String>
getFunctionList()
This is used in public facing queries to the workspace, from e.g.String
getHelpTopic(String text)
String
getHelpTopicExample(String text)
static WorkspaceCommands
getInstance()
Factory method to create an instance.static WorkspaceCommands
getInstance(edu.uiuc.ncsa.security.util.cli.IOInterface ioInterface)
QDLInterpreter
getInterpreter()
edu.uiuc.ncsa.security.util.cli.IOInterface
getIoInterface()
Object
getLastResult()
List<LibLoader>
getLibLoaders()
Override for customLibLoader
s.edu.uiuc.ncsa.security.core.util.MyLoggingFacade
getLogger()
protected List<String>
getModuleDocFromVariable(String name)
HashMap<String,String>
getOnlineExamples()
HashMap<String,String>
getOnlineHelp()
edu.uiuc.ncsa.security.util.cli.editing.Editors
getQdlEditors()
QDLEnvironment
getQdlEnvironment()
State
getState()
Creates the top-level state object for the system.SwingTerminal
getSwingTerminal()
This is really only aSwingTerminal
or SASterminal.protected File
getTempDir()
QDLWorkspace
getWorkspace()
static WorkspaceCommandsProvider
getWorkspaceCommandsProvider()
String
getWSID()
protected Object
getWSVariable(String key)
protected XMLEventReader
getXMLEventReader(String fullPath, boolean isCompressXML)
boolean
hasEditors()
void
info(String x)
void
init(edu.uiuc.ncsa.security.util.cli.InputLine inputLine)
Bootstraps the whole thing.protected void
initAutosave()
protected InputStream
inputStreamFromFile(File f)
protected Object
invokeEditor(BufferManager.BufferRecord br, List<String> result)
boolean
isAnsiModeOn()
boolean
isAssertionsOn()
boolean
isAutosaveMessagesOn()
boolean
isAutosaveOn()
boolean
isCompressXML()
boolean
isDebugOn()
boolean
isEchoModeOn()
protected boolean
isOnOrTrue(String x)
boolean
isPrettyPrint()
protected boolean
isQELoaded()
boolean
isRunScript()
boolean
isSwingGUI()
boolean
isUseExternalEditor()
protected void
listEditors()
void
loadQE(edu.uiuc.ncsa.security.util.cli.InputLine inputLine, String cfgName)
WorkspaceCommands
newInstance()
Use this to create new instances of this with sameIOInterface
as the instance.WorkspaceCommands
newInstance(edu.uiuc.ncsa.security.util.cli.IOInterface ioInterface)
protected String
onOrOff(boolean b)
protected void
printAllWSVars()
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.protected WorkspaceCommands.WSLibEntry
processJavaLibEntry(boolean isVFS, String fullPath, File currentFile)
Looks for a lib entry that was serialized using Java serialization.protected WorkspaceCommands.WSLibEntry
processJSONLibEntry(boolean isVFS, String fullPath)
protected WorkspaceCommands.WSLibEntry
processJSONLibEntry(boolean isVFS, String fullPath, boolean compressionOn)
protected WorkspaceCommands.WSLibEntry
processXMLLibEntry(boolean isVFS, String fullPath, File currentFile)
Looks at a lib entry that was serialized in XMLString
readline()
String
readline(String prompt)
protected File
resolveAgainstRoot(String file)
protected String[]
resolveRealHelpName(String text)
Object
restoreFile(List<String> content, String fileName)
Object
restoreFunction(List<String> inputForm, String fName, int argCount)
Object
restoreVariable(String varName, List<String> content, boolean isText, boolean isStem)
void
runMacro(List<String> commands)
void
say(String x)
Prints with the default indent and a linefeed.protected void
sayi(String x)
prints with the current indent and a linefeed.protected void
sayii(String x)
Double indent -- useful for lists.void
setAnsiModeOn(boolean ansiModeOn)
void
setAssertionsOn(boolean assertionsOn)
void
setAutosaveInterval(long autosaveInterval)
void
setAutosaveMessagesOn(boolean autosaveMessagesOn)
void
setAutosaveOn(boolean autosaveOn)
void
setCompressXML(boolean compressXML)
void
setDebugOn(boolean debugOn)
void
setDescription(String description)
Human readable dscription of this workspace.void
setEchoModeOn(boolean echoModeOn)
void
setEnv(edu.uiuc.ncsa.security.core.configuration.XProperties xp)
void
setExternalEditorName(String externalEditorName)
void
setFont(Font font)
static void
setInstance(WorkspaceCommands wc)
void
setIoInterface(edu.uiuc.ncsa.security.util.cli.IOInterface ioInterface)
void
setPrettyPrint(boolean prettyPrint)
void
setQdlEditors(edu.uiuc.ncsa.security.util.cli.editing.Editors qdlEditors)
void
setQdlEnvironment(QDLEnvironment qdlEnvironment)
void
setState(State state)
This is used in serialization tests.void
setSwingGUI(boolean swingGUI)
void
setSwingTerminal(SwingTerminal swingTerminal)
protected void
setupJavaModule(State state, QDLLoader loader, boolean importASAP)
void
setUseExternalEditor(boolean useExternalEditor)
void
setWorkspace(QDLWorkspace workspace)
static void
setWorkspaceCommandsProvider(WorkspaceCommandsProvider workspaceCommandsProvider)
void
setWSID(String wsID)
protected void
showGeneralHelp()
protected void
showHelp4Help()
protected void
shutdown()
protected void
splashScreen()
net.sf.json.JSONObject
toJSON()
void
toXML(XMLStreamWriter xsw)
protected boolean
updateWSState(WorkspaceCommands newCommands)
This takes an updatedWorkspaceCommands
object and updates the currently active workspace.protected boolean
useExternalEditor()
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.void
warn(String x)
protected long
writeFile(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
-
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
-
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 String FONT_CHECK_COMMAND
-
FONT_LIST_COMMAND
public static String FONT_LIST_COMMAND
-
___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
-
EDITOR_ADD
public static String EDITOR_ADD
-
EDITOR_USE
public static String EDITOR_USE
-
EDITOR_LIST
public static String EDITOR_LIST
-
EDITOR_REMOVE
public static String EDITOR_REMOVE
-
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
-
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
-
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
protected 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_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
-
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)
-
_doFontList
protected void _doFontList(edu.uiuc.ncsa.security.util.cli.InputLine inputLine) throws Throwable
- Throws:
Throwable
-
_doGUIEditor
protected void _doGUIEditor(BufferManager.BufferRecord br)
-
editDone
public void editDone(EditDoneEvent editDoneEvent)
-
doSICommand
protected Object doSICommand(edu.uiuc.ncsa.security.util.cli.InputLine inputLine)
-
_doSIRemove
protected Object _doSIRemove(edu.uiuc.ncsa.security.util.cli.InputLine inputLine)
-
_doSISet
protected Object _doSISet(edu.uiuc.ncsa.security.util.cli.InputLine inputLine)
-
_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)
-
_saveAllBuffers
protected void _saveAllBuffers() throws Throwable
Save 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)
-
isPrettyPrint
public boolean isPrettyPrint()
-
setPrettyPrint
public void setPrettyPrint(boolean prettyPrint)
-
isOnOrTrue
protected boolean isOnOrTrue(String x)
-
onOrOff
protected String onOrOff(boolean b)
-
printAllWSVars
protected void printAllWSVars()
-
_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 Throwable
This 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:
isDebugOn
in interfaceedu.uiuc.ncsa.security.core.Logable
-
setDebugOn
public void setDebugOn(boolean debugOn)
- Specified by:
setDebugOn
in interfaceedu.uiuc.ncsa.security.core.Logable
-
debug
public void debug(String x)
- Specified by:
debug
in interfaceedu.uiuc.ncsa.security.core.Logable
-
info
public void info(String x)
- Specified by:
info
in interfaceedu.uiuc.ncsa.security.core.Logable
-
warn
public void warn(String x)
- Specified by:
warn
in interfaceedu.uiuc.ncsa.security.core.Logable
-
error
public void error(String x)
- Specified by:
error
in 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:
-
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)
-
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 Throwable
Bootstraps 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 updatedWorkspaceCommands
object 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 theIOInterface
right 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 aSwingTerminal
or 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 sameIOInterface
as 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)
-
-