Class ManagerProxyList

All Implemented Interfaces:
Serializable, Cloneable, Iterable, Collection, List, RandomAccess, SequencedCollection

public class ManagerProxyList extends Vector
Keeps track of a list of ManagerProxies
See Also:
  • Constructor Details

    • ManagerProxyList

      public ManagerProxyList(hec.clientapp.rmi.csinterface.RmiWorkspace workspace)
    • ManagerProxyList

      public ManagerProxyList()
  • Method Details

    • getModel

      public String getModel()
    • setModel

      public void setModel(String model)
    • getContainer

      public ManagerProxyListContainer getContainer()
    • getUnitSystem

      public int getUnitSystem()
    • getGmtOffset

      public int getGmtOffset()
    • setWorkspace

      public void setWorkspace(hec.clientapp.rmi.csinterface.RmiWorkspace workspace)
    • getWorkspace

      public hec.clientapp.rmi.csinterface.RmiWorkspace getWorkspace()
    • setManagerProxyListContainer

      public void setManagerProxyListContainer(ManagerProxyListContainer mplc)
    • saveAllManagers

      public boolean saveAllManagers(String user)
    • saveAllModifiedManagers

      public boolean saveAllModifiedManagers(String user)
    • unloadManager

      public void unloadManager(Identifier id)
      Find the manager matching the identifier and unloads the manager out of memory
    • unloadManagers

      public void unloadManagers()
      unloads all managers. called when the workspace is closing
    • closeWorkspace

      public void closeWorkspace()
    • loadManager

      public Manager loadManager(String classname, Identifier id) throws RemoteException
      Get the manager matching the identifier. The manager is instantiated and loaded if not already loaded. Should this method really throw a RemoteException??
      Throws:
      RemoteException
    • loadManagerByName

      public Manager loadManagerByName(String classname, String name) throws RemoteException
      Throws:
      RemoteException
    • getManagerProxy

      public ManagerProxy getManagerProxy(String classname, Identifier id) throws RemoteException
      Deprecated.
      Get the ManagerProxy matching the identifier.
      Throws:
      RemoteException
    • getManagerProxy

      public ManagerProxy getManagerProxy(String className, int index)
      Get the ManagerProxy matching the classname and index.
    • getManagerProxy

      public ManagerProxy getManagerProxy(String model, String className, int index)
      Get the ManagerProxy matching the model, classname and index.
    • findManager

      public ManagerProxy findManager(Identifier id)
      find the manager by it's id. Return null if not found
    • getManager

      public ManagerProxy getManager(Identifier id)
      Gets the manager, if there isn't a ManagerProxy that matches id then it creates one
    • getManagerProxy

      public ManagerProxy getManagerProxy(Identifier id)
      look for the ManagerProxy with an Identifier that matches id. If found return that ManagerProxy, otherwise return null.
      Parameters:
      id - the Identifier to find the ManagerProxy for
      Returns:
      the ManagerProxy for id, or null if not found
    • newManager

      public Manager newManager(String model, String classname)
      create a new Manager of the request class in the specified ProxyList
      Parameters:
      model - the name of the child workspace to use
      classname - the classname of the Manager to create
      Returns:
      the new Manager or null if the workspace can't be found.
    • newManager

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

      public Manager openManager(String model, Identifier id)
    • openManager

      public Manager openManager(String modelname, String relpath)
    • openManager

      public Manager openManager(Identifier id)
    • openManager

      public Manager openManager(String relpath)
    • saveManager

      public boolean saveManager(String username, Manager mgr)
    • saveManagerAs

      public boolean saveManagerAs(String username, Manager mgrFrom, Manager mgrTo)
    • saveManagerAs

      public boolean saveManagerAs(String username, Manager manager, Identifier id)
      does manager save as
    • deleteManager

      public boolean deleteManager(Identifier id)
    • openManager

      public Manager openManager(String modelname, String className, int index)
    • openManager

      public Manager openManager(String className, int index)
    • getManagerIDList

      public Vector<Identifier> getManagerIDList(String className)
      return a list of hec.io.Identifiers for all hec.clientapp.model.Managers specified by className
      Parameters:
      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
    • removeAllManagersCallbacks

      public void removeAllManagersCallbacks()
    • dropAllManagers

      public void dropAllManagers()
      drop all managers. call this with extreme care as this can cause very hard to figure out problems where a reference to a manager is kept and its ManagerProxy drops its reference. You'll end up with multiple copies of the same manager in memory.