iSeries Remote Systems
v6.0.0

com.ibm.etools.iseries.core.api
Class ISeriesConnection

java.lang.Object
  extended bycom.ibm.etools.iseries.core.api.ISeriesConnection
All Implemented Interfaces:
com.ibm.etools.iseries.comm.interfaces.IISeriesConnection

public class ISeriesConnection
extends Object
implements com.ibm.etools.iseries.comm.interfaces.IISeriesConnection

ISeriesConnection

This is the starting point for using the communication APIs to access ISeries resources using the Remote Systems Explorer communications layer.


Field Summary
static String copyright
           
 
Fields inherited from interface com.ibm.etools.iseries.comm.interfaces.IISeriesConnection
Copyright
 
Method Summary
 boolean checkAuthority(String library, String object, String objType, String authList)
          Check if the current user profile has the required authorities to the specified object.
 boolean checkAuthority(String library, String object, String objType, String[] authList)
          Check if the current user profile has the required authorities to the specified object.
 boolean connect()
          Connect to this iSeries, when we don't have a Shell parent
 boolean connect(Shell shell)
          Connect to this iSeries
 com.ibm.as400.access.AS400 getAS400ToolboxObject(Shell shell)
          Retrieve an AS400 (Toolbox) object for the current connection.
 com.ibm.as400.access.AS400 getAS400ToolboxObject(Shell shell, boolean createNew)
          Retrieve an AS400 (Toolbox) object for the current connection.
static com.ibm.as400.access.AS400 getAS400ToolboxObject(String profileName, String connectionName, Shell shell)
           
 CacheManager getCacheManager()
          Get the caching manager used for this connection.
 String getCODEAlias()
          Retrieve the CODE communications alias for this connection.
 String getCODEAlias(Shell shell)
          Retrieve the CODE communications alias for this connection.
static ISeriesConnection getConnection(String connectionName)
          Retrieves the specified connection from the RSE, given only the connection name.
static ISeriesConnection getConnection(String profileName, String connectionName)
          Retrieves the specified connection from the RSE, given the profile and connection name
static ISeriesConnection getConnection(com.ibm.etools.systems.model.SystemConnection systemConnection)
          Converts the given generic connection into a typed ISeriesConnection
 String getConnectionName()
          Retrieve the connection name for this connection.
static ISeriesConnection[] getConnections()
          Retrieves all connections in the RSE of type "iSeries"
 ISeriesCodepageConverter getConverter(Shell shell)
          Return a converter object for this connection, for codepage conversion.
static ISeriesCodepageConverter getConverter(String profileName, String connectionName, Shell shell)
          Returns the converter object given a profile and connection name.
 com.ibm.etools.iseries.comm.interfaces.IISeriesEditDescriptionsInfo getEditDescriptions()
          Retrieve the edit description information from the iSeries.
 String getHostName()
          Retrieve the host name for this connection.
 ISeriesRSEInteractiveJob getInteractiveServerJob(Shell shell)
          Retrieve the ISeriesRSEInteractiveJob class which represents the interactive job (5250) that is associated with this RSE connection.
 CmdSubSystemImpl getISeriesCmdSubSystem()
          Get the iSeries command subsystem ("iSeries Commands") for this connection.
 CmdSubSystemImpl getISeriesCmdSubSystem(Shell shell)
          Get the iSeries command subsystem ("iSeries Commands") for this connection.
 ISeriesFile getISeriesFile(Shell shell, String libraryName, String fileName)
          Return an ISeriesFile from this connection, given its name
 com.ibm.etools.iseries.comm.interfaces.IISeriesFile getISeriesFile(String libraryName, String fileName)
          Return an ISeriesFile from this connection, given its name
 FileSubSystemImpl getISeriesFileSubSystem()
          Get the iSeries file subsystem ("iSeries Objects") for this connection.
 FileSubSystemImpl getISeriesFileSubSystem(Shell shell)
          Get the iSeries file subsystem ("iSeries Objects") for this connection.
 AS400ifsCmdSubSystemImpl getISeriesIFSCmdSubSystem()
          Get the iSeries IFS cmd subsystem ("IFS Commands") for this connection.
 AS400ifsCmdSubSystemImpl getISeriesIFSCmdSubSystem(Shell shell)
          Get the iSeries IFS cmd subsystem ("IFS Commands") for this connection.
 AS400ifsFileSubSystemImpl getISeriesIFSFileSubSystem()
          Get the iSeries IFS file subsystem ("IFS Files") for this connection.
 AS400ifsFileSubSystemImpl getISeriesIFSFileSubSystem(Shell shell)
          Get the iSeries IFS file subsystem ("IFS Files") for this connection.
 ISeriesJob getISeriesJob(Shell shell, com.ibm.etools.iseries.comm.filters.ISeriesJobFilterString jobNameFilter)
          Returns an ISeriesJob from this connection, given job number, job user, and job name.
 ISeriesJob getISeriesJob(Shell shell, String jobNumber, String userName, String jobName)
          Returns an ISeriesJob from this connection, given job number, job user, and job name.
 JobSubSystemImpl getISeriesJobSubSystem()
          Get the iSeries job subsystem ("iSeries Jobs") for this connection.
 JobSubSystemImpl getISeriesJobSubSystem(Shell shell)
          Get the iSeries job subsystem ("iSeries Jobs") for this connection.
 ISeriesLibrary getISeriesLibrary(Shell shell, String libraryName)
          Return an ISeriesLibrary from this connection, given its name
 ISeriesMember getISeriesMember(Shell shell, String libraryName, String fileName, String memberName)
          Return an ISeriesMember from this connection, given its name, file name and library name
 com.ibm.etools.iseries.comm.interfaces.IISeriesMember getISeriesMember(String libraryName, String fileName, String memberName)
          Return an ISeriesMember from this connection, given its name, file name and library name
 ISeriesObject getISeriesObject(Shell shell, String libraryName, String objectName, String type)
          Return an ISeriesObject from this connection, given its name and type
 ISeriesSystemDataStore getISeriesSystem()
          Return the shared ISystem object for this connection.
 Connection getJDBCConnection(String properties, boolean forceConnect)
          Get a JDBC Connection object to DB2/400, pre-connected, for this connection.
 ISeriesLibrary[] getLibraries(Shell shell)
          Deprecated. Use listLibraries(Shell shell)
 ISeriesLibrary[] getLibraries(Shell shell, String libraryFilter)
          Deprecated. Use listLibraries(Shell shell, String libraryFilter)
 InetAddress getLocalAddress()
          Returns the local TCP/IP address for the local system that is accessible from the iSeries.
 com.ibm.etools.iseries.comm.interfaces.IISeriesMessageDescription getMessageDescription(String msgFileLibrary, String msgFileName, String msgID)
          Retrieve a message description from the remote system
 String getPasswordEncrypted()
          Returns the password (encrypted) for this connection
 String getProfileName()
          Retrieve the profile name for this connection.
 ISeriesJob getServerJob(Shell shell)
          Returns an ISeriesJob instance representing the communications server job for this connection.
 com.ibm.etools.iseries.comm.interfaces.IISeriesSortSequenceTable getSortSequenceTable(String table, String library, String langID, int ccsid)
          Retrieve the edit description information from the iSeries.
 com.ibm.etools.systems.subsystems.SubSystem[] getSubSystems()
          Get all subsystems for this connection
 com.ibm.etools.systems.model.SystemConnection getSystemConnection()
          Returns the underlying SystemConnection that this ISeriesConnection object wraps
 String getUserID()
          Returns the userid for this connection
 String getVersionReleaseModification()
          Get the version, release and modification level of the remote system.
 boolean isConnected()
          Test if we are currently connected to this iSeries
 boolean isDBCSEnabled()
          Check if the system is DBCS enabled as determined by the QIGC system value.
 boolean isOffline()
          Test if this connection is offline.
 ISeriesLibrary[] listLibraries(Shell shell)
          Retrieve the library list for this connection
 ISeriesLibrary[] listLibraries(Shell shell, String libraryFilter)
          Retrieve a list of libraries matching the specified filter string
 ISeriesMember[] listMembers(Shell shell, String libraryNameFilter, String fileNameFilter)
          List all members in the specified file.
 ISeriesMember[] listMembers(Shell shell, String libraryNameFilter, String fileNameFilter, String memberNameFilter)
          Retrieve a list of all members matching the specified library name, object name and member name.
 ISeriesMember[] listMembers(Shell shell, String libraryNameFilter, String fileNameFilter, String memberNameFilter, String[] memberTypes)
          Retrieve a list of all members matching the specified library name, object name and member name.
 ISeriesObject[] listObjects(Shell shell, String libraryNameFilter)
          List all objects in the specified library.
 ISeriesObject[] listObjects(Shell shell, String libraryNameFilter, String objectNameFilter)
          Retrieve a list of all objects matching the specified library and object name filter strings.
 ISeriesObject[] listObjects(Shell shell, String libraryNameFilter, String objectNameFilter, String[] objectTypes)
          Retrieve a list of all objects matching the specified library name, object name and type filter strings.
 ISeriesMessage[] runCommand(Shell shell, String command)
          Run a command on the iSeries in the communication server job.
 String toString()
          Retrieve the connection name.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

copyright

public static final String copyright
See Also:
Constant Field Values
Method Detail

getConnections

public static ISeriesConnection[] getConnections()
Retrieves all connections in the RSE of type "iSeries"

Returns:
An array of ISeriesConnection objects, each representing a connection defined in the RSE; null if no connections exist.

getConnection

public static ISeriesConnection getConnection(String profileName,
                                              String connectionName)
Retrieves the specified connection from the RSE, given the profile and connection name

Parameters:
connectionName - A string containing the connection name
Returns:
The ISeriesConnection object, null if no connection exists for the specified connection name

getConnection

public static ISeriesConnection getConnection(String connectionName)
Retrieves the specified connection from the RSE, given only the connection name. If such a connection name is used in multiple profiles, this returns the first one it finds.

Parameters:
connectionName - A string containing the connection name
Returns:
The ISeriesConnection object, null if no connection exists for the specified connection name

getConnection

public static ISeriesConnection getConnection(com.ibm.etools.systems.model.SystemConnection systemConnection)
Converts the given generic connection into a typed ISeriesConnection

Returns:
The ISeriesConnection object

getSystemConnection

public com.ibm.etools.systems.model.SystemConnection getSystemConnection()
Returns the underlying SystemConnection that this ISeriesConnection object wraps


getSubSystems

public com.ibm.etools.systems.subsystems.SubSystem[] getSubSystems()
Get all subsystems for this connection


connect

public boolean connect(Shell shell)
                throws com.ibm.etools.systems.core.messages.SystemMessageException
Connect to this iSeries

Throws:
com.ibm.etools.systems.core.messages.SystemMessageException

connect

public boolean connect()
                throws com.ibm.etools.systems.core.messages.SystemMessageException
Connect to this iSeries, when we don't have a Shell parent

Specified by:
connect in interface com.ibm.etools.iseries.comm.interfaces.IISeriesConnection
Throws:
com.ibm.etools.systems.core.messages.SystemMessageException

isConnected

public boolean isConnected()
Test if we are currently connected to this iSeries

Specified by:
isConnected in interface com.ibm.etools.iseries.comm.interfaces.IISeriesConnection

isOffline

public boolean isOffline()
Test if this connection is offline.


getISeriesSystem

public ISeriesSystemDataStore getISeriesSystem()
Return the shared ISystem object for this connection. This is where you can get a JDBC connection object, and directly test for connected status.


getISeriesFileSubSystem

public FileSubSystemImpl getISeriesFileSubSystem(Shell shell)
Get the iSeries file subsystem ("iSeries Objects") for this connection. Currently the shell parameter is not used and this is the same as getISeriesFileSubSystem()

Returns:
The iSeries file subsystem for this connection

getISeriesFileSubSystem

public FileSubSystemImpl getISeriesFileSubSystem()
Get the iSeries file subsystem ("iSeries Objects") for this connection. The term "file subsystem" and "objects subsystem" are interchangable.

Returns:
The iSeries file subsystem for this connection

getISeriesCmdSubSystem

public CmdSubSystemImpl getISeriesCmdSubSystem(Shell shell)
Get the iSeries command subsystem ("iSeries Commands") for this connection. Currently the shell parameter is not used and this is the same as getISeriesCmdSubSystem()

Returns:
The iSeries command subsystem for this connection.

getISeriesCmdSubSystem

public CmdSubSystemImpl getISeriesCmdSubSystem()
Get the iSeries command subsystem ("iSeries Commands") for this connection.

Returns:
The iSeries command subsystem for this connection.

getISeriesJobSubSystem

public JobSubSystemImpl getISeriesJobSubSystem(Shell shell)
Get the iSeries job subsystem ("iSeries Jobs") for this connection. Currently the shell parameter is not used and this is the same as getISeriesJobSubSystem()

Returns:
The iSeries job subsystem for this connection.

getISeriesJobSubSystem

public JobSubSystemImpl getISeriesJobSubSystem()
Get the iSeries job subsystem ("iSeries Jobs") for this connection.

Returns:
The iSeries job subsystem for this connection.

getISeriesIFSFileSubSystem

public AS400ifsFileSubSystemImpl getISeriesIFSFileSubSystem(Shell shell)
Get the iSeries IFS file subsystem ("IFS Files") for this connection. Currently the shell parameter is not used and this is the same as getISeriesIFSFileSubSystem()

Returns:
The iSeries IFS subsystem for this connection.

getISeriesIFSFileSubSystem

public AS400ifsFileSubSystemImpl getISeriesIFSFileSubSystem()
Get the iSeries IFS file subsystem ("IFS Files") for this connection.

Returns:
The iSeries IFS subsystem for this connection.

getISeriesIFSCmdSubSystem

public AS400ifsCmdSubSystemImpl getISeriesIFSCmdSubSystem(Shell shell)
Get the iSeries IFS cmd subsystem ("IFS Commands") for this connection. Currently the shell parameter is not used and this is the same as getISeriesIFSCmdSubSystem()

Returns:
The iSeries cmd subsystem for this connection.

getISeriesIFSCmdSubSystem

public AS400ifsCmdSubSystemImpl getISeriesIFSCmdSubSystem()
Get the iSeries IFS cmd subsystem ("IFS Commands") for this connection.

Returns:
The iSeries cmd subsystem for this connection.

getProfileName

public String getProfileName()
Retrieve the profile name for this connection.

Returns:
Profile name for this connection.

getConnectionName

public String getConnectionName()
Retrieve the connection name for this connection.

Specified by:
getConnectionName in interface com.ibm.etools.iseries.comm.interfaces.IISeriesConnection
Returns:
Connection name for this connection.

getHostName

public String getHostName()
Retrieve the host name for this connection.

Specified by:
getHostName in interface com.ibm.etools.iseries.comm.interfaces.IISeriesConnection
Returns:
The TCP/IP host name or address (whichever the user entered) for this connection.

toString

public String toString()
Retrieve the connection name. Same as calling getConnectionName()

Returns:
Name for this connection.

getAS400ToolboxObject

public com.ibm.as400.access.AS400 getAS400ToolboxObject(Shell shell)
                                                 throws com.ibm.etools.systems.core.messages.SystemMessageException
Retrieve an AS400 (Toolbox) object for the current connection. The AS400 object will already have the hostname, userid and password fields set.

Returns:
An AS400 object already connected to host.
Throws:
Exception - if user cancels signon or any other error occurs.
com.ibm.etools.systems.core.messages.SystemMessageException

getAS400ToolboxObject

public com.ibm.as400.access.AS400 getAS400ToolboxObject(Shell shell,
                                                        boolean createNew)
                                                 throws com.ibm.etools.systems.core.messages.SystemMessageException
Retrieve an AS400 (Toolbox) object for the current connection. The AS400 object will already have the hostname, userid and password fields set.

Returns:
An AS400 object already connected to host.
Throws:
Exception - if user cancels signon or any other error occurs.
com.ibm.etools.systems.core.messages.SystemMessageException

getAS400ToolboxObject

public static com.ibm.as400.access.AS400 getAS400ToolboxObject(String profileName,
                                                               String connectionName,
                                                               Shell shell)
                                                        throws com.ibm.etools.systems.core.messages.SystemMessageException
Throws:
com.ibm.etools.systems.core.messages.SystemMessageException

getJDBCConnection

public Connection getJDBCConnection(String properties,
                                    boolean forceConnect)
                             throws SQLException
Get a JDBC Connection object to DB2/400, pre-connected, for this connection.

Important notes:

Parameters:
properties - A list of properties to append to the url, as per the JDBC/400 getConnection(...) support. This string is appended to the string "jdbc:as400://" + getHostName(), and so must start with a semicolon. If null is passed, the following is used: ";prompt=false;big decimal=false"
forceConnect - whether to prompt user to signon if not already.
Throws:
SQLException

getCODEAlias

public String getCODEAlias()
                    throws com.ibm.etools.systems.core.messages.SystemMessageException
Retrieve the CODE communications alias for this connection. If the connection is not connected then it will be connected as soon as the first UI thread is available.

Returns:
Returns the CODE communications alias for this connection or null if the connection could not be registered with CODE communications.
Throws:
com.ibm.etools.systems.core.messages.SystemMessageException

getCODEAlias

public String getCODEAlias(Shell shell)
                    throws com.ibm.etools.systems.core.messages.SystemMessageException
Retrieve the CODE communications alias for this connection. If the connection is not connected then it will be connected.

Parameters:
shell - Shell used for connection dialogs if the connection is not already connected.
Returns:
Returns the CODE communications alias for this connection or null if the connection could not be registered with CODE communications.
Throws:
com.ibm.etools.systems.core.messages.SystemMessageException

getUserID

public String getUserID()
Returns the userid for this connection

Specified by:
getUserID in interface com.ibm.etools.iseries.comm.interfaces.IISeriesConnection

getPasswordEncrypted

public String getPasswordEncrypted()
Returns the password (encrypted) for this connection

Returns:
null if the password prompt was cancelled by the user

getLibraries

public ISeriesLibrary[] getLibraries(Shell shell)
                              throws com.ibm.etools.systems.core.messages.SystemMessageException
Deprecated. Use listLibraries(Shell shell)

Return the library list for this connection

Returns:
An array of ISeriesLibrary objects each representing a library in the library list.
Throws:
com.ibm.etools.systems.core.messages.SystemMessageException - If an error occurs while retrieving the library list.

getLibraries

public ISeriesLibrary[] getLibraries(Shell shell,
                                     String libraryFilter)
                              throws com.ibm.etools.systems.core.messages.SystemMessageException
Deprecated. Use listLibraries(Shell shell, String libraryFilter)

Retrieve a list of libraries matching the specified filter string

Returns:
An array of ISeriesLibrary objects each representing a library that matches the filter. An empty array (length == 0) is returned if no libraries match the filter.
Throws:
com.ibm.etools.systems.core.messages.SystemMessageException - If an error occurs while retrieving the list.

getISeriesLibrary

public ISeriesLibrary getISeriesLibrary(Shell shell,
                                        String libraryName)
                                 throws com.ibm.etools.systems.core.messages.SystemMessageException
Return an ISeriesLibrary from this connection, given its name

Returns:
The ISeriesLibrary object representing this library, or null if the library was not found on the remote system.
Throws:
com.ibm.etools.systems.core.messages.SystemMessageException - if an error occurs while retrieving the library information.

getISeriesFile

public ISeriesFile getISeriesFile(Shell shell,
                                  String libraryName,
                                  String fileName)
                           throws com.ibm.etools.systems.core.messages.SystemMessageException
Return an ISeriesFile from this connection, given its name

Returns:
The ISeriesFile representing this file, or null if the file was not found on the remote system.
Throws:
com.ibm.etools.systems.core.messages.SystemMessageException - if an error occurs while retrieving the file information.

getISeriesFile

public com.ibm.etools.iseries.comm.interfaces.IISeriesFile getISeriesFile(String libraryName,
                                                                          String fileName)
                                                                   throws Exception
Return an ISeriesFile from this connection, given its name

Specified by:
getISeriesFile in interface com.ibm.etools.iseries.comm.interfaces.IISeriesConnection
Returns:
The ISeriesFile representing this file, or null if the file was not found on the remote system.
Throws:
com.ibm.etools.systems.core.messages.SystemMessageException - if an error occurs while retrieving the file information.
Exception

getISeriesObject

public ISeriesObject getISeriesObject(Shell shell,
                                      String libraryName,
                                      String objectName,
                                      String type)
                               throws com.ibm.etools.systems.core.messages.SystemMessageException
Return an ISeriesObject from this connection, given its name and type

Throws:
com.ibm.etools.systems.core.messages.SystemMessageException

getISeriesMember

public ISeriesMember getISeriesMember(Shell shell,
                                      String libraryName,
                                      String fileName,
                                      String memberName)
                               throws com.ibm.etools.systems.core.messages.SystemMessageException
Return an ISeriesMember from this connection, given its name, file name and library name

Throws:
com.ibm.etools.systems.core.messages.SystemMessageException

getISeriesMember

public com.ibm.etools.iseries.comm.interfaces.IISeriesMember getISeriesMember(String libraryName,
                                                                              String fileName,
                                                                              String memberName)
                                                                       throws Exception
Return an ISeriesMember from this connection, given its name, file name and library name

Specified by:
getISeriesMember in interface com.ibm.etools.iseries.comm.interfaces.IISeriesConnection
Throws:
Exception

getISeriesJob

public ISeriesJob getISeriesJob(Shell shell,
                                String jobNumber,
                                String userName,
                                String jobName)
                         throws com.ibm.etools.systems.core.messages.SystemMessageException
Returns an ISeriesJob from this connection, given job number, job user, and job name.

Parameters:
shell - specify null if no progress monitor is needed.
jobNumber - the job number
userName - the user name of the job
jobName - the job name
Returns:
an ISeriesJob
Throws:
com.ibm.etools.systems.core.messages.SystemMessageException

getISeriesJob

public ISeriesJob getISeriesJob(Shell shell,
                                com.ibm.etools.iseries.comm.filters.ISeriesJobFilterString jobNameFilter)
                         throws com.ibm.etools.systems.core.messages.SystemMessageException
Returns an ISeriesJob from this connection, given job number, job user, and job name.

Parameters:
shell - specify null if no progress monitor is needed.
jobNameFilter - the filter to resolve job name
Returns:
an ISeriesJob
Throws:
com.ibm.etools.systems.core.messages.SystemMessageException

getServerJob

public ISeriesJob getServerJob(Shell shell)
                        throws com.ibm.etools.systems.core.messages.SystemMessageException
Returns an ISeriesJob instance representing the communications server job for this connection.

Throws:
com.ibm.etools.systems.core.messages.SystemMessageException

getInteractiveServerJob

public ISeriesRSEInteractiveJob getInteractiveServerJob(Shell shell)
                                                 throws com.ibm.etools.systems.core.messages.SystemMessageException
Retrieve the ISeriesRSEInteractiveJob class which represents the interactive job (5250) that is associated with this RSE connection. The user will be prompted to associate an interactive job with this connection if one is not already associated.

Returns:
The ISeriesRSEInteractiveJob instance representing this connection.
Throws:
com.ibm.etools.systems.core.messages.SystemMessageException - If a communications error occurs or the user cancels the prompt to associate an interactive job with this RSE connection.

listLibraries

public ISeriesLibrary[] listLibraries(Shell shell)
                               throws com.ibm.etools.systems.core.messages.SystemMessageException
Retrieve the library list for this connection

Returns:
The library list for this connection
Throws:
com.ibm.etools.systems.core.messages.SystemMessageException - If an error occurs while retrieving the list.

listLibraries

public ISeriesLibrary[] listLibraries(Shell shell,
                                      String libraryFilter)
                               throws com.ibm.etools.systems.core.messages.SystemMessageException
Retrieve a list of libraries matching the specified filter string

Returns:
An array of ISeriesLibrary objects each representing a library that matches the filter. An empty array (length == 0) is returned if no libraries match the filter.
Throws:
com.ibm.etools.systems.core.messages.SystemMessageException - If an error occurs while retrieving the list.

listObjects

public ISeriesObject[] listObjects(Shell shell,
                                   String libraryNameFilter)
                            throws com.ibm.etools.systems.core.messages.SystemMessageException
List all objects in the specified library.

Returns:
An array of ISeriesObject objects each representing an object that matches the specified filter criteria. An empty array (length == 0) is returned if no objects match the filter.
Throws:
com.ibm.etools.systems.core.messages.SystemMessageException - If an error occurs while retrieving the list.

listObjects

public ISeriesObject[] listObjects(Shell shell,
                                   String libraryNameFilter,
                                   String objectNameFilter)
                            throws com.ibm.etools.systems.core.messages.SystemMessageException
Retrieve a list of all objects matching the specified library and object name filter strings.

Returns:
An array of ISeriesObject objects each representing an object that matches the specified filter criteria. An empty array (length == 0) is returned if no objects match the filter.
Throws:
com.ibm.etools.systems.core.messages.SystemMessageException - If an error occurs while retrieving the list.

listObjects

public ISeriesObject[] listObjects(Shell shell,
                                   String libraryNameFilter,
                                   String objectNameFilter,
                                   String[] objectTypes)
                            throws com.ibm.etools.systems.core.messages.SystemMessageException
Retrieve a list of all objects matching the specified library name, object name and type filter strings.

Returns:
An array of ISeriesObject objects each representing an object that matches the specified filter criteria. An empty array (length == 0) is returned if no objects match the filter.
Throws:
com.ibm.etools.systems.core.messages.SystemMessageException - If an error occurs while retrieving the list.

listMembers

public ISeriesMember[] listMembers(Shell shell,
                                   String libraryNameFilter,
                                   String fileNameFilter)
                            throws com.ibm.etools.systems.core.messages.SystemMessageException
List all members in the specified file.

Parameters:
libraryNameFilter -
fileNameFilter -
Returns:
An array of ISeriesMember objects each representing a member that matches the specified filter criteria. An empty array (length == 0) is returned if no objects match the filter.
Throws:
com.ibm.etools.systems.core.messages.SystemMessageException - If an error occurs while retrieving the list.

listMembers

public ISeriesMember[] listMembers(Shell shell,
                                   String libraryNameFilter,
                                   String fileNameFilter,
                                   String memberNameFilter)
                            throws com.ibm.etools.systems.core.messages.SystemMessageException
Retrieve a list of all members matching the specified library name, object name and member name.

Returns:
An array of ISeriesMember objects each representing a member that matches the specified filter criteria. An empty array (length == 0) is returned if no objects match the filter.
Throws:
com.ibm.etools.systems.core.messages.SystemMessageException - If an error occurs while retrieving the list.

listMembers

public ISeriesMember[] listMembers(Shell shell,
                                   String libraryNameFilter,
                                   String fileNameFilter,
                                   String memberNameFilter,
                                   String[] memberTypes)
                            throws com.ibm.etools.systems.core.messages.SystemMessageException
Retrieve a list of all members matching the specified library name, object name and member name.

Returns:
An array of ISeriesMember objects each representing a member that matches the specified filter criteria. An empty array (length == 0) is returned if no objects match the filter.
Throws:
com.ibm.etools.systems.core.messages.SystemMessageException - If an error occurs while retrieving the list.

getConverter

public ISeriesCodepageConverter getConverter(Shell shell)
                                      throws Exception
Return a converter object for this connection, for codepage conversion.

Returns:
the converter object
Throws:
an - exception if the converter can not be obtained
Exception

getConverter

public static ISeriesCodepageConverter getConverter(String profileName,
                                                    String connectionName,
                                                    Shell shell)
                                             throws Exception
Returns the converter object given a profile and connection name.

Returns:
the converter object
Throws:
an - exception if the converter can not be obtained
Exception

getLocalAddress

public InetAddress getLocalAddress()
Returns the local TCP/IP address for the local system that is accessible from the iSeries. If the local system has multiple IP addresses (because of multiple network cards, or VPN) then this will return the address that the remote system can use to "call back" to the PC. There must be a network connection between the local PC and the remote system for this method to work correctly. If no network connection exists then this method returns null.

Returns:
The local TCP/IP address accessible from the remote iSeries or null if no address can be resolved.

runCommand

public ISeriesMessage[] runCommand(Shell shell,
                                   String command)
                            throws com.ibm.etools.systems.core.messages.SystemMessageException
Run a command on the iSeries in the communication server job.

Parameters:
shell - to use to prompt for signon information if required and displaying a progress monitor while command is being run. If null is passed then no progress monitor is displayed (although the user will still be prompted for signon if required.)
command - The command to be run.
Throws:
com.ibm.etools.systems.core.messages.SystemMessageException - if an error occurs while executing the command (i.e. the network connection goes down.)

getEditDescriptions

public com.ibm.etools.iseries.comm.interfaces.IISeriesEditDescriptionsInfo getEditDescriptions()
                                                                                        throws com.ibm.etools.systems.core.messages.SystemMessageException
Retrieve the edit description information from the iSeries.

Specified by:
getEditDescriptions in interface com.ibm.etools.iseries.comm.interfaces.IISeriesConnection
Throws:
com.ibm.etools.systems.core.messages.SystemMessageException

getMessageDescription

public com.ibm.etools.iseries.comm.interfaces.IISeriesMessageDescription getMessageDescription(String msgFileLibrary,
                                                                                               String msgFileName,
                                                                                               String msgID)
                                                                                        throws com.ibm.etools.systems.core.messages.SystemMessageException
Retrieve a message description from the remote system

Specified by:
getMessageDescription in interface com.ibm.etools.iseries.comm.interfaces.IISeriesConnection
Returns:
The message description if found or null a message description with msgID does not exist in the message file.
Throws:
com.ibm.etools.systems.core.messages.SystemMessageException - if the message file does not exists.

getSortSequenceTable

public com.ibm.etools.iseries.comm.interfaces.IISeriesSortSequenceTable getSortSequenceTable(String table,
                                                                                             String library,
                                                                                             String langID,
                                                                                             int ccsid)
                                                                                      throws com.ibm.etools.systems.core.messages.SystemMessageException
Retrieve the edit description information from the iSeries.

Throws:
com.ibm.etools.systems.core.messages.SystemMessageException

isDBCSEnabled

public boolean isDBCSEnabled()
                      throws com.ibm.etools.systems.core.messages.SystemMessageException
Check if the system is DBCS enabled as determined by the QIGC system value.

Specified by:
isDBCSEnabled in interface com.ibm.etools.iseries.comm.interfaces.IISeriesConnection
Returns:
true if the system is enabled, false if it is not.
Throws:
com.ibm.etools.systems.core.messages.SystemMessageException

getVersionReleaseModification

public String getVersionReleaseModification()
Get the version, release and modification level of the remote system.

Specified by:
getVersionReleaseModification in interface com.ibm.etools.iseries.comm.interfaces.IISeriesConnection
Returns:
The version, release and modification level of the remote system in V.R.M format. null is returend if the remote system is not connected or the VRM cannot be retrieved.

getCacheManager

public CacheManager getCacheManager()
Get the caching manager used for this connection.

Returns:
The CacheManager used for this connection.

checkAuthority

public boolean checkAuthority(String library,
                              String object,
                              String objType,
                              String[] authList)
                       throws com.ibm.etools.systems.core.messages.SystemMessageException
Check if the current user profile has the required authorities to the specified object.

Specified by:
checkAuthority in interface com.ibm.etools.iseries.comm.interfaces.IISeriesConnection
Parameters:
library - The library which contains the object to check
object - The object to check
objType - The object type
authList - Array of authorities to check, use the constants from IISeriesAuthorityConstants
Returns:
true if the current user profile has the specified authorities, false if the current user profile does not have the specified authorities to the object.
Throws:
com.ibm.etools.systems.core.messages.SystemMessageException
See Also:
IISeriesAuthorityConstants

checkAuthority

public boolean checkAuthority(String library,
                              String object,
                              String objType,
                              String authList)
                       throws com.ibm.etools.systems.core.messages.SystemMessageException
Check if the current user profile has the required authorities to the specified object.

Specified by:
checkAuthority in interface com.ibm.etools.iseries.comm.interfaces.IISeriesConnection
Parameters:
library - The library which contains the object to check
object - The object to check
objType - The object type
authList - Authorities to check. Each authority must be 10 characters, appended together into a single String. Use the constants from IISeriesAuthorityConstants, or the other checkAuthority method which takes a String array
Returns:
true if the current user profile has the specified authorities, false if the current user profile does not have the specified authorities to the object.
Throws:
com.ibm.etools.systems.core.messages.SystemMessageException
See Also:
IISeriesAuthorityConstants

iSeries Remote Systems
v6.0.0

Copyright © 2005 IBM Corp. All Rights Reserved.

Note: This documentation is for part of an interim API that is still under development and expected to change significantly before reaching stability. It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken (repeatedly) as the API evolves.