RSE
Release 1.0

org.eclipse.rse.core.model
Interface ISystemHostPool

All Superinterfaces:
org.eclipse.rse.core.persistance.IRSEPersistableContainer

public interface ISystemHostPool
extends org.eclipse.rse.core.persistance.IRSEPersistableContainer


Method Summary
 boolean addHost(IHost conn)
          Add a new connection to the list.
 IHost cloneHost(ISystemHostPool targetPool, IHost conn, String aliasName)
          Duplicates a given connection in this list within this list or another list.
 IHost createHost(String systemType, String aliasName, String hostName)
          Create a connection.
 IHost createHost(String systemType, String aliasName, String hostName, String description)
          Create a connection.
 IHost createHost(String systemType, String aliasName, String hostName, String description, String defaultUserId, int defaultUserIdLocation)
          Create a connection.
 void deleteHost(IHost conn)
          Removes a given connection from the list and deletes it from disk.
 IHost getHost(int pos)
          Return the connection at the given zero-based offset
 IHost getHost(String aliasName)
          Return a connection given its name.
 int getHostCount()
          Return the number of SystemConnection objects within this pool.
 List getHostList()
           
 int getHostPosition(IHost conn)
          Return the zero-based position of a SystemConnection object within its profile.
 IHost[] getHosts()
          Return array of connections in this pool
 String getName()
           
 ISystemProfile getSystemProfile()
          Return the system profile that owns this connection pool
 void moveHosts(IHost[] conns, int delta)
          Move existing connections a given number of positions in the same pool.
 void orderHosts(String[] names)
          Order connections according to user preferences.
 void renameHost(IHost conn, String newName)
          Renames a given connection in the list.
 void renameHostPool(String newName)
          Rename this connection pool.
 void setName(String value)
           
 void updateHost(IHost conn, String systemType, String aliasName, String hostName, String description, String defaultUserId, int defaultUserIdLocation)
          Update an existing connection given the new information.
 
Methods inherited from interface org.eclipse.rse.core.persistance.IRSEPersistableContainer
commit, isDirty, setDirty, setWasRestored, wasRestored
 

Method Detail

getSystemProfile

public ISystemProfile getSystemProfile()
Return the system profile that owns this connection pool


renameHostPool

public void renameHostPool(String newName)
Rename this connection pool.


getHosts

public IHost[] getHosts()
Return array of connections in this pool


createHost

public IHost createHost(String systemType,
                        String aliasName,
                        String hostName)
                 throws Exception
Create a connection.

Throws:
Exception

createHost

public IHost createHost(String systemType,
                        String aliasName,
                        String hostName,
                        String description)
                 throws Exception
Create a connection.

Throws:
Exception

createHost

public IHost createHost(String systemType,
                        String aliasName,
                        String hostName,
                        String description,
                        String defaultUserId,
                        int defaultUserIdLocation)
                 throws Exception
Create a connection.

Throws:
Exception

updateHost

public void updateHost(IHost conn,
                       String systemType,
                       String aliasName,
                       String hostName,
                       String description,
                       String defaultUserId,
                       int defaultUserIdLocation)
                throws Exception
Update an existing connection given the new information. This method:

Parameters:
conn - SystemConnection to be updated
systemType - system type matching one of the system type names defined via the systemType extension point.
aliasName - unique connection name.
hostName - ip name of host.
description - optional description of the connection. Can be null.
defaultUserId - userId to use as the default for the subsystems.
defaultUserIdLocation - where to set the given default user Id. See ISystemUserIdConstants
Throws:
Exception

getHost

public IHost getHost(String aliasName)
Return a connection given its name.


getHost

public IHost getHost(int pos)
Return the connection at the given zero-based offset


addHost

public boolean addHost(IHost conn)
Add a new connection to the list.


deleteHost

public void deleteHost(IHost conn)
Removes a given connection from the list and deletes it from disk.

This will:

Parameters:
conn - SystemConnection object to remove

renameHost

public void renameHost(IHost conn,
                       String newName)
                throws Exception
Renames a given connection in the list. This will:

Parameters:
conn - SystemConnection object to rename
newName - The new name to give that connection.
Throws:
Exception

getHostPosition

public int getHostPosition(IHost conn)
Return the zero-based position of a SystemConnection object within its profile.


getHostCount

public int getHostCount()
Return the number of SystemConnection objects within this pool.


cloneHost

public IHost cloneHost(ISystemHostPool targetPool,
                       IHost conn,
                       String aliasName)
                throws Exception
Duplicates a given connection in this list within this list or another list.

Parameters:
targetPool - The SystemConnectionPool to hold the copied connection. Can equal this connection, as long as alias name is unique
conn - SystemConnection object (within our pool) to clone
Throws:
Exception

moveHosts

public void moveHosts(IHost[] conns,
                      int delta)
Move existing connections a given number of positions in the same pool. If the delta is negative, they are all moved up by the given amount. If positive, they are all moved down by the given amount.

TODO PROBLEM: CAN'T RE-ORDER FOLDERS SO CAN WE SUPPORT THIS ACTION?

Parameters:
conns - Array of SystemConnections to move.

orderHosts

public void orderHosts(String[] names)
Order connections according to user preferences. Called after restore.


getName

public String getName()
Returns:
The value of the Name attribute

setName

public void setName(String value)
Parameters:
value - The new value of the Name attribute

getHostList

public List getHostList()
Returns:
The list of Connections references

RSE
Release 1.0

Copyright (c) IBM Corporation and others 2000, 2006. All Rights Reserved.