Rational Developer for Power Systems Software
V7.6

com.ibm.etools.iseries.comm
Class ISeriesCheckObject

java.lang.Object
  extended by com.ibm.etools.iseries.comm.ISeriesAbstractHostAPIProcessor
      extended by com.ibm.etools.iseries.comm.ISeriesCheckObject
All Implemented Interfaces:
IISeriesAPIProcessor

public class ISeriesCheckObject
extends ISeriesAbstractHostAPIProcessor

A class for retrieving information about an object on an ISeries. This is done by calling the OS/400 QUSROBJD system API. To use this class:

  1. Instantiate passing in the AS400 object representing the host connection.
  2. Call the method checkObject to retrieve information: By default you get a "medium" amount of information back in an ISeriesHostObjectBasic object. To get more or less pass in an instance of either ISeriesHostObjectExhaustiveFactory or ISeriesHostObjectBriefFactory using the overloaded version of this method.
  3. OR call the method findObject to find which library an object is in: By default you get a "medium" amount of information back in an ISeriesHostObjectBasic object. To get more or less pass in an instance of either ISeriesHostObjectExhaustiveFactory or ISeriesHostObjectBriefFactory using the overloaded version of this method.


Nested Class Summary
 
Nested classes/interfaces inherited from class com.ibm.etools.iseries.comm.ISeriesAbstractHostAPIProcessor
ISeriesAbstractHostAPIProcessor.HostAPIErrorCodeStructure
 
Field Summary
static String Copyright
           
 
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
ISeriesCheckObject()
          Constructor used when you do not have an AS400 object already.
ISeriesCheckObject(AS400 system)
          Constructor.
 
Method Summary
 IISeriesHostObjectBasic checkObject(String library, String object, String type)
          Method users call to get typical information about an AS/400 object.
 IISeriesHostObjectNameOnly checkObject(String library, String object, String type, IISeriesHostObjectFactory retObjFactory)
          Method users call to get object information.
 IISeriesHostObjectNameOnly findObject(String[] libraries, String object, String type)
          Method users call to find an object in a given list of libraries.
 IISeriesHostObjectNameOnly findObject(String[] libraries, String object, String type, IISeriesHostObjectFactory retObjFactory)
          Method users call to find an object in a given list of libraries.
protected  String getLibrary()
          Return the library of the object to be checked
 void init()
          Initialization.
protected  IISeriesHostObjectNameOnly makeCall(IISeriesHostObjectFactory retObjFactory)
          Method that actually makes the host API call.
protected  String setFormatStringandReturnData()
          Set return data size and buffer and format string telling host API how much info to return.
protected  void setObjectToCheck(String library, String objectname, String objecttype)
          Set library and name and type of object to check.
 
Methods inherited from class com.ibm.etools.iseries.comm.ISeriesAbstractHostAPIProcessor
addCancellableSubTask, addWarning, cancel, clearWarnings, closeUserSpace, computeSize, createUserSpaceOnHost, determineInfoLevel, getClientCCSID, getDefaultObjectFactory, getErrorCodeStructure, getHostCCSID, 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
 

Field Detail

Copyright

public static final String Copyright
See Also:
Constant Field Values
Constructor Detail

ISeriesCheckObject

public ISeriesCheckObject()
Constructor used when you do not have an AS400 object already. A new AS400 object will be created when checkObject or findObject is called, unless you subsequently call setSystem(AS400) first.


ISeriesCheckObject

public ISeriesCheckObject(AS400 system)
Constructor.

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

init

public void init()
Initialization. Can't be done until we have an AS400 object.


checkObject

public IISeriesHostObjectBasic checkObject(String library,
                                           String object,
                                           String type)
                                    throws Exception
Method users call to get typical information about an AS/400 object.

Parameters:
library - library containing object. Can be *LIBL or *CURLIB
object - name of the object to return information for.
type - type of the object to return information for (eg, "*FILE").
Returns:
IISeriesHostObjectBasic object populated with basic information or null if there was any problem. Should never be null if no exception is thrown though.
Throws:
Exception

checkObject

public IISeriesHostObjectNameOnly checkObject(String library,
                                              String object,
                                              String type,
                                              IISeriesHostObjectFactory retObjFactory)
                                       throws Exception
Method users call to get object information. Allows specification of the amount of information to be returned by supplying a return-object factory for creating the object to return. This method will determine how much information to return by looking at the type of object this factory returns.

Parameters:
library - library containing object. Can be *LIBL or *CURLIB
object - name of the object to return information for.
type - type of the object to return information for (eg, "*FILE").
retObjFactory - An instance of a class that implements IISeriesHostObjectFactory. The createObject method inside this object will return an object that implements one of:
  1. IISeriesHostObjectNameOnly if you only want name and context information for this object.
  2. IISeriesHostObjectBrief if you only want minimal information for this object.
  3. IISeriesHostObjectBasic if you want typical information for this object.
  4. IISeriesHostObjectExhaustive if you only ALL information for this object.
Returns:
Specified AS400HostObjectXXX object populated with basic information or null if there was any problem. Should never be null if no exception is thrown though.
Throws:
Exception

findObject

public IISeriesHostObjectNameOnly findObject(String[] libraries,
                                             String object,
                                             String type)
Method users call to find an object in a given list of libraries.

Returns:
ISeriesHostObjectBasic object populated with basic information or null if there was any problem.

findObject

public IISeriesHostObjectNameOnly findObject(String[] libraries,
                                             String object,
                                             String type,
                                             IISeriesHostObjectFactory retObjFactory)
Method users call to find an object in a given list of libraries.

Returns:
ISeriesHostObjectBasic object populated with basic information or null if there was any problem.

setObjectToCheck

protected void setObjectToCheck(String library,
                                String objectname,
                                String objecttype)
Set library and name and type of object to check.

Parameters:
library - of object, or *LIBL or *CURLIB
name - of object
type - of object

getLibrary

protected String getLibrary()
Return the library of the object to be checked

Overrides:
getLibrary in class ISeriesAbstractHostAPIProcessor

setFormatStringandReturnData

protected String setFormatStringandReturnData()
Set return data size and buffer and format string telling host API how much info to return.


makeCall

protected IISeriesHostObjectNameOnly makeCall(IISeriesHostObjectFactory retObjFactory)
                                       throws Exception
Method that actually makes the host API call.

Returns:
depending on the type of object returned by the supplied factory's createObject method, will be an object of one of these classes:
  • IISeriesHostObjectNameOnly.
  • IISeriesHostObjectBrief.
  • IISeriesHostObjectBasic.
  • IISeriesHostObjectExhaustive.
    Throws:
    Exception

  • 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.