public class ScriptManagerImpl extends java.lang.Object implements ScriptManager, ScriptConstants
| Modifier and Type | Class and Description |
|---|---|
class |
ScriptManagerImpl.ScriptHashtable
extension of Hashtable for some added functionality
|
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
GLOBAL |
static java.lang.String |
WORKSPACE |
BG_COLOR, DESCRIPTION, DISPLAY_IN_MENU, DISPLAY_IN_SELECTOR, DISPLAY_TO_USER, GROUP, ICON_NAME, NAMEALL_MODULES, ALL_WORKSPACES, BASE, CACHE_DIR_PROP, CLIENT_MODULE, CURRENT_MODULES, CURRENT_WORKSPACE, DSS_IMPORT, JAVA_IMPORT, ROOT, SCRIPT_ZIPFILE, SCRIPTS_CONF, SCRIPTS_DIR, STD_IMPORT, SYSTEM, USER| Constructor and Description |
|---|
ScriptManagerImpl(hec.client.ClientWorkspace wksp) |
| Modifier and Type | Method and Description |
|---|---|
void |
addConfigChangeListener(hec.event.ConfigChangeListener listener) |
static void |
buildSortedVector(java.util.Vector src,
java.util.Vector dest) |
java.lang.String |
checkLockedBy(java.lang.String scriptPath) |
void |
close()
remove the callbacks to the rmi files when the workspace closes.
|
static boolean |
debug() |
boolean |
deleteScript(ScriptIdentifier sid) |
boolean |
deleteScript(ScriptIdentifier sid,
boolean notify) |
boolean |
deleteScript(ScriptIdentifier sid,
boolean notify,
boolean warnUser)
If notify is false, only the cache removal of the script identifier will
occur.
|
boolean |
downLoadModule(java.lang.String moduleName)
download the script from the remote workspace to the local drive
|
boolean |
flushIds()
flush all the script id cache's
|
java.util.Hashtable |
getCache() |
Identifier |
getIdFromScriptId(ScriptIdentifier sid)
get the identifier for the script file.
|
java.lang.String |
getPathFromTreePath(java.lang.String treePath)
given a treepath return the directory where the script file resides.
|
Script |
getScript(ScriptIdentifier sid) |
java.util.Vector |
getScriptIds(java.util.Vector paths)
get all the scriptIds
|
java.util.Vector |
getScriptIdsForMode(java.lang.String moduleName)
get all the script ids for a module
gets scripts from the following locations .../CWMS/All/script/
.../CWMS/All/scripts/modules/
|
java.util.Vector |
getScriptIdsForObject(java.lang.String scriptIdPath) |
boolean |
isUniqueScriptName(java.lang.String s) |
boolean |
isUniqueScriptName(java.lang.String s,
java.util.Hashtable cache) |
boolean |
lockScriptFile(boolean lock,
java.lang.String scriptPath)
lock the script config file
|
void |
notifyListeners(java.lang.String file,
int changeType,
java.lang.String otherInfo) |
void |
reloadScript(ScriptIdentifier sid) |
void |
removeConfigChangeListener(hec.event.ConfigChangeListener listener) |
boolean |
saveScript(ScriptIdentifier sid,
Script script) |
void |
scriptAdded(ScriptIdentifier sid) |
void |
setFileManager() |
public static final java.lang.String GLOBAL
public static final java.lang.String WORKSPACE
public static boolean debug()
public Script getScript(ScriptIdentifier sid)
getScript in interface ScriptManagerpublic boolean saveScript(ScriptIdentifier sid, Script script)
saveScript in interface ScriptManagerpublic boolean flushIds()
public Identifier getIdFromScriptId(ScriptIdentifier sid)
getIdFromScriptId in interface ScriptManagerpublic java.lang.String getPathFromTreePath(java.lang.String treePath)
getPathFromTreePath in interface ScriptManagerpublic java.util.Vector getScriptIdsForMode(java.lang.String moduleName)
getScriptIdsForMode in interface ScriptManagerpublic java.util.Vector getScriptIds(java.util.Vector paths)
public java.util.Vector getScriptIdsForObject(java.lang.String scriptIdPath)
getScriptIdsForObject in interface ScriptManagerpublic boolean deleteScript(ScriptIdentifier sid)
deleteScript in interface ScriptManagerpublic boolean deleteScript(ScriptIdentifier sid, boolean notify)
deleteScript in interface ScriptManagerpublic boolean deleteScript(ScriptIdentifier sid, boolean notify, boolean warnUser)
deleteScript in interface ScriptManagerpublic boolean isUniqueScriptName(java.lang.String s)
isUniqueScriptName in interface ScriptManagerpublic boolean isUniqueScriptName(java.lang.String s,
java.util.Hashtable cache)
isUniqueScriptName in interface ScriptManagerpublic boolean downLoadModule(java.lang.String moduleName)
downLoadModule in interface ScriptManagerpublic boolean lockScriptFile(boolean lock,
java.lang.String scriptPath)
lockScriptFile in interface ScriptManagerlock - whether to lock or unlock the script, true to lock, false to
unlockscriptPath - path to script filepublic java.lang.String checkLockedBy(java.lang.String scriptPath)
checkLockedBy in interface ScriptManagerpublic void addConfigChangeListener(hec.event.ConfigChangeListener listener)
addConfigChangeListener in interface ScriptManagerpublic void removeConfigChangeListener(hec.event.ConfigChangeListener listener)
removeConfigChangeListener in interface ScriptManagerpublic void notifyListeners(java.lang.String file,
int changeType,
java.lang.String otherInfo)
public void close()
close in interface ScriptManagerpublic static void buildSortedVector(java.util.Vector src,
java.util.Vector dest)
public void setFileManager()
public void scriptAdded(ScriptIdentifier sid)
scriptAdded in interface ScriptManagerpublic void reloadScript(ScriptIdentifier sid)
reloadScript in interface ScriptManagerpublic java.util.Hashtable getCache()
getCache in interface ScriptManager