Class 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 Details

    • _managerRmiWorkspace

      protected transient hec.clientapp.rmi.csinterface.RmiWorkspace _managerRmiWorkspace
      RMI Workspace
    • _managerVector

      protected transient ManagerProxyList _managerVector
      Local cache of hec.model.manager objects
    • _managerGroup

      protected transient Hashtable _managerGroup
      Local cache of child workspace managers
    • _dataListContainer

      protected transient DataListContainer _dataListContainer
      the datalist container
    • _childWorkspaces

      protected transient Hashtable _childWorkspaces
  • Constructor Details

    • ManagerProxyListManager

      public ManagerProxyListManager()
      Constructor for the ManagerProxyListManager object
    • ManagerProxyListManager

      public ManagerProxyListManager(String name)
  • 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
      Specified by:
      init in class Manager
    • 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

      public Vector getManagerProxyList(String modelname, String className)
      Gets the ManagerProxyList attribute of the ManagerProxyListManager object
      Specified by:
      getManagerProxyList in interface ManagerProxyListContainer
      Parameters:
      className - the classname of the manager
      model - the wkspname model name
      Returns:
      The ManagerProxyList value
    • getManagerProxy

      public ManagerProxy getManagerProxy(String modelname, String className, int index)
      Gets the ManagerProxy attribute of the ManagerProxyListManager object
      Specified by:
      getManagerProxy in interface ManagerProxyListContainer
      Parameters:
      modelname - the wkspname model name
      className - the classname of the manager
      index - the manager's unique index
      Returns:
      The ManagerProxy value
    • getManagerProxy

      public ManagerProxy getManagerProxy(String modelname, Identifier id)
      Specified by:
      getManagerProxy in interface ManagerProxyListContainer
    • getCommonDataList

      public CommonDataList getCommonDataList(String theDataObjectClass, String theModel)
      method that allows access to data lists from managers
      Specified by:
      getCommonDataList in interface ManagerProxyListContainer
      Overrides:
      getCommonDataList in class Manager
      Parameters:
      theDataObjectClass - the classname that CommonDataList represents
      theModel - the wkspname model name
      Returns:
      The CommonDataList value
    • getUnitSystem

      public int getUnitSystem()
      Gets the UnitSystem attribute of the ManagerProxyListManager object
      Specified by:
      getUnitSystem in interface ManagerProxyListContainer
      Overrides:
      getUnitSystem in class Manager
      Returns:
      The UnitSystem value
    • getGmtOffset

      public int getGmtOffset()
      Gets the GmtOffset attribute of the ManagerProxyListManager object
      Specified by:
      getGmtOffset in interface ManagerProxyListContainer
      Overrides:
      getGmtOffset in class Manager
      Returns:
      The GmtOffset value
    • openManager

      public Manager openManager(Identifier id)
      Description of the Method
      Specified by:
      openManager in interface ManagerProxyListContainer
      Parameters:
      id - the manager's Identifier
      Returns:
      the Manager, or null if not found
    • loadManagerByName

      public Manager loadManagerByName(String modelname, String classname, String name)
      loads a manager based on a classname and manager name for specific child workspace.
    • openManager

      public Manager openManager(String modelname, Identifier id)
      Description of the Method
      Specified by:
      openManager in interface ManagerProxyListContainer
      Parameters:
      modelname - the wksp's model name
      id - the Identifier of the Manager
      Returns:
      the Manager, or null if not found
    • openManager

      public Manager openManager(String modelname, String relpath)
      open a Manager by it relative path
      Specified by:
      openManager in interface ManagerProxyListContainer
      Parameters:
      modelname - the wksp's model name
      relpath - the path relative to the wksp to the manager's file
      Returns:
      the Manager, or null if not found
    • openManager

      public Manager openManager(String relpath)
    • openManagerByName

      public Manager openManagerByName(String modelname, String classname, String name)
      Specified by:
      openManagerByName in interface ManagerProxyListContainer
    • openManager

      public Manager openManager(String modelname, String className, int index)
      open a Manager by it's index
      Specified by:
      openManager in interface ManagerProxyListContainer
      Parameters:
      className - the classname of the Manager
      index - the unique index of the Manager
      model - the wksp's model name
      Returns:
      the Manager, or null if not found
    • newManager

      public Manager newManager(String modelname, String className)
      create a new Manager for a specific workspace
      Specified by:
      newManager in interface ManagerProxyListContainer
      Parameters:
      className - the classname of the new Manager
      model - the wksp's model name
      Returns:
      the new Manager, or null if it couldn't be created
    • newManager

      public Manager newManager(String classname)
      Creates a new manager of the requested class
    • getManagerProxyList

      public ManagerProxyList getManagerProxyList(String modelname)
      Returns the manager proxy list for a particular model. The list is loaded if necessary
      Specified by:
      getManagerProxyList in interface ManagerProxyListContainer
    • getManagerIdentifier

      public Identifier getManagerIdentifier(String type, String classname, String name, String ext)
      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 - constants
      classname - , the class name the represents the manager
    • getManagerIDList

      public Vector<Identifier> getManagerIDList(String className)
    • getManagerIDList

      public Vector<Identifier> getManagerIDList(String modelname, String className)
      return a list of hec.io.Identifiers for all hec.clientapp.model.Managers specified by className that reside in the hec.clientapp.rmi.csinterface.RmiWorkspace specified by modelName
      Specified by:
      getManagerIDList in interface ManagerProxyListContainer
      Parameters:
      modelname - the type of the RmiWorkspace to find the Identifiers from
      className - the Class name of the Managers being requested.
      Returns:
      a Vector containing Identifiers an empty Vector will be returned. If no Managers are found matching className
      See Also:
    • getChildWorkspace

      public hec.clientapp.rmi.csinterface.RmiWorkspace getChildWorkspace(String modelname)
      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:
      getChildWorkspace in interface ManagerProxyListContainer
      Returns:
    • getDataListContainer

      public DataListContainer getDataListContainer(hec.clientapp.rmi.csinterface.RmiDataListContainer rdlc)
    • saveWorkspace

      public boolean saveWorkspace()
    • saveWorkspace

      public boolean saveWorkspace(boolean saveAllManagers)
    • saveManager

      public boolean saveManager(Manager mgr)
      Save the manager to disk
    • saveManager

      public boolean saveManager(String modelname, Manager mgr)
      Specified by:
      saveManager in interface ManagerProxyListContainer
    • saveManagerAs

      public boolean saveManagerAs(Manager mgr, Identifier id)
    • saveManagerAs

      public boolean saveManagerAs(String modelname, Manager mgr, Identifier id)
      Specified by:
      saveManagerAs in interface ManagerProxyListContainer
      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

      public String getWorkspacePath()
      Overrides:
      getWorkspacePath in class Manager
    • unloading

      public void unloading()
      called when Manager is being unloaded. Closes the workspace.
      Overrides:
      unloading in class Manager
    • closeWorkspace

      protected void closeWorkspace()
    • unloadManager

      public void unloadManager(String modelname, Identifier id)
      Specified by:
      unloadManager in interface ManagerProxyListContainer
    • isNetworked

      public boolean isNetworked()
    • dataChanged

      public void dataChanged()
      Specified by:
      dataChanged in interface hec.clientapp.client.WkspCallBack
    • managerChanged

      public void managerChanged(int changeType, ManagerProxy proxy, String model)
      Specified by:
      managerChanged in interface hec.clientapp.event.ManagerChangedListener
    • managerAdded

      protected void managerAdded(ManagerProxy proxy, String model)
    • managerRemoved

      protected void managerRemoved(ManagerProxy proxy, String model)
    • managerRenamed

      protected void managerRenamed(ManagerProxy proxy, String model)
    • mapAdded

      public void mapAdded(hec.map.MapIdentifier mapId)
      Specified by:
      mapAdded in interface hec.clientapp.client.WkspCallBack
    • mapRemoved

      public void mapRemoved(hec.map.MapIdentifier mapId)
      Specified by:
      mapRemoved in interface hec.clientapp.client.WkspCallBack
    • getWorkspaceName

      public String getWorkspaceName()
    • getTitleName

      public String getTitleName()
    • getWorkspaceConfigFile

      public String getWorkspaceConfigFile(String model)
      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

      public void userChanged(String user, String changeType)
      Specified by:
      userChanged in interface hec.clientapp.client.WkspCallBack
    • deleteManager

      public boolean deleteManager(String modelname, Identifier id, boolean deleteFile)
      delete a manager.
      Parameters:
      modelname - name of the ManagerProxyList