RSE
Release 2.0

org.eclipse.rse.core.model
Interface ISystemHostPool

All Superinterfaces:
IRSEPersistableContainer

public interface ISystemHostPool
extends IRSEPersistableContainer


Field Summary
 
Fields inherited from interface org.eclipse.rse.core.model.IRSEPersistableContainer
NO_CHILDREN
 
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(IRSESystemType systemType, String aliasName, String hostName)
          Create a connection object, given only the minimal information.
 IHost createHost(IRSESystemType systemType, String aliasName, String hostName, String description)
          Create a connection object, given all the possible attributes except default userId.
 IHost createHost(IRSESystemType systemType, String aliasName, String hostName, String description, String defaultUserId, int defaultUserIdLocation)
          Create a connection object, given all the possible attributes.
 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, IRSESystemType 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.model.IRSEPersistableContainer
commit, getPersistableChildren, getPersistableParent, isDirty, isTainted, setDirty, setTainted, setWasRestored, wasRestored
 

Method Detail

getSystemProfile

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


renameHostPool

void renameHostPool(String newName)
Rename this connection pool.


getHosts

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


createHost

IHost createHost(IRSESystemType systemType,
                 String aliasName,
                 String hostName)
                 throws Exception
Create a connection object, given only the minimal information.

THE RESULTING CONNECTION OBJECT IS ADDED TO THE LIST OF EXISTING CONNECTIONS FOR YOU.

Parameters:
systemType - system type matching one of the system types defined via the systemTypes extension point.
aliasName - unique connection name.
hostName - ip name of host.
Returns:
SystemConnection object, or null if it failed to create because the aliasName is not unique. All other errors throw an exception.
Throws:
Exception

createHost

IHost createHost(IRSESystemType systemType,
                 String aliasName,
                 String hostName,
                 String description)
                 throws Exception
Create a connection object, given all the possible attributes except default userId.

THE RESULTING CONNECTION OBJECT IS ADDED TO THE LIST OF EXISTING CONNECTIONS FOR YOU.

Parameters:
systemType - system type matching one of the system types defined via the systemTypes extension point.
aliasName - unique connection name.
hostName - ip name of host.
description - optional description of the connection. Can be null.
Returns:
SystemConnection object, or null if it failed to create because the aliasName is not unique. All other errors throw an exception.
Throws:
Exception

createHost

IHost createHost(IRSESystemType systemType,
                 String aliasName,
                 String hostName,
                 String description,
                 String defaultUserId,
                 int defaultUserIdLocation)
                 throws Exception
Create a connection object, given all the possible attributes.

The new connection is added to the list and saved to disk.

Parameters:
systemType - system type matching one of the system types defined via the systemTypes 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 IRSEUserIdConstants for values.
Returns:
SystemConnection object, or null if it failed to create because the aliasName is not unique. All other errors throw an exception.
Throws:
Exception
See Also:
IRSEUserIdConstants

updateHost

void updateHost(IHost conn,
                IRSESystemType 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 types 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 from IRSEUserIdConstants.
Throws:
Exception
See Also:
IRSEUserIdConstants

getHost

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


getHost

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


addHost

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


deleteHost

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

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

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


getHostCount

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


cloneHost

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
aliasName - New, unique, alias name to give this connection. Clone will fail if this is not unique.
Throws:
Exception

moveHosts

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.
delta - the amount by which to move the hosts within this pool

orderHosts

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


getName

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

setName

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

getHostList

List getHostList()
Returns:
The list of Connections references

RSE
Release 2.0

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