Rational Developer for Power Systems Software
V7.6

com.ibm.etools.iseries.comm
Class ISeriesAbstractListProcessor

java.lang.Object
  extended by com.ibm.etools.iseries.comm.ISeriesAbstractHostAPIProcessor
      extended by com.ibm.etools.iseries.comm.ISeriesAbstractListProcessor
All Implemented Interfaces:
IISeriesAPIProcessor, IISeriesListProcessor
Direct Known Subclasses:
ISeriesListIFS, ISeriesListLibraries, ISeriesListMembers, ISeriesListObjects

public abstract class ISeriesAbstractListProcessor
extends ISeriesAbstractHostAPIProcessor
implements IISeriesListProcessor

A base class for all classes that extract lists from an ISeries. This is done by calling the appropriate system API. This class leverages the inherited user space management methods of the parent class ISeriesAbstractHostAPIProcessor, as well as the nested classes for common API structures/parameters. What this class add is support common to any list request processing.

See Also:
ISeriesAbstractHostAPIProcessor

Nested Class Summary
static class ISeriesAbstractListProcessor.HostAPIGenericListHeader
          ======================================================================= HostAPIGenericListHeader ------------------------- Nested helper class to facilitate parsing of the common (generic) header that most host list APIs return at the top of the user space.
 
Nested classes/interfaces inherited from class com.ibm.etools.iseries.comm.ISeriesAbstractHostAPIProcessor
ISeriesAbstractHostAPIProcessor.HostAPIErrorCodeStructure
 
Field Summary
static String Copyright
           
protected static IISeriesHostListObjectFactory DEFAULT_LISTMEMBER_FACTORY_NAMEONLY
           
protected static IISeriesHostListObjectFactory DEFAULT_LISTOBJECT_FACTORY_BASIC
           
protected static IISeriesHostListObjectFactory DEFAULT_LISTOBJECT_FACTORY_BRIEF
           
protected static IISeriesHostListObjectFactory DEFAULT_LISTOBJECT_FACTORY_EXHAUSTIVE
           
protected static IISeriesHostListObjectFactory DEFAULT_LISTOBJECT_FACTORY_NAMEARRAY
          For listing names only returning a string array.
protected static IISeriesHostListObjectFactory DEFAULT_LISTOBJECT_FACTORY_NAMEONLY
           
protected static int GENERIC_HEADER_SIZE
           
protected  IISeriesHostListObjectFactory returnListObjectFactory
           
 
Fields inherited from class com.ibm.etools.iseries.comm.ISeriesAbstractHostAPIProcessor
cancel, cancellableSubTasks, cancelQuerier, CREATE_FALSE, CREATE_TRUE, dbcsConvert, DEFAULT_OBJECT_FACTORY_BASIC, DEFAULT_OBJECT_FACTORY_BRIEF, DEFAULT_OBJECT_FACTORY_EXHAUSTIVE, DEFAULT_OBJECT_FACTORY_NAMEONLY, errorcodeObj, hostAPILibraries, INFOLEVEL_BASIC, INFOLEVEL_BRIEF, INFOLEVEL_EXHAUSTIVE, INFOLEVEL_NAME, INFOLEVEL_NAMEARRAY, INITIAL_SPACESIZE, LOG_DIR, LOG_FILENAME, logFile, logFileStream, logLineCounter, logStandardOut, NEED_USERSPACE_NO, NEED_USERSPACE_YES, objName, objType, QVDEOBJLinfo, returnObjectFactory, todos, tracePrefix, warnings
 
Constructor Summary
ISeriesAbstractListProcessor()
          Constructor when there is no AS400 object available.
ISeriesAbstractListProcessor(AS400 system)
          Constructor when you have an AS400 object
 
Method Summary
static ISeriesAbstractListProcessor createListObject(AS400 system, ISeriesAbstractFilterString fsObj)
          Factory method to instantiate and return appropriate child object.
protected  IISeriesHostListObjectFactory getDefaultListObjectFactory()
          Get default object factory used to create new objects.
protected  String getFilterString()
          Return the filter string used for this list request.
protected  ISeriesAbstractFilterString getFilterStringObject()
          Return the filter string object used for this list request.
abstract  List getList(ISeriesAbstractFilterString fsObj)
          Abstract method each child must implement.
 List getList(ISeriesAbstractFilterString fsObj, IISeriesHostListBaseFactory listFactory)
          Retrieve a list of jobs, returning objects created by a supplied object factory.
 List getList(ISeriesAbstractFilterString fsObj, IISeriesHostListBaseFactory listFactory, IISeriesHostListStatusCallback callback)
          Retrieve a list of jobs, informing the caller when processing starts for each part of a multi-generic list.
abstract  List getListBrief(ISeriesAbstractFilterString fsObj)
          Abstract method each child must implement.
abstract  List getListNameOnly(ISeriesAbstractFilterString fsObj)
          Abstract method each child must implement.
protected  IISeriesHostListObjectFactory getListObjectFactory()
          Get object factory used to create new objects.
abstract  List getObjectList(ISeriesAbstractFilterString fsObj, IISeriesHostListObjectFactory factory)
          Abstract method each child must implement.
abstract  List getObjectList(ISeriesAbstractFilterString fsObj, IISeriesHostListObjectFactory factory, IISeriesHostListStatusCallback callback)
          Abstract method each child must implement.
protected  void setFilterStringObj(ISeriesAbstractFilterString fsObj)
          Set the filter string used for this list request.
protected  void setListObjectFactory(IISeriesHostListObjectFactory factory)
          Set list object factory used to create new objects.
 
Methods inherited from class com.ibm.etools.iseries.comm.ISeriesAbstractHostAPIProcessor
addCancellableSubTask, addWarning, cancel, clearWarnings, closeUserSpace, computeSize, createUserSpaceOnHost, determineInfoLevel, getClientCCSID, getDefaultObjectFactory, getErrorCodeStructure, getHostCCSID, getLibrary, getLogFileStream, getObjectFactory, getObjectName, getObjectType, getSystem, getUserSpace, getUserSpaceAPIName, getUserSpaceIFSName, getUserSpaceLibrary, getUserSpaceName, getWarnings, isCancelled, isTraceOn, logException, logHostMessages, logMessage, logMessage, logMessage, logTodo, openUserSpace, padString, parseBin8Date, parseChar13Date, parseChar7Date, parseChar8Date, readUserSpace, readUserSpace, registerCancelQuerier, removeCancellableSubTask, setClientCCSID, setHostCCSID, setLibrary, setLogFileDirectory, setObjectFactory, setObjectName, setObjectType, setSystem, setTracing, setUserSpaceLibrary, setUserSpaceName
 
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

Copyright

public static final String Copyright
See Also:
Constant Field Values

GENERIC_HEADER_SIZE

protected static final int GENERIC_HEADER_SIZE
See Also:
Constant Field Values

DEFAULT_LISTOBJECT_FACTORY_NAMEONLY

protected static final IISeriesHostListObjectFactory DEFAULT_LISTOBJECT_FACTORY_NAMEONLY

DEFAULT_LISTMEMBER_FACTORY_NAMEONLY

protected static final IISeriesHostListObjectFactory DEFAULT_LISTMEMBER_FACTORY_NAMEONLY

DEFAULT_LISTOBJECT_FACTORY_BRIEF

protected static final IISeriesHostListObjectFactory DEFAULT_LISTOBJECT_FACTORY_BRIEF

DEFAULT_LISTOBJECT_FACTORY_BASIC

protected static final IISeriesHostListObjectFactory DEFAULT_LISTOBJECT_FACTORY_BASIC

DEFAULT_LISTOBJECT_FACTORY_EXHAUSTIVE

protected static final IISeriesHostListObjectFactory DEFAULT_LISTOBJECT_FACTORY_EXHAUSTIVE

DEFAULT_LISTOBJECT_FACTORY_NAMEARRAY

protected static final IISeriesHostListObjectFactory DEFAULT_LISTOBJECT_FACTORY_NAMEARRAY
For listing names only returning a string array. Optimum performance.


returnListObjectFactory

protected IISeriesHostListObjectFactory returnListObjectFactory
Constructor Detail

ISeriesAbstractListProcessor

public ISeriesAbstractListProcessor()
Constructor when there is no AS400 object available. Either call setSystem prior to calling getList, or getList will create a new default AS400 object.


ISeriesAbstractListProcessor

public ISeriesAbstractListProcessor(AS400 system)
Constructor when you have an AS400 object

Parameters:
AS400 - system to use for the connection.
Method Detail

getListNameOnly

public abstract List getListNameOnly(ISeriesAbstractFilterString fsObj)
                              throws Exception
Abstract method each child must implement. This is the method that callers call to get their list, after instantiating a child object, when only the name is wanted and the default name-only factory is ok.

Specified by:
getListNameOnly in interface IISeriesListProcessor
Parameters:
fsObj - Filter string object identifying what list to get.
Returns:
List of ISeriesHostObjectNameOnly objects.
Throws:
Exception

getListBrief

public abstract List getListBrief(ISeriesAbstractFilterString fsObj)
                           throws Exception
Abstract method each child must implement. This is the method that callers call to get their list, after instantiating a child object, when only brief info is wanted and the default brief factory is ok.

Specified by:
getListBrief in interface IISeriesListProcessor
Parameters:
fsObj - Filter string object identifying what list to get.
Returns:
List of ISeriesHostObjectBrief objects.
Throws:
Exception

getList

public abstract List getList(ISeriesAbstractFilterString fsObj)
                      throws Exception
Abstract method each child must implement. This is the method that callers call to get their list, after instantiating a child object, when only basic info is wanted and the default basic factory is ok.

Specified by:
getList in interface IISeriesListProcessor
Parameters:
fsObj - Filter string object identifying what list to get.
Returns:
List of ISeriesHostObjectBasic objects.
Throws:
Exception

getList

public List getList(ISeriesAbstractFilterString fsObj,
                    IISeriesHostListBaseFactory listFactory)
             throws Exception
Retrieve a list of jobs, returning objects created by a supplied object factory.

As per the IISeriesListProcessor interface requirements. Not typesafe.

Specified by:
getList in interface IISeriesListProcessor
Throws:
Exception

getList

public List getList(ISeriesAbstractFilterString fsObj,
                    IISeriesHostListBaseFactory listFactory,
                    IISeriesHostListStatusCallback callback)
             throws Exception
Retrieve a list of jobs, informing the caller when processing starts for each part of a multi-generic list.

As per the IISeriesListProcessor interface requirements. Not typesafe.

Specified by:
getList in interface IISeriesListProcessor
Throws:
Exception

getObjectList

public abstract List getObjectList(ISeriesAbstractFilterString fsObj,
                                   IISeriesHostListObjectFactory factory)
                            throws Exception
Abstract method each child must implement. This is the method that callers call to get their list, after instantiating a child object. This version requires the caller to explicitly pass an object factory.

Parameters:
fsObj - Filter string object identifying what list to get.
factory - Factory for creating each of the returned objects.
Throws:
Exception

getObjectList

public abstract List getObjectList(ISeriesAbstractFilterString fsObj,
                                   IISeriesHostListObjectFactory factory,
                                   IISeriesHostListStatusCallback callback)
                            throws Exception
Abstract method each child must implement. This is the method that callers call to get their list, after instantiating a child object. It is the same as getList(ISeriesAbstractFilterString, IISeriesHostListObjectFactory) but takes a 3rd parm which is an object implementing the IISeriesHostListStatusCallback interface. This has one method in it which is called as each part of a multi-generic list is processed.

Parameters:
fsObj - Filter string object identifying what list to get.
factory - Factory for creating each of the returned objects.
callback - Object to callback as each list phase is started.
Throws:
Exception

setListObjectFactory

protected void setListObjectFactory(IISeriesHostListObjectFactory factory)
Set list object factory used to create new objects. This is given to us by the caller, or else we use a default.


getListObjectFactory

protected IISeriesHostListObjectFactory getListObjectFactory()
Get object factory used to create new objects. This is given to us by the caller, or else we use a default.


getDefaultListObjectFactory

protected IISeriesHostListObjectFactory getDefaultListObjectFactory()
Get default object factory used to create new objects. This is used when caller does not give us their own factory. Child classes who by default want to return more or less info than prescribed by the IAS400HostListObjectBasic interface should override this method.


setFilterStringObj

protected void setFilterStringObj(ISeriesAbstractFilterString fsObj)
Set the filter string used for this list request.


getFilterStringObject

protected ISeriesAbstractFilterString getFilterStringObject()
Return the filter string object used for this list request.


getFilterString

protected String getFilterString()
Return the filter string used for this list request.


createListObject

public static ISeriesAbstractListProcessor createListObject(AS400 system,
                                                            ISeriesAbstractFilterString fsObj)
Factory method to instantiate and return appropriate child object.


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.