Rational Developer for Power Systems Software
V7.6

com.ibm.etools.iseries.services.qsys.objects
Class QSYSObjectService

java.lang.Object
  extended by AbstractService
      extended by com.ibm.etools.iseries.services.qsys.QSYSAbstractService
          extended by com.ibm.etools.iseries.services.qsys.objects.QSYSObjectService
All Implemented Interfaces:
IQSYSObjectService

public class QSYSObjectService
extends QSYSAbstractService
implements IQSYSObjectService

RSE service for access to the IBM i native file system (QSYS).


Field Summary
static String copyright
           
 
Fields inherited from class com.ibm.etools.iseries.services.qsys.QSYSAbstractService
sessionProvider
 
Constructor Summary
QSYSObjectService(IToolboxSessionProvider toolboxProvider)
          Constructor
 
Method Summary
 boolean checkAuthority(String library, String object, String objectType, String authorityList)
          Check object authorities
 IQSYSDatabaseFile getDatabaseFileDetails(IQSYSDatabaseFile file, IProgressMonitor monitor)
          Retrieve details for the specified physical file object
 IQSYSDatabaseFileRecordFormat getDatabaseFileRecord(IQSYSDatabaseFile file, String record, IProgressMonitor monitor)
          List the database records for the specified file
 IQSYSDatabaseFileRecordFormat getDatabaseFileRecord(IQSYSDatabaseFile file, String record, IQSYSFileRecordFormatFactory factory, IProgressMonitor monitor)
          List the database records for the specified file
 IQSYSDatabaseFileRecordFormat getDatabaseFileRecord(IQSYSDatabaseFile file, String record, String fieldFilter, IQSYSFileRecordFormatFactory factory, IProgressMonitor monitor)
          List the database records for the specified file
 IQSYSFactory getDefaultFactory()
          Get the Default QSYS object factory
 IQSYSFileFieldFactory getDefaultFieldFactory()
          Get the Default QSYS field factory
 IQSYSFileRecordFormatFactory getDefaultRecordFactory()
          Get the Default QSYS record factory
 IISeriesHostRecordDevice[] getDeviceRecords(IQSYSFile file)
          Retrieve the records for the deviceFile.
 int getEditingCCSID(IQSYSMember member)
          Query the CCSID used to translate files from EBCDIC to UTF-8 for editing in the Workbench.
 ISeriesFileOverrideInformation getFileOverride(String filename)
          Check if the specified file is an override file.
 IQSYSMember getMemberDetails(IQSYSMember member, IProgressMonitor monitor)
          Retrieve details for specified member object
 com.ibm.etools.iseries.services.qsys.internal.QSYSProgramInformation getProgramInformation(IQSYSObject program, boolean exportedProcsOnly)
           
 IQSYSDatabaseField[] listDatabaseFields(IQSYSFileRecordFormat record, String fieldFilter, IQSYSFileRecordFormatFactory factory, IProgressMonitor monitor)
          List the database fields for the specified record
 IQSYSFileField[] listFields(ISeriesFieldFilterString filter, IProgressMonitor monitor)
          List fields matching the specified field filter
 IQSYSFileField[] listFields(ISeriesFieldFilterString filter, IQSYSFileFieldFactory factory, IProgressMonitor monitor)
          List fields matching the specified field filter
 IISeriesHostKeyField[] listKeyFields(IQSYSDatabaseFile file, String recordName)
          Retrieve the key fields for the iSeries Database file.
 IQSYSLibrary[] listLibraries(ISeriesLibraryFilterString filter, IProgressMonitor monitor)
          List libraries matching specified filter criteria
 IQSYSLibrary[] listLibraries(ISeriesLibraryFilterString filter, IQSYSFactory factory, boolean additionalDetails, IProgressMonitor monitor)
          List libraries matching specified filter criteria
 String[] listLibraryNames(String nameFilter, IProgressMonitor monitor)
          This is a high performance way to query library names only, optionally subset by library name.
 List<ISeriesHostObjectLock> listMemberLocks(IQSYSMember member)
          Retrieve the list of locks for the specified IBM i member
 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(ISeriesMemberFilterString filter, IProgressMonitor monitor)
          List members matching specified filter criteria
 IQSYSMember[] listMembers(ISeriesMemberFilterString filter, IQSYSFactory factory, boolean additionalDetails, IProgressMonitor monitor)
          List members matching specified filter criteria
 IQSYSMessageDescription[] listMessageDescriptions(IQSYSMessageFile file, IProgressMonitor monitor)
          List all message descriptions for the specified message file.
 IQSYSMessageDescription[] listMessageDescriptions(IQSYSMessageFile file, String msgID, IQSYSFactory factory, IProgressMonitor monitor)
          List message descriptions for the specified message file.
 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(ISeriesObjectFilterString filter, IProgressMonitor monitor)
          List objects matching specified filter criteria
 IQSYSObject[] listObjects(ISeriesObjectFilterString filter, IQSYSFactory factory, boolean additionalDetails, IProgressMonitor monitor)
          List objects matching specified filter criteria
 List<ISeriesHostProcedure> listProceduresInModule(String libraryName, String moduleName)
           
 IQSYSFileRecordFormat[] listRecords(ISeriesRecordFilterString filter, IProgressMonitor monitor)
          List records matching the specified record filter
 IQSYSFileRecordFormat[] listRecords(ISeriesRecordFilterString filter, IQSYSFileRecordFormatFactory factory, IProgressMonitor monitor)
          List records matching the specified record filter
 ISeriesHostSpoolFileNameOnly[] listSpoolFiles(ISeriesSplfFilterString filter, IISeriesHostListSpoolFileFactory factory, IProgressMonitor monitor)
          List spool files matching the specified filter
 IISeriesSQLStatementHeader syntaxCheckSQL(String sqlStmt, int stmtLen, int numRec, String language, int numKeys, String options)
          Syntax Check SQL statements
 
Methods inherited from class com.ibm.etools.iseries.services.qsys.QSYSAbstractService
handleError
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

copyright

public static String copyright
Constructor Detail

QSYSObjectService

public QSYSObjectService(IToolboxSessionProvider toolboxProvider)
Constructor

Parameters:
toolboxProvider -
Method Detail

listLibraries

public IQSYSLibrary[] listLibraries(ISeriesLibraryFilterString filter,
                                    IProgressMonitor monitor)
                             throws SystemMessageException,
                                    InterruptedException
List libraries matching specified filter criteria

Parameters:
filter - The library filter used for resolving libraries. A value of null lists all libraries.
Throws:
SystemMessageException
InterruptedException

listLibraries

public IQSYSLibrary[] listLibraries(ISeriesLibraryFilterString filter,
                                    IQSYSFactory factory,
                                    boolean additionalDetails,
                                    IProgressMonitor monitor)
                             throws SystemMessageException,
                                    InterruptedException
List libraries matching specified filter criteria

Parameters:
filter - The library filter used for resolving libraries. A value of null lists all libraries.
Throws:
SystemMessageException
InterruptedException

listObjects

public IQSYSObject[] listObjects(ISeriesObjectFilterString filter,
                                 IProgressMonitor monitor)
                          throws SystemMessageException,
                                 InterruptedException
List objects matching specified filter criteria

Parameters:
filter - The object filter used for resolving objects.
Throws:
SystemMessageException
InterruptedException

listObjects

public IQSYSObject[] listObjects(ISeriesObjectFilterString filter,
                                 IQSYSFactory factory,
                                 boolean additionalDetails,
                                 IProgressMonitor monitor)
                          throws SystemMessageException,
                                 InterruptedException
List objects matching specified filter criteria

Parameters:
filter - The object filter used for resolving objects. A value of null lists returns null;
Throws:
SystemMessageException
InterruptedException

listObjectNames

public String[] listObjectNames(String library,
                                String nameFilter,
                                String[] typeFilters,
                                IProgressMonitor monitor)
                         throws SystemMessageException,
                                InterruptedException
This is a high performance way to query the object names only in a given library, optionally subset by object name and type. This does not query all the properties usually returned for each object so is very efficient. It can be used to populate a ValidatorISeriesObject object, for example, to validate object names are unique. Please note that two objects can have the same name in a given library, as long as their types are different, so include a type filter is very important for this type of error checking.

Throws:
SystemMessageException
InterruptedException

listLibraryNames

public String[] listLibraryNames(String nameFilter,
                                 IProgressMonitor monitor)
                          throws SystemMessageException,
                                 InterruptedException
This is a high performance way to query library names only, optionally subset by library name. This does not query all the properties usually returned for each object so is very efficient. It can be used to populate a ValidatorISeriesLibrary object, for example, to validate library names are unique.

Throws:
SystemMessageException
InterruptedException

listMemberNames

public String[] listMemberNames(String library,
                                String file,
                                String nameFilter,
                                String[] typeFilters,
                                IProgressMonitor monitor)
                         throws SystemMessageException,
                                InterruptedException
This is a high performance way to query the members names only in this file, optionally subset by member name and type. This does not query all the properties usually returned for each member so is very efficient. It can be used to populate a ValidatorISeriesMember object, for example, to validate member names are unique.

Throws:
SystemMessageException
InterruptedException

listMembers

public IQSYSMember[] listMembers(ISeriesMemberFilterString filter,
                                 IProgressMonitor monitor)
                          throws SystemMessageException,
                                 InterruptedException
List members matching specified filter criteria

Parameters:
filter - The member filter used for resolving the members. A value of null returns null;
Throws:
SystemMessageException
InterruptedException

listMembers

public IQSYSMember[] listMembers(ISeriesMemberFilterString filter,
                                 IQSYSFactory factory,
                                 boolean additionalDetails,
                                 IProgressMonitor monitor)
                          throws SystemMessageException,
                                 InterruptedException
List members matching specified filter criteria

Parameters:
filter - The member filter used for resolving the members. A value of null returns null;
Throws:
SystemMessageException
InterruptedException

listRecords

public IQSYSFileRecordFormat[] listRecords(ISeriesRecordFilterString filter,
                                           IProgressMonitor monitor)
                                    throws SystemMessageException,
                                           InterruptedException
List records matching the specified record filter

Throws:
SystemMessageException
InterruptedException

listRecords

public IQSYSFileRecordFormat[] listRecords(ISeriesRecordFilterString filter,
                                           IQSYSFileRecordFormatFactory factory,
                                           IProgressMonitor monitor)
                                    throws SystemMessageException,
                                           InterruptedException
List records matching the specified record filter

Throws:
SystemMessageException
InterruptedException

getDatabaseFileRecord

public IQSYSDatabaseFileRecordFormat getDatabaseFileRecord(IQSYSDatabaseFile file,
                                                           String record,
                                                           IProgressMonitor monitor)
                                                    throws SystemMessageException,
                                                           InterruptedException
List the database records for the specified file

Throws:
SystemMessageException
InterruptedException

getDatabaseFileRecord

public IQSYSDatabaseFileRecordFormat getDatabaseFileRecord(IQSYSDatabaseFile file,
                                                           String record,
                                                           IQSYSFileRecordFormatFactory factory,
                                                           IProgressMonitor monitor)
                                                    throws SystemMessageException,
                                                           InterruptedException
List the database records for the specified file

Throws:
SystemMessageException
InterruptedException

getDatabaseFileRecord

public IQSYSDatabaseFileRecordFormat getDatabaseFileRecord(IQSYSDatabaseFile file,
                                                           String record,
                                                           String fieldFilter,
                                                           IQSYSFileRecordFormatFactory factory,
                                                           IProgressMonitor monitor)
                                                    throws SystemMessageException,
                                                           InterruptedException
List the database records for the specified file

Throws:
SystemMessageException
InterruptedException

listDatabaseFields

public IQSYSDatabaseField[] listDatabaseFields(IQSYSFileRecordFormat record,
                                               String fieldFilter,
                                               IQSYSFileRecordFormatFactory factory,
                                               IProgressMonitor monitor)
                                        throws SystemMessageException,
                                               InterruptedException
List the database fields for the specified record

Throws:
SystemMessageException
InterruptedException

listSpoolFiles

public ISeriesHostSpoolFileNameOnly[] listSpoolFiles(ISeriesSplfFilterString filter,
                                                     IISeriesHostListSpoolFileFactory factory,
                                                     IProgressMonitor monitor)
                                              throws SystemMessageException,
                                                     InterruptedException
List spool files matching the specified filter

Throws:
SystemMessageException
InterruptedException

listMessageDescriptions

public IQSYSMessageDescription[] listMessageDescriptions(IQSYSMessageFile file,
                                                         IProgressMonitor monitor)
                                                  throws SystemMessageException,
                                                         InterruptedException
List all message descriptions for the specified message file.

Parameters:
file - The message file to retrieve message descriptions from.
Throws:
SystemMessageException
InterruptedException

listMessageDescriptions

public IQSYSMessageDescription[] listMessageDescriptions(IQSYSMessageFile file,
                                                         String msgID,
                                                         IQSYSFactory factory,
                                                         IProgressMonitor monitor)
                                                  throws SystemMessageException,
                                                         InterruptedException
List message descriptions for the specified message file.

Parameters:
file - The message file to retrieve message descriptions from.
msgID - The ID of the message description to retrieve or * to retrieve all message descriptions.
Throws:
SystemMessageException
InterruptedException

getMemberDetails

public IQSYSMember getMemberDetails(IQSYSMember member,
                                    IProgressMonitor monitor)
                             throws SystemMessageException,
                                    InterruptedException
Retrieve details for specified member object

Throws:
SystemMessageException
InterruptedException

getDatabaseFileDetails

public IQSYSDatabaseFile getDatabaseFileDetails(IQSYSDatabaseFile file,
                                                IProgressMonitor monitor)
                                         throws SystemMessageException,
                                                InterruptedException
Retrieve details for the specified physical file object

Throws:
SystemMessageException
InterruptedException

listFields

public IQSYSFileField[] listFields(ISeriesFieldFilterString filter,
                                   IProgressMonitor monitor)
                            throws SystemMessageException,
                                   InterruptedException
List fields matching the specified field filter

Throws:
SystemMessageException
InterruptedException

listFields

public IQSYSFileField[] listFields(ISeriesFieldFilterString filter,
                                   IQSYSFileFieldFactory factory,
                                   IProgressMonitor monitor)
                            throws SystemMessageException,
                                   InterruptedException
List fields matching the specified field filter

Throws:
SystemMessageException
InterruptedException

checkAuthority

public boolean checkAuthority(String library,
                              String object,
                              String objectType,
                              String authorityList)
                       throws SystemMessageException
Check object authorities

Throws:
SystemMessageException

getDefaultFactory

public IQSYSFactory getDefaultFactory()
Get the Default QSYS object factory


getDefaultRecordFactory

public IQSYSFileRecordFormatFactory getDefaultRecordFactory()
Get the Default QSYS record factory


getDefaultFieldFactory

public IQSYSFileFieldFactory getDefaultFieldFactory()
Get the Default QSYS field factory


getEditingCCSID

public int getEditingCCSID(IQSYSMember member)
                    throws SystemMessageException
Query the CCSID used to translate files from EBCDIC to UTF-8 for editing in the Workbench.

Throws:
SystemMessageException

getFileOverride

public ISeriesFileOverrideInformation getFileOverride(String filename)
                                               throws SystemMessageException
Check if the specified file is an override file.

Returns:
The ISeriesFileOverrideInformation for the override or null if no override is currently set for the file.
Throws:
SystemMessageException

listMemberLocks

public List<ISeriesHostObjectLock> listMemberLocks(IQSYSMember member)
                                            throws SystemMessageException
Retrieve the list of locks for the specified IBM i member

Throws:
SystemMessageException

listKeyFields

public IISeriesHostKeyField[] listKeyFields(IQSYSDatabaseFile file,
                                            String recordName)
                                     throws SystemMessageException
Retrieve the key fields for the iSeries Database file.

Throws:
SystemMessageException

getDeviceRecords

public IISeriesHostRecordDevice[] getDeviceRecords(IQSYSFile file)
                                            throws SystemMessageException
Retrieve the records for the deviceFile. This does not currently use any API wrappers so it should be considered internal use only. The only information that is returned is the lowest response indicator and buffer size (which are required by the RPG program verifier.)

Returns:
IISeriesHostRecordDevice[]
Throws:
SystemMessageException

syntaxCheckSQL

public IISeriesSQLStatementHeader syntaxCheckSQL(String sqlStmt,
                                                 int stmtLen,
                                                 int numRec,
                                                 String language,
                                                 int numKeys,
                                                 String options)
                                          throws SystemMessageException
Syntax Check SQL statements

Parameters:
SQL - statements
Length - of each SQL statement
Number - of Records
Language - in which the SQL statements are coded
Number - of Keys
String - for Options
Returns:
The statement information of each of the statement processed
Throws:
SystemMessageException

getProgramInformation

public com.ibm.etools.iseries.services.qsys.internal.QSYSProgramInformation getProgramInformation(IQSYSObject program,
                                                                                                  boolean exportedProcsOnly)
                                                                                           throws SystemMessageException
Throws:
SystemMessageException

listProceduresInModule

public List<ISeriesHostProcedure> listProceduresInModule(String libraryName,
                                                         String moduleName)
                                                  throws SystemMessageException
Throws:
SystemMessageException

Rational Developer for Power Systems Software
V7.6

Copyright 2011 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.