|
Rational Developer for Power Systems Software V7.6 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.ibm.etools.iseries.subsystems.qsys.api.IBMiConnection
public class IBMiConnection
This class provides an API starting point for access to an remote IBM i system. Each IBMiConnection instance is associated with a single RSE IBM i connection.
Field Summary | |
---|---|
static String |
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()
Synchronous connection to this connection |
void |
connect(IRSECallback callback)
Asynchronous connect to this RSE connection. |
void |
downloadSavf(IFile targetFile,
IQSYSSaveFile saveFileObject,
IProgressMonitor monitor)
Download a save file from IBM i to a workspace file. |
AS400 |
getAS400ToolboxObject()
Retrieve an AS400 (Toolbox) object for the current connection. |
AS400 |
getAS400ToolboxObject(boolean createNew)
Retrieve an AS400 (Toolbox) object for the current connection. |
IQSYSCacheManager |
getCacheManager()
Get the caching manager used for this connection. |
QSYSCommandSubSystem |
getCommandSubSystem()
Get the command subsystem for this connection. |
static IBMiConnection |
getConnection(IHost host)
Converts the IHost connection into a wrapper IBMiConnection |
static IBMiConnection |
getConnection(String profileName,
String connectionName)
Retrieves the specified connection from the RSE, given the profile and connection name |
String |
getConnectionName()
Retrieve the connection name for this connection. |
static IBMiConnection[] |
getConnections()
Retrieves all connections in the RSE of type "IBM i" |
IConnectorService |
getConnectorService()
Returns the connector service used by this connection |
IQSYSLibrary |
getCurrentLibrary(IProgressMonitor monitor)
Return the current library for the connection |
IISeriesEditDescriptionsInfo |
getEditDescriptions()
Retrieve the edit description information from the iSeries. |
IQSYSFile |
getFile(String libraryName,
String objectName,
IProgressMonitor monitor)
Return an ISeriesObject from this connection, given its name and type or null if the object is not found. |
IQSYSFileRecordFormat |
getFileRecord(String libraryName,
String fileName,
String recordName,
IProgressMonitor monitor)
Return an IQSYSFileRecord from this connection, given its library, file and name |
IHost |
getHost()
Returns the underlying SystemConnection that this ISeriesConnection object wraps |
String |
getHostName()
Retrieve the host name for this connection. |
QSYSRSEInteractiveJob |
getInteractiveServerJob()
Retrieve the ISeriesRSEInteractiveJob class which represents the interactive job (5250) that is associated with this RSE connection. |
Connection |
getJDBCConnection(String properties,
boolean forceConnect)
|
IQSYSLibrary |
getLibrary(String libraryName,
IProgressMonitor monitor)
Return an IQSYSLibrary from this connection, given its name |
IQSYSLibrary[] |
getLibraryList(IProgressMonitor monitor)
Return the library list for this connection |
IQSYSLibrary[] |
getLibraryList(IProgressMonitor monitor,
boolean excludeCurLib)
Return the library list for this connection |
IQSYSLibrary[] |
getLibraryList(String libFilterString,
IProgressMonitor monitor,
boolean excludeCurLib)
Return the libraries for this connection, given the library filter string. |
InetAddress |
getLocalAddress()
Returns the local TCP/IP address for the local system that is accessible from the iSeries. |
IQSYSMember |
getMember(String libraryName,
String fileName,
String memberName,
IProgressMonitor monitor)
Returns the member with the specified library, file, and member name. |
IQSYSMessageDescription |
getMessageDescription(String msgFileLibrary,
String msgFileName,
String msgID)
Retrieve a message description from the remote system |
IQSYSObject |
getObject(String libraryName,
String objectName,
String type,
IProgressMonitor monitor)
Return an ISeriesObject from this connection, given its name and type or null if the object is not found. |
String |
getPasswordEncrypted()
Returns the password (encrypted) for this connection |
String |
getProfileName()
Retrieve the profile name for this connection. |
IQSYSJob |
getQSYSJob(ISeriesJobFilterString jobNameFilter,
IProgressMonitor monitor)
Returns an ISeriesJob from this connection, given a job filter. |
IQSYSJob |
getQSYSJob(String jobNumber,
String userName,
String jobName,
IProgressMonitor monitor)
Returns an IQSYSJob from this connection, given job number, job user, and job name. |
QSYSJobSubSystem |
getQSYSJobSubSystem()
Get the Objects subsystem for this connection. |
QSYSObjectSubSystem |
getQSYSObjectSubSystem()
Get the Objects subsystem for this connection. |
IQSYSJob |
getServerJob(IProgressMonitor monitor)
Returns the server job for this RSE connection. |
ISubSystem |
getSubSystemByClass(String factoryID)
Retrieve a subsystem for this connection given the subsystems factory id |
ISubSystem[] |
getSubSystems()
Get all subsystems for this connection |
String |
getUserID()
Returns the userid for this connection |
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. |
IQSYSFileField[] |
listFields(String library,
String file,
IProgressMonitor monitor)
List all fields in all records that match the specified library, file name patterns |
IQSYSFileField[] |
listFields(String library,
String file,
String record,
IProgressMonitor monitor)
List all fields that match the specified library, file, and record name patterns |
IQSYSFileField[] |
listFields(String library,
String file,
String record,
String field,
IProgressMonitor monitor)
List all fields that match the specified library, file, record and field name patterns |
IQSYSJob[] |
listJobs(ISeriesJobFilterString filter,
IProgressMonitor monitor)
Retrieve a list of IBM i jobs that match the specified filter criteria. |
IQSYSLibrary[] |
listLibraries(String libraryFilter,
IProgressMonitor monitor)
Retrieve a list of libraries matching the specified filter string |
String[] |
listLibraryNames(String nameFilter,
IProgressMonitor monitor)
This is a high performance way to query library names only, optionally subset by library name. |
String[] |
listMemberNames(String library,
String file,
String nameFilter,
String[] typeFilters,
IProgressMonitor monitor)
This is a high performance way to query the members names only in this file, optionally subset by member name and type. |
IQSYSMember[] |
listMembers(String libraryName,
String fileName,
IProgressMonitor monitor)
Return a list of members that match the specified library, file, and member name filters. |
IQSYSMember[] |
listMembers(String libraryName,
String fileName,
String memberName,
IProgressMonitor monitor)
Return a list of members that match the specified library, file, and member name filters. |
IQSYSMember[] |
listMembers(String libraryName,
String fileName,
String memberName,
String[] types,
IProgressMonitor monitor)
Return a list of members that match the specified library, file, member name and type filters. |
String[] |
listObjectNames(String library,
String nameFilter,
String[] typeFilters,
IProgressMonitor monitor)
This is a high performance way to query the object names only in a given library, optionally subset by object name and type. |
IQSYSObject[] |
listObjects(String libraryNameFilter,
IProgressMonitor monitor)
List all objects in the specified library. |
IQSYSObject[] |
listObjects(String libraryNameFilter,
String objectNameFilter,
IProgressMonitor monitor)
Retrieve a list of all objects matching the specified library and object name filter strings. |
IQSYSObject[] |
listObjects(String libraryNameFilter,
String objectNameFilter,
String[] objectTypes,
IProgressMonitor monitor)
Retrieve a list of all objects matching the specified library name, object name and type filter strings. |
IQSYSFileRecordFormat[] |
listRecords(String library,
String file,
IProgressMonitor monitor)
Return a list of all records in the specified file. |
IQSYSFileRecordFormat[] |
listRecords(String library,
String file,
String record,
IProgressMonitor monitor)
Return a list of records that match the specified library, file, and record name filter. |
ISeriesMessage[] |
runCommand(String command)
Run a command on the iSeries in the communication server job. |
void |
uploadSavf(String fullyQualifiedLocalFileName,
String saveFileLibrary,
String saveFileName)
Upload a local save file to an IBM i save file. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static String copyright
Method Detail |
---|
public static IBMiConnection[] getConnections()
public static IBMiConnection getConnection(IHost host)
host
- An IHost instance
public static IBMiConnection getConnection(String profileName, String connectionName)
profile
- A string containing the name of the profile containing the connectionconnectionName
- A string containing the connection name
public IHost getHost()
public String getPasswordEncrypted()
public boolean connect() throws SystemMessageException
SystemMessageException
public void connect(IRSECallback callback) throws SystemMessageException
SystemMessageException
public boolean isConnected()
public boolean isOffline()
public QSYSObjectSubSystem getQSYSObjectSubSystem()
public QSYSJobSubSystem getQSYSJobSubSystem()
public QSYSCommandSubSystem getCommandSubSystem()
public ISeriesMessage[] runCommand(String command) throws SystemMessageException
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.
SystemMessageException
- if an error occurs while executing the command (i.e.
the network connection goes down.)public ISubSystem getSubSystemByClass(String factoryID)
factoryID
- The factory ID for the required subsystem object
public ISubSystem[] getSubSystems()
public IQSYSLibrary[] listLibraries(String libraryFilter, IProgressMonitor monitor) throws SystemMessageException, InterruptedException
SystemMessageException
- If an error occurs while retrieving the list.
InterruptedException
public IQSYSLibrary getLibrary(String libraryName, IProgressMonitor monitor) throws SystemMessageException, InterruptedException
SystemMessageException
- if an error occurs while retrieving the
library information.
InterruptedException
public IQSYSLibrary[] getLibraryList(IProgressMonitor monitor) throws SystemMessageException, InterruptedException
SystemMessageException
InterruptedException
public IQSYSLibrary[] getLibraryList(IProgressMonitor monitor, boolean excludeCurLib) throws SystemMessageException, InterruptedException
SystemMessageException
InterruptedException
public IQSYSLibrary[] getLibraryList(String libFilterString, IProgressMonitor monitor, boolean excludeCurLib) throws SystemMessageException, InterruptedException
SystemMessageException
InterruptedException
public IQSYSLibrary getCurrentLibrary(IProgressMonitor monitor) throws SystemMessageException, InterruptedException
SystemMessageException
InterruptedException
public IQSYSObject[] listObjects(String libraryNameFilter, IProgressMonitor monitor) throws SystemMessageException, InterruptedException
SystemMessageException
- If an error occurs while retrieving the list.
InterruptedException
public IQSYSObject[] listObjects(String libraryNameFilter, String objectNameFilter, IProgressMonitor monitor) throws SystemMessageException, InterruptedException
SystemMessageException
- If an error occurs while retrieving the list.
InterruptedException
public IQSYSObject[] listObjects(String libraryNameFilter, String objectNameFilter, String[] objectTypes, IProgressMonitor monitor) throws SystemMessageException, InterruptedException
SystemMessageException
- If an error occurs while retrieving the list.
InterruptedException
public IQSYSObject getObject(String libraryName, String objectName, String type, IProgressMonitor monitor) throws SystemMessageException, InterruptedException
SystemMessageException
InterruptedException
public IQSYSFile getFile(String libraryName, String objectName, IProgressMonitor monitor) throws SystemMessageException, InterruptedException
SystemMessageException
InterruptedException
public IQSYSMember[] listMembers(String libraryName, String fileName, IProgressMonitor monitor) throws SystemMessageException, InterruptedException
SystemMessageException
InterruptedException
public IQSYSMember[] listMembers(String libraryName, String fileName, String memberName, IProgressMonitor monitor) throws SystemMessageException, InterruptedException
SystemMessageException
InterruptedException
public IQSYSMember[] listMembers(String libraryName, String fileName, String memberName, String[] types, IProgressMonitor monitor) throws SystemMessageException, InterruptedException
SystemMessageException
InterruptedException
public IQSYSFileRecordFormat[] listRecords(String library, String file, IProgressMonitor monitor) throws SystemMessageException, InterruptedException
SystemMessageException
InterruptedException
public IQSYSFileRecordFormat[] listRecords(String library, String file, String record, IProgressMonitor monitor) throws SystemMessageException, InterruptedException
SystemMessageException
InterruptedException
public IQSYSFileRecordFormat getFileRecord(String libraryName, String fileName, String recordName, IProgressMonitor monitor) throws SystemMessageException, InterruptedException
SystemMessageException
InterruptedException
public IQSYSFileField[] listFields(String library, String file, IProgressMonitor monitor) throws SystemMessageException, InterruptedException
SystemMessageException
InterruptedException
public IQSYSFileField[] listFields(String library, String file, String record, IProgressMonitor monitor) throws SystemMessageException, InterruptedException
SystemMessageException
InterruptedException
public IQSYSFileField[] listFields(String library, String file, String record, String field, IProgressMonitor monitor) throws SystemMessageException, InterruptedException
SystemMessageException
InterruptedException
public String[] listObjectNames(String library, String nameFilter, String[] typeFilters, IProgressMonitor monitor) throws SystemMessageException, InterruptedException
SystemMessageException
InterruptedException
public String[] listLibraryNames(String nameFilter, IProgressMonitor monitor) throws SystemMessageException, InterruptedException
SystemMessageException
InterruptedException
public String[] listMemberNames(String library, String file, String nameFilter, String[] typeFilters, IProgressMonitor monitor) throws SystemMessageException, InterruptedException
SystemMessageException
InterruptedException
public IQSYSMember getMember(String libraryName, String fileName, String memberName, IProgressMonitor monitor) throws SystemMessageException, InterruptedException
SystemMessageException
InterruptedException
public String getProfileName()
public String getConnectionName()
public String getHostName()
public String getUserID()
public AS400 getAS400ToolboxObject() throws SystemMessageException
Exception
- if user cancels signon or any other error occurs.
SystemMessageException
public AS400 getAS400ToolboxObject(boolean createNew) throws SystemMessageException
boolean
- createNew Pass true if a new copy of the AS400 object should be
created, false if the original should be returned. If a new AS400 Object
is created then the library list, current library, and signon program will
be setup (as specified in the RSE communications properties for this
connection.
Exception
- if user cancels signon or any other error occurs.
SystemMessageException
public IQSYSMessageDescription getMessageDescription(String msgFileLibrary, String msgFileName, String msgID) throws SystemMessageException, InterruptedException
String
- msgFileLibrary The library where the message file existsString
- msgFileName The name of the message fileString
- msgID The ID of the message description to retrieve
SystemMessageException
- if the message file does not exists.
InterruptedException
public IQSYSCacheManager getCacheManager()
public IConnectorService getConnectorService()
public IQSYSJob[] listJobs(ISeriesJobFilterString filter, IProgressMonitor monitor) throws SystemMessageException, InterruptedException
SystemMessageException
InterruptedException
public IQSYSJob getQSYSJob(String jobNumber, String userName, String jobName, IProgressMonitor monitor) throws SystemMessageException, InterruptedException
jobNumber
- the job numberuserName
- the user name of the jobjobName
- the job name
SystemMessageException
InterruptedException
public IQSYSJob getQSYSJob(ISeriesJobFilterString jobNameFilter, IProgressMonitor monitor) throws SystemMessageException, InterruptedException
jobNameFilter
- the filter to resolve job name
SystemMessageException
InterruptedException
public IQSYSJob getServerJob(IProgressMonitor monitor) throws SystemMessageException
SystemMessageException
public boolean isDBCSEnabled() throws SystemMessageException
SystemMessageException
public IISeriesEditDescriptionsInfo getEditDescriptions() throws SystemMessageException
SystemMessageException
public boolean checkAuthority(String library, String object, String objType, String[] authList) throws SystemMessageException
library
- The library which contains the object to checkobject
- The object to checkobjType
- The object typeauthList
- Array of authorities to check, use the constants from IISeriesAuthorityConstants
SystemMessageException
IISeriesAuthorityConstants
public boolean checkAuthority(String library, String object, String objType, String authList) throws SystemMessageException
library
- The library which contains the object to checkobject
- The object to checkobjType
- The object typeauthList
- 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
SystemMessageException
IISeriesAuthorityConstants
public InetAddress getLocalAddress()
public QSYSRSEInteractiveJob getInteractiveServerJob() throws SystemMessageException
SystemMessageException
- If a communications error occurs or the user cancels the prompt to associate
an interactive job with this RSE connection.public void uploadSavf(String fullyQualifiedLocalFileName, String saveFileLibrary, String saveFileName) throws SystemMessageException
fullyQualifiedLocalFileName:
- full qualified file name for local save filesaveFileLibrary:
- target library namesaveFileName:
- target save file name
SystemMessageException
- if there is any SystemMessage captured during uploadpublic void downloadSavf(IFile targetFile, IQSYSSaveFile saveFileObject, IProgressMonitor monitor) throws SystemMessageException
targetFile:
- the target for downloaded save file.
If the targetFile exists, its contents are silently replaced. No collision checking.
If the targetFile does not exist, it is created.
If the targetFile's parent does not exist, an exception is thrown.saveFileObject:
- save file on IBM i to be downloadedmonitor:
- progress monitor
SystemMessageException
public Connection getJDBCConnection(String properties, boolean forceConnect) throws SQLException
SQLException
|
Rational Developer for Power Systems Software V7.6 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |