iSeries Remote Systems
v6.0.1

com.ibm.etools.iseries.core
Class ISeriesSystemToolbox

java.lang.Object
  extended bycom.ibm.etools.systems.subsystems.impl.AbstractSystem
      extended bycom.ibm.etools.iseries.core.ISeriesSystemToolbox
All Implemented Interfaces:
IISeriesSystem, com.ibm.etools.systems.subsystems.ISystem, com.ibm.etools.systems.core.ISystemUserIdConstants
Direct Known Subclasses:
ISeriesSystemDataStore

public class ISeriesSystemToolbox
extends com.ibm.etools.systems.subsystems.impl.AbstractSystem
implements IISeriesSystem

This wrappers an AS/400 Toolbox for Java AS400 object used for a live connection to an iSeries. Use this when connecting via the toolbox.


Field Summary
static String Copyright
           
protected  String lastVRM
           
 
Fields inherited from class com.ibm.etools.systems.subsystems.impl.AbstractSystem
connectResult, copyright, launchResult, shell
 
Fields inherited from interface com.ibm.etools.systems.subsystems.ISystem
copyright
 
Fields inherited from interface com.ibm.etools.systems.core.ISystemUserIdConstants
USERID_LOCATION_CONNECTION, USERID_LOCATION_DEFAULT_OVERALL, USERID_LOCATION_DEFAULT_SYSTEMTYPE, USERID_LOCATION_NOTSET, USERID_LOCATION_SUBSYSTEM
 
Constructor Summary
ISeriesSystemToolbox()
          Constructor when we don't have a subsystem yet.
ISeriesSystemToolbox(com.ibm.etools.systems.subsystems.SubSystem subsystem)
          Default Constructor.
 
Method Summary
 void connect(IProgressMonitor monitor)
          Actually connect to remote system
 void disconnect()
          Actually disconnect from remote system
 void disconnectJDBC()
          Close all open jdbc connections.
protected  boolean forcePasswordToUpperCase()
           
 com.ibm.as400.access.AS400 getAS400Object()
          Return our AS400 toolbox object.
 int getCcsid()
           
 com.ibm.etools.systems.dstore.core.model.DataStore getDataStoreObject()
          Return the DataStore object used in communications layer.
 Connection getJDBCConnection(String properties, boolean forceConnect)
          Get a JDBC Connection object to DB2/400, pre-connected, for this connection.
 int getPort()
          Override getPort to return 0 if using toolbox, as we want to only use default.
 String getVersionReleaseModification()
          Return the version, release, modification of the remote system, if connected, if applicable and if available.
 int getVRM()
          Get Version, Release, Modification level of remote system, as an integer value usable in algorithms.
 boolean isConnected()
          Return true if currently connected.
 void reset()
          The following is called whenever a system is redefined or disconnected.
 void setCcsid(int newCcsid)
           
 void setPassword(String matchingUserId, String pwd)
          Set the password in our AS400 Toolbox object.
 void showWarningMsgs(Shell shell, Vector warnings)
          Show any warning messages returned by host api calls.
 boolean usingDataStore()
          Return true if using datastore technology versus direct as/400 toolbox.
 
Methods inherited from class com.ibm.etools.systems.subsystems.impl.AbstractSystem
addCommunicationsListener, clearCommunicationListeners, clearPasswordCache, clearPasswordCache, clearPasswordForOtherSystemsInConnection, clearUserIdCache, enableServerLaunchType, fireCommunicationsEvent, getCommunicationListenerCount, getConnectPort, getHomeDirectory, getHostName, getLocalUserId, getPasswordInformation, getPasswordPromptDialog, getPasswordValidator, getPrimarySubSystem, getRemoteServerLauncher, getSignonValidator, getSubSystem, getSystemType, getTempDirectory, getUserId, getUserIdValidator, inheritConnectionUserPassword, isEnabledServerLaunchType, isPasswordCached, isPasswordCached, isSuppressSignonPrompt, notifyConnection, notifyDisconnection, notifyError, promptForPassword, removeCommunicationsListener, setPassword, setPasswordInformation, setSubSystem, setSuppressSignonPrompt, shareUserPasswordWithConnection, updatePasswordForOtherSystemsInConnection
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.ibm.etools.systems.subsystems.ISystem
addCommunicationsListener, clearPasswordCache, clearPasswordCache, clearUserIdCache, getHomeDirectory, getHostName, getSubSystem, getSystemType, getTempDirectory, getUserId, inheritConnectionUserPassword, isPasswordCached, isPasswordCached, isSuppressSignonPrompt, notifyConnection, notifyDisconnection, notifyError, promptForPassword, removeCommunicationsListener, setPassword, setSubSystem, setSuppressSignonPrompt, shareUserPasswordWithConnection
 

Field Detail

Copyright

public static final String Copyright
See Also:
Constant Field Values

lastVRM

protected String lastVRM
Constructor Detail

ISeriesSystemToolbox

public ISeriesSystemToolbox()
Constructor when we don't have a subsystem yet. Call setSubSystem after.


ISeriesSystemToolbox

public ISeriesSystemToolbox(com.ibm.etools.systems.subsystems.SubSystem subsystem)
Default Constructor. Note we instantiate this the first time a user tries to connect this session. After that, it stays instantiated but moves between connected/disconnected states.

Method Detail

usingDataStore

public boolean usingDataStore()
Return true if using datastore technology versus direct as/400 toolbox.


getPort

public int getPort()
Override getPort to return 0 if using toolbox, as we want to only use default.

Specified by:
getPort in interface com.ibm.etools.systems.subsystems.ISystem

getAS400Object

public com.ibm.as400.access.AS400 getAS400Object()
Return our AS400 toolbox object. This is the class from the AS/400 Toolbox for Java that is used for the actual connection and communication. This class here simply wrappers that object for use in the IDE. If not created yet, create it now.

Specified by:
getAS400Object in interface IISeriesSystem

getDataStoreObject

public com.ibm.etools.systems.dstore.core.model.DataStore getDataStoreObject()
Return the DataStore object used in communications layer.

Specified by:
getDataStoreObject in interface IISeriesSystem

getCcsid

public int getCcsid()

getVRM

public int getVRM()
           throws Exception
Get Version, Release, Modification level of remote system, as an integer value usable in algorithms.

Throws:
Exception

getVersionReleaseModification

public String getVersionReleaseModification()
Return the version, release, modification of the remote system, if connected, if applicable and if available. Else return null.

Up to each implementer to decide if this will be cached.

Specified by:
getVersionReleaseModification in interface com.ibm.etools.systems.subsystems.ISystem

setCcsid

public void setCcsid(int newCcsid)
              throws Exception
Throws:
Exception

setPassword

public void setPassword(String matchingUserId,
                        String pwd)
Set the password in our AS400 Toolbox object.

Specified by:
setPassword in interface com.ibm.etools.systems.subsystems.ISystem

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

disconnectJDBC

public void disconnectJDBC()
Close all open jdbc connections. Called implicit on disconnect()


connect

public void connect(IProgressMonitor monitor)
             throws Exception
Actually connect to remote system

Specified by:
connect in interface com.ibm.etools.systems.subsystems.ISystem
Throws:
Exception

disconnect

public void disconnect()
                throws Exception
Actually disconnect from remote system

Specified by:
disconnect in interface com.ibm.etools.systems.subsystems.ISystem
Throws:
Exception

isConnected

public boolean isConnected()
Return true if currently connected.

Specified by:
isConnected in interface com.ibm.etools.systems.subsystems.ISystem

reset

public void reset()
The following is called whenever a system is redefined or disconnected. Each subsystem needs to be informed so it can clear out any expansions, etc.

Specified by:
reset in interface com.ibm.etools.systems.subsystems.ISystem

showWarningMsgs

public void showWarningMsgs(Shell shell,
                            Vector warnings)
Show any warning messages returned by host api calls.

Specified by:
showWarningMsgs in interface IISeriesSystem
Parameters:
shell - Parent UI
warnings - Vector of String or toString()'able messages.

forcePasswordToUpperCase

protected boolean forcePasswordToUpperCase()
See Also:
AbstractSystem.forcePasswordToUpperCase()

iSeries Remote Systems
v6.0.1

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.