Package hec.clientapp.model
Class ManagerProxyListManager
java.lang.Object
java.util.Observable
hec.lang.NamedType
hec.clientapp.model.Manager
hec.clientapp.model.ManagerProxyListManager
- All Implemented Interfaces:
hec.clientapp.client.WkspCallBack,hec.clientapp.event.ManagerChangedListener,ManagerProxyListContainer,AsciiSerializable,FieldAccessor,LockableObject,MessagePrinter,TsRecordContainer,Serializable,Cloneable,Comparable,EventListener,Observer,mil.army.usace.hec.rmi.csinterface.CallBackInterface,rma.lang.Modifiable
- Direct Known Subclasses:
AbstractSimulation,ImportNetworkWorkspace
public abstract class ManagerProxyListManager
extends Manager
implements ManagerProxyListContainer, hec.clientapp.client.WkspCallBack
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Hashtableprotected DataListContainerthe datalist containerprotected HashtableLocal cache of child workspace managersprotected hec.clientapp.rmi.csinterface.RmiWorkspaceRMI Workspaceprotected ManagerProxyListLocal cache of hec.model.manager objectsFields inherited from class hec.clientapp.model.Manager
_callBack, _dssFileManagerWrapper, _identifier, _lastModifiedTime, _modifiableListeners, _proxyList, _readOnly, _reloadFailed, _reloadOk, _uiWrapper, _userInterface, _wkspPath, _Workspace, LASTMODIFIED_STRINGFields inherited from class hec.lang.NamedType
_description, _ignoreModifiedEvents, _index, _isValid, _modified, _name, defaultDescription, defaultName, DESCRIPTION_CHANGED, NAME_CHANGED, RENAME_EVENTFields inherited from interface hec.clientapp.event.ManagerChangedListener
MANAGER_ADDED, MANAGER_DELETED, MANAGER_RENAMED -
Constructor Summary
ConstructorsConstructorDescriptionConstructor for the ManagerProxyListManager object -
Method Summary
Modifier and TypeMethodDescriptionprotected voidvoidbooleandeleteManager(String modelname, Identifier id, boolean deleteFile) delete a manager.hec.clientapp.rmi.csinterface.RmiWorkspacegetChildWorkspace(String modelname) Returns a particular child (model) workspace.getCommonDataList(String theDataObjectClass, String theModel) method that allows access to data lists from managersgetDataListContainer(hec.clientapp.rmi.csinterface.RmiDataListContainer rdlc) intGets the GmtOffset attribute of the ManagerProxyListManager objectgetManagerIdentifier(String type, String classname, String name, String ext) Returns a new identifier that points to a manager file.getManagerIDList(String className) getManagerIDList(String modelname, String className) return a list ofhec.io.Identifiers for allhec.clientapp.model.Managers specified by className that reside in thehec.clientapp.rmi.csinterface.RmiWorkspacespecified by modelNameprotected voidGets a list of Manager Proxies from the Remote WorkspacegetManagerProxy(String modelname, Identifier id) getManagerProxy(String modelname, String className, int index) Gets the ManagerProxy attribute of the ManagerProxyListManager objectgetManagerProxyList(String modelname) Returns the manager proxy list for a particular model.getManagerProxyList(String modelname, String className) Gets the ManagerProxyList attribute of the ManagerProxyListManager objecthec.clientapp.rmi.csinterface.RmiWorkspacereturn the Manager specific RmiWorkspaceintGets the UnitSystem attribute of the ManagerProxyListManager objectgetWorkspaceConfigFile(String model) return the full path to the .wksp or .conf file for the Workspace specified by modelvoidinit()Description of the Methodprotected voidbooleanloadManagerByName(String modelname, String classname, String name) loads a manager based on a classname and manager name for specific child workspace.protected voidmanagerAdded(ManagerProxy proxy, String model) voidmanagerChanged(int changeType, ManagerProxy proxy, String model) protected voidmanagerRemoved(ManagerProxy proxy, String model) protected voidmanagerRenamed(ManagerProxy proxy, String model) voidmapAdded(hec.map.MapIdentifier mapId) voidmapRemoved(hec.map.MapIdentifier mapId) newManager(String classname) Creates a new manager of the requested classnewManager(String modelname, String className) create a new Manager for a specific workspaceDescription of the MethodopenManager(String relpath) openManager(String modelname, Identifier id) Description of the MethodopenManager(String modelname, String relpath) open a Manager by it relative pathopenManager(String modelname, String className, int index) open a Manager by it's indexopenManagerByName(String modelname, String classname, String name) voidsave all the managers regardless of whether they have been modified or notvoidsave all managers that say they've been modified.booleansaveManager(Manager mgr) Save the manager to diskbooleansaveManager(String modelname, Manager mgr) booleansaveManagerAs(Manager mgr, Identifier id) booleansaveManagerAs(String modelname, Manager mgr, Identifier id) booleanbooleansaveWorkspace(boolean saveAllManagers) protected voidsetCallback(hec.clientapp.rmi.csinterface.RmiWkspCallBack callBack, hec.clientapp.rmi.csinterface.RmiWorkspace wksp) protected voidsetCallback(mil.army.usace.hec.rmi.server.RemoteWrapper callBackWrap, hec.clientapp.rmi.csinterface.RmiWorkspace wksp) add this ManagerProxyListManager to the RmiWorkspace's callback listvoidsetManagerRmiWorkspace(hec.clientapp.rmi.csinterface.RmiWorkspace wksp) set the Manager specific RmiWorkspacevoidcalled when Manager is being unloaded.voidunloadManager(String modelname, Identifier id) voiduserChanged(String user, String changeType) Methods inherited from class hec.clientapp.model.Manager
addModifiableListener, backupFile, computeComplete, copyFile, deleteFile, deleting, finalize, getCallback, getDirectory, getDSSFileManager, getDSSFileManagerWrapper, getFieldObject, getFileManager, getFilename, getIdentifier, getInputITSDataSet, getInputTSDataSet, getLastModifiedTime, getLastModifiedTimeString, getModTime, getModTime, getOutputITSDataSet, getOutputTSDataSet, getPath, getProxyList, getReadOnly, getRelativePath, getReloadOk, getSaveAsId, getSaveAsId, getUserInterface, getWorkspace, hasLock, isCanceled, isForecastManager, loadComplete, loadSaveAsFile, makeAbsolutePath, makeAbsolutePath, makeAbsolutePathFromWatershed, makeRelativePath, makeRelativePathFromWatershed, modifiyForSaveAs, newFile, newTSRecordProxy, newTSRecordProxy, notify, notifyModifiableListeners, openFile, printErrorMessage, printLogMessage, printMessage, printSeparator, printStatus, printTableRow, printWarningMessage, readFile, refreshData, reLoadChildManagers, reLoadFile, reLoadFile, removeCallBack, removeModifiableListener, renamed, saveChildManagers, saveManager, saveManagerAs, saveManagerAs, setFieldObject, setIdentifier, setLastModifiedTime, setLastModifiedTime, setLineAttributes, setLocked, setManagersModifiedTime, setModified, setModifiedFalse, setPath, setProgress, setProxyList, setReadOnly, setReloadOk, setUserInterface, setUserInterface, setWorkspace, toString, writeFile, writeLastModTimeMethods inherited from class hec.lang.NamedType
clone, compareTo, fireModifiedStateChanged, getDescription, getDisplayName, getIgnoreModifiedEvents, getIndex, getName, isModified, isValid, readResolve, rename, set, setDescription, setIgnoreModifiedEvents, setIndex, setName, setValid, update, useRecursiveModifiedTestMethods inherited from class java.util.Observable
addObserver, clearChanged, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers, setChangedMethods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface hec.clientapp.model.ManagerProxyListContainer
isModified, makeAbsolutePath, setModifiedMethods inherited from interface rma.lang.Modifiable
isModified
-
Field Details
-
_managerRmiWorkspace
protected transient hec.clientapp.rmi.csinterface.RmiWorkspace _managerRmiWorkspaceRMI Workspace -
_managerVector
Local cache of hec.model.manager objects -
_managerGroup
Local cache of child workspace managers -
_dataListContainer
the datalist container -
_childWorkspaces
-
-
Constructor Details
-
ManagerProxyListManager
public ManagerProxyListManager()Constructor for the ManagerProxyListManager object -
ManagerProxyListManager
-
-
Method Details
-
setManagerRmiWorkspace
public void setManagerRmiWorkspace(hec.clientapp.rmi.csinterface.RmiWorkspace wksp) set the Manager specific RmiWorkspace -
getManagerRmiWorkspace
public hec.clientapp.rmi.csinterface.RmiWorkspace getManagerRmiWorkspace()return the Manager specific RmiWorkspace -
init
public void init()Description of the Method -
initCallBack
protected void initCallBack() -
setCallback
protected void setCallback(mil.army.usace.hec.rmi.server.RemoteWrapper callBackWrap, hec.clientapp.rmi.csinterface.RmiWorkspace wksp) add this ManagerProxyListManager to the RmiWorkspace's callback list -
setCallback
protected void setCallback(hec.clientapp.rmi.csinterface.RmiWkspCallBack callBack, hec.clientapp.rmi.csinterface.RmiWorkspace wksp) -
getManagerProxies
protected void getManagerProxies()Gets a list of Manager Proxies from the Remote Workspace -
getManagerProxyList
Gets the ManagerProxyList attribute of the ManagerProxyListManager object- Specified by:
getManagerProxyListin interfaceManagerProxyListContainer- Parameters:
className- the classname of the managermodel- the wkspname model name- Returns:
- The ManagerProxyList value
-
getManagerProxy
Gets the ManagerProxy attribute of the ManagerProxyListManager object- Specified by:
getManagerProxyin interfaceManagerProxyListContainer- Parameters:
modelname- the wkspname model nameclassName- the classname of the managerindex- the manager's unique index- Returns:
- The ManagerProxy value
-
getManagerProxy
- Specified by:
getManagerProxyin interfaceManagerProxyListContainer
-
getCommonDataList
method that allows access to data lists from managers- Specified by:
getCommonDataListin interfaceManagerProxyListContainer- Overrides:
getCommonDataListin classManager- Parameters:
theDataObjectClass- the classname that CommonDataList representstheModel- the wkspname model name- Returns:
- The CommonDataList value
-
getUnitSystem
public int getUnitSystem()Gets the UnitSystem attribute of the ManagerProxyListManager object- Specified by:
getUnitSystemin interfaceManagerProxyListContainer- Overrides:
getUnitSystemin classManager- Returns:
- The UnitSystem value
-
getGmtOffset
public int getGmtOffset()Gets the GmtOffset attribute of the ManagerProxyListManager object- Specified by:
getGmtOffsetin interfaceManagerProxyListContainer- Overrides:
getGmtOffsetin classManager- Returns:
- The GmtOffset value
-
openManager
Description of the Method- Specified by:
openManagerin interfaceManagerProxyListContainer- Parameters:
id- the manager's Identifier- Returns:
- the Manager, or null if not found
-
loadManagerByName
loads a manager based on a classname and manager name for specific child workspace. -
openManager
Description of the Method- Specified by:
openManagerin interfaceManagerProxyListContainer- Parameters:
modelname- the wksp's model nameid- the Identifier of the Manager- Returns:
- the Manager, or null if not found
-
openManager
open a Manager by it relative path- Specified by:
openManagerin interfaceManagerProxyListContainer- Parameters:
modelname- the wksp's model namerelpath- the path relative to the wksp to the manager's file- Returns:
- the Manager, or null if not found
-
openManager
-
openManagerByName
- Specified by:
openManagerByNamein interfaceManagerProxyListContainer
-
openManager
open a Manager by it's index- Specified by:
openManagerin interfaceManagerProxyListContainer- Parameters:
className- the classname of the Managerindex- the unique index of the Managermodel- the wksp's model name- Returns:
- the Manager, or null if not found
-
newManager
create a new Manager for a specific workspace- Specified by:
newManagerin interfaceManagerProxyListContainer- Parameters:
className- the classname of the new Managermodel- the wksp's model name- Returns:
- the new Manager, or null if it couldn't be created
-
newManager
Creates a new manager of the requested class -
getManagerProxyList
Returns the manager proxy list for a particular model. The list is loaded if necessary- Specified by:
getManagerProxyListin interfaceManagerProxyListContainer
-
getManagerIdentifier
Returns a new identifier that points to a manager file. The name is modified to be a valid filename (if needed) and a path is generated by appending/ to the workspace path. - Parameters:
type- the model type that this manaager belongs too, ie RSS, CAVI, etc. Use the RmiWorkspace - constantsclassname- , the class name the represents the manager
-
getManagerIDList
-
getManagerIDList
return a list ofhec.io.Identifiers for allhec.clientapp.model.Managers specified by className that reside in thehec.clientapp.rmi.csinterface.RmiWorkspacespecified by modelName- Specified by:
getManagerIDListin interfaceManagerProxyListContainer- Parameters:
modelname- the type of the RmiWorkspace to find the Identifiers fromclassName- the Class name of the Managers being requested.- Returns:
- a
VectorcontainingIdentifiersan emptyVectorwill be returned. If noManagersare found matching className - See Also:
-
getChildWorkspace
Returns a particular child (model) workspace. The workspace is created if it does not already exist. get the DataLists from the child and add them to the DataList container. cache the child workspaces in a hashtable to make lookups faster- Specified by:
getChildWorkspacein interfaceManagerProxyListContainer- Returns:
-
getDataListContainer
public DataListContainer getDataListContainer(hec.clientapp.rmi.csinterface.RmiDataListContainer rdlc) -
saveWorkspace
public boolean saveWorkspace() -
saveWorkspace
public boolean saveWorkspace(boolean saveAllManagers) -
saveManager
Save the manager to disk -
saveManager
- Specified by:
saveManagerin interfaceManagerProxyListContainer
-
saveManagerAs
-
saveManagerAs
- Specified by:
saveManagerAsin interfaceManagerProxyListContainer- Parameters:
id-- Returns:
-
saveAllManagers
public void saveAllManagers()save all the managers regardless of whether they have been modified or not -
saveAllModifiedManagers
public void saveAllModifiedManagers()save all managers that say they've been modified. -
getWorkspacePath
- Overrides:
getWorkspacePathin classManager
-
unloading
public void unloading()called when Manager is being unloaded. Closes the workspace. -
closeWorkspace
protected void closeWorkspace() -
unloadManager
- Specified by:
unloadManagerin interfaceManagerProxyListContainer
-
isNetworked
public boolean isNetworked() -
dataChanged
public void dataChanged()- Specified by:
dataChangedin interfacehec.clientapp.client.WkspCallBack
-
managerChanged
- Specified by:
managerChangedin interfacehec.clientapp.event.ManagerChangedListener
-
managerAdded
-
managerRemoved
-
managerRenamed
-
mapAdded
public void mapAdded(hec.map.MapIdentifier mapId) - Specified by:
mapAddedin interfacehec.clientapp.client.WkspCallBack
-
mapRemoved
public void mapRemoved(hec.map.MapIdentifier mapId) - Specified by:
mapRemovedin interfacehec.clientapp.client.WkspCallBack
-
getWorkspaceName
-
getTitleName
-
getWorkspaceConfigFile
return the full path to the .wksp or .conf file for the Workspace specified by model- Returns:
- the full path to the configuration file
-
userChanged
- Specified by:
userChangedin interfacehec.clientapp.client.WkspCallBack
-
deleteManager
delete a manager.- Parameters:
modelname- name of the ManagerProxyList
-