|
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.comm.ISeriesAbstractHostAPIProcessor com.ibm.etools.iseries.comm.ISeriesAbstractListProcessor com.ibm.etools.iseries.comm.ISeriesListObjects
public class ISeriesListObjects
A class for listing objects on an ISeries. This is done by calling the system API QVDEOBJL, which in turn calls QUSLOBJ.
The output of the list request is a List of objects that implement
the interface ISeriesHostObjectXXX. In order to enable this class
to create instances of classes that implement this interface, the
caller is asked to supply an object that implements the interface
IISeriesHostListObjectFactory
.
The appropriate createXXXObject method of this will be called
for each item in the returned list. The resulting object will be
examined to see which of the following three interfaces it implements
and the amount of information returned will be determined by that:
IISeriesHostObjectNameOnly
-> name and context information only
IISeriesHostObjectBrief
-> brief information
IISeriesHostObjectBasic
-> typical information
IISeriesHostObjectExhaustive
-> ALL information the host gives us
Nested Class Summary |
---|
Nested classes/interfaces inherited from class com.ibm.etools.iseries.comm.ISeriesAbstractListProcessor |
---|
ISeriesAbstractListProcessor.HostAPIGenericListHeader |
Nested classes/interfaces inherited from class com.ibm.etools.iseries.comm.ISeriesAbstractHostAPIProcessor |
---|
ISeriesAbstractHostAPIProcessor.HostAPIErrorCodeStructure |
Field Summary | |
---|---|
static String |
Copyright
|
static String |
DBATTR
Special object attribute value for listing all PF, LF and DDM files. |
Fields inherited from class com.ibm.etools.iseries.comm.ISeriesAbstractListProcessor |
---|
DEFAULT_LISTMEMBER_FACTORY_NAMEONLY, DEFAULT_LISTOBJECT_FACTORY_BASIC, DEFAULT_LISTOBJECT_FACTORY_BRIEF, DEFAULT_LISTOBJECT_FACTORY_EXHAUSTIVE, DEFAULT_LISTOBJECT_FACTORY_NAMEARRAY, DEFAULT_LISTOBJECT_FACTORY_NAMEONLY, GENERIC_HEADER_SIZE, returnListObjectFactory |
Constructor Summary | |
---|---|
ISeriesListObjects()
Constructor used when you do not have an AS400 object already. |
|
ISeriesListObjects(AS400 system)
Constructor used when you have an AS400 object already. |
Method Summary | |
---|---|
protected void |
buildListHunk(int nbrRows,
int startingPosition,
int sizePerRow)
Given one big hunk of returned data, xlate it to text and parse it row by row into a populated object. |
protected int |
determineInfoLevel(IISeriesHostObjectNameOnly obj)
Examine an object returned by the supplied object factory to determine what information level is requested by the caller. |
int |
getInfoLevel()
Get the level of information to retrieve for each object. |
List |
getList(ISeriesAbstractFilterString fsObj)
Retrieve list of typical object information for objects in an AS/400 library. |
List |
getListBrief(ISeriesAbstractFilterString fsObj)
Retrieve list of simple object information for objects in an AS/400 library. |
List |
getListExhaustive(ISeriesAbstractFilterString fsObj)
Retrieve list of complete object information for objects in an AS/400 library. |
protected void |
getListFromAS400()
Call QVDEOBJL on AS/400 to get the list (which in turn calls system api QUSLOBJ. |
String[] |
getListNameArray(ISeriesAbstractFilterString fsObj)
Retrieve list of names-only as an array of strings. |
List |
getListNameOnly(ISeriesAbstractFilterString fsObj)
Retrieve list of names-only object information for objects in an AS/400 library. |
List |
getObjectList(ISeriesAbstractFilterString fsObj,
IISeriesHostListObjectFactory listObjectFactory)
Retrieve list of object information for objects in an AS/400 library. |
List |
getObjectList(ISeriesAbstractFilterString fsObj,
IISeriesHostListObjectFactory listObjectFactory,
IISeriesHostListStatusCallback callback)
Retrieve a list of objects, informing the caller when processing starts for each part of a multi-generic list. |
protected void |
populateObj()
Method that parses the next of data and populates the current list object. |
void |
setAuthorityChecks(String[] libAuth,
String[] objAuth)
Set the library and object authorities to check on the QUSLOBJ call. |
void |
setInfoLevel(int infoLevel)
Set the level of information to retrieve for each object. |
void |
setSystem(AS400 system)
Set the AS/400 object used for this list processor. |
Methods inherited from class com.ibm.etools.iseries.comm.ISeriesAbstractListProcessor |
---|
createListObject, getDefaultListObjectFactory, getFilterString, getFilterStringObject, getList, getList, getListObjectFactory, setFilterStringObj, setListObjectFactory |
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.iseries.comm.interfaces.IISeriesAPIProcessor |
---|
getWarnings |
Field Detail |
---|
public static final String Copyright
public static final String DBATTR
Constructor Detail |
---|
public ISeriesListObjects()
public ISeriesListObjects(AS400 system)
AS400
- system to use for the connection.Method Detail |
---|
public List getList(ISeriesAbstractFilterString fsObj) throws Exception
getList
that takes a list object factory, but in this case we use a default factory
that returns basic information IISeriesHostObjectBasic
getList
in interface IISeriesListProcessor
getList
in class ISeriesAbstractListProcessor
fsObj
- Filter string object identifying what list to get.
ISeriesHostObjectBasic
objects.
Exception
public List getListNameOnly(ISeriesAbstractFilterString fsObj) throws Exception
getList
that takes a list object factory, but in this case we use a default factory
that returns name-only information IISeriesHostObjectNameOnly
for every item in the list.
getListNameOnly
in interface IISeriesListProcessor
getListNameOnly
in class ISeriesAbstractListProcessor
fsObj
- Filter string object identifying what list to get.
ISeriesHostObjectNameOnly
objects.
Exception
public String[] getListNameArray(ISeriesAbstractFilterString fsObj) throws Exception
Exception
public List getListBrief(ISeriesAbstractFilterString fsObj) throws Exception
getList
that takes a list object factory, but in this case we use a default factory
that returns brief information IISeriesHostObjectBrief
for every item in the list.
getListBrief
in interface IISeriesListProcessor
getListBrief
in class ISeriesAbstractListProcessor
fsObj
- Filter string object identifying what list to get.
ISeriesHostObjectBrief
objects.
Exception
public List getListExhaustive(ISeriesAbstractFilterString fsObj) throws Exception
getList
that takes a list object factory, but in this case we use a default factory
that returns all information IISeriesHostObjectExhaustive
for every item in the list.
ISeriesHostObjectExhaustive
objects.
Exception
public List getObjectList(ISeriesAbstractFilterString fsObj, IISeriesHostListObjectFactory listObjectFactory) throws Exception
getObjectList
in class ISeriesAbstractListProcessor
fsObj
- an ISeriesObjectFilterString
object
identifying what objects to list. This tells the list processor the library to list objects
in, and the object name pattern. It can also identify an object type and attribute to
refine the subsetting. To create one of these ISeriesObjectFilterString objects, pass a filter string of the form
library/object OBJTYPE(type:attribute type:attribute ...)
to its constructor.
The library and object names, and the object attribute, can optionally be generic containing
one or two asterisks anywhere in them.
Note that if the library is generic (not scalar or *CURLIB) then this is a multi-generic list
request and will result in multiple requests to the host API: one per library matching the
generic library name. All results will be concatenated together into the single returned List.listObjectFactory
- An object implementing the IISeriesHostListObjectFactory
interface. This interface prescribes three methods: createObject() for
creating object objects, createLibraryObject for creating library objects,
and createDBFile object for creating database file objects.
The appropriate method is called by this list processing code
to create the object for each item in the return list. Once created,
the object is populated with data from the host about that host item.
The amount of data put into is determined by examining which of the
three interfaces the object returned by createObject() implements:
IISeriesHostObjectNameOnly
-> name and context information only
IISeriesHostObjectBrief
-> brief information
IISeriesHostObjectBasic
-> typical information
IISeriesHostObjectExhaustive
-> ALL information the host gives us
Exception
public List getObjectList(ISeriesAbstractFilterString fsObj, IISeriesHostListObjectFactory listObjectFactory, IISeriesHostListStatusCallback callback) throws Exception
getObjectList(ISeriesAbstractFilterString, IISeriesHostListObjectFactory)
method,
but includes a callback object that is called when processing starts for each part of a multi-generic
list request. A multi-generic object list is a request where the library itself is generic, thus requiring
multiple calls to the host object list API.
This version of getList is usually used by GUI code that wishes to update a status dialog.
getObjectList
in class ISeriesAbstractListProcessor
fsObj
- Filter string object identifying what list to get.listObjectFactory
- Factory for creating each of the returned objects.callback
- Object to callback as each list phase is started.
Exception
protected void getListFromAS400() throws Exception
Exception
protected void buildListHunk(int nbrRows, int startingPosition, int sizePerRow) throws Exception
Exception
protected void populateObj() throws Exception
Exception
public void setAuthorityChecks(String[] libAuth, String[] objAuth)
libAuth
- The library authorities to check.objAuth
- The object authorities to check.public void setSystem(AS400 system)
ISeriesAbstractHostAPIProcessor
setSystem
in class ISeriesAbstractHostAPIProcessor
public int getInfoLevel()
ISeriesAbstractHostAPIProcessor.INFOLEVEL_BASIC
,
ISeriesAbstractHostAPIProcessor.INFOLEVEL_BRIEF
,
ISeriesAbstractHostAPIProcessor.INFOLEVEL_EXHAUSTIVE
,
ISeriesAbstractHostAPIProcessor.INFOLEVEL_NAME
,
ISeriesAbstractHostAPIProcessor.INFOLEVEL_NAMEARRAY
public void setInfoLevel(int infoLevel)
ISeriesAbstractHostAPIProcessor.INFOLEVEL_BASIC
,
ISeriesAbstractHostAPIProcessor.INFOLEVEL_BRIEF
,
ISeriesAbstractHostAPIProcessor.INFOLEVEL_EXHAUSTIVE
,
ISeriesAbstractHostAPIProcessor.INFOLEVEL_NAME
,
ISeriesAbstractHostAPIProcessor.INFOLEVEL_NAMEARRAY
protected int determineInfoLevel(IISeriesHostObjectNameOnly obj)
ISeriesAbstractHostAPIProcessor
determineInfoLevel
in class ISeriesAbstractHostAPIProcessor
|
Rational Developer for Power Systems Software V7.6 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |