public class ObjectList
extends java.lang.Object
implements java.io.Serializable
Implementation note: This class internally uses the Open List APIs (e.g. QGYOLOBJ).
ObjectDescription, 
Serialized Form| Modifier and Type | Field and Description | 
|---|---|
| static java.lang.String | ALLSelection value representing *ALL. | 
| static java.lang.String | ALL_USERSelection value representing *ALLUSR. | 
| static java.lang.String | ASP_NAME_ALLConstant indicating that the auxiliary storage pools that are currently
 part of the the thread's library name space will be searched to locate
 the library. | 
| static java.lang.String | ASP_NAME_ALLAVLConstant indicating that all available ASPs will be searched. | 
| static java.lang.String | ASP_NAME_CURASPGRPConstant indicating if the thread has an ASP group, the primary and secondary ASPs
 in the ASP group will be searched to locate the library. | 
| static java.lang.String | ASP_NAME_SYSBASConstant indicating that the system ASP (ASP 1) and all defined basic user ASPs (ASPs 2-32)
 will be searched to locate the library. | 
| static java.lang.String | ASP_SEARCH_TYPE_ASPConstant indicating that only the single ASP named in the auxiliary storage
 pool device name field will be searched. | 
| static java.lang.String | ASP_SEARCH_TYPE_ASPGRPConstant indicating that all ASPs in the auxiliary storage pool group named
 in the auxiliary storage pool device name field will be searched. | 
| static java.lang.String | AUTH_ALLSelection value representing an authority of *ALL. | 
| static java.lang.String | AUTH_ANYSelection value representing an authority of *ANY. | 
| static java.lang.String | AUTH_CHANGESelection value representing an authority of *CHANGE. | 
| static java.lang.String | AUTH_DATA_ADDSelection value representing a data authority of *ADD. | 
| static java.lang.String | AUTH_DATA_DELETESelection value representing a data authority of *DLT. | 
| static java.lang.String | AUTH_DATA_EXECUTESelection value representing a data authority of *EXECUTE. | 
| static java.lang.String | AUTH_DATA_READSelection value representing a data authority of *READ. | 
| static java.lang.String | AUTH_DATA_UPDATESelection value representing a data authority of *UPD. | 
| static java.lang.String | AUTH_LIST_MANAGEMENTSelection value representing an authority of *AUTLMGT. | 
| static java.lang.String | AUTH_OBJECT_ALTERSelection value representing an object authority of *OBJALTER. | 
| static java.lang.String | AUTH_OBJECT_EXISTENCESelection value representing an object authority of *OBJEXIST. | 
| static java.lang.String | AUTH_OBJECT_MANAGEMENTSelection value representing an object authority of *OBJMGT. | 
| static java.lang.String | AUTH_OBJECT_OPERATIONALSelection value representing an object authority of *OBJOPR. | 
| static java.lang.String | AUTH_OBJECT_REFERENCESelection value representing an object authority of *OBJREF. | 
| static java.lang.String | AUTH_USESelection value representing an authority of *USE. | 
| static java.lang.String | CURRENT_LIBRARYSelection value representing *CURLIB. | 
| static java.lang.String | IBMSelection value representing *IBM. | 
| static java.lang.String | LIBRARY_LISTSelection value representing *LIBL. | 
| static byte | STATUS_ANYSelection value representing any status. | 
| static java.lang.String | USER_LIBRARY_LISTSelection value representing *USRLIBL. | 
| Constructor and Description | 
|---|
| ObjectList(AS400 system)Constructs an ObjectList object. | 
| ObjectList(AS400 system,
          java.lang.String objectLibrary,
          java.lang.String objectName,
          java.lang.String objectType)Constructs an ObjectList with the specified selection criteria. | 
| ObjectList(AS400 system,
          java.lang.String objectLibrary,
          java.lang.String objectName,
          java.lang.String objectType,
          java.lang.String aspDeviceName)Constructs an ObjectList with the specified selection criteria. | 
| Modifier and Type | Method and Description | 
|---|---|
| void | addLibraryAuthorityCriteria(java.lang.String authority)Adds a library authority as part of the selection criteria for generating
 the list of objects. | 
| void | addObjectAttributeToRetrieve(int attribute)Adds an object attribute to retrieve when this list is built. | 
| void | addObjectAttributeToSortOn(int attribute,
                          boolean sortOrder)Adds an object attribute used to sort the list. | 
| void | addObjectAuthorityCriteria(java.lang.String authority)Adds an object authority as part of the selection criteria for generating
 the list of objects. | 
| void | addObjectSelectionCriteria(byte status)Adds an object attribute used to filter the list. | 
| void | clearLibraryAuthorityCriteria()Clears the library authority criteria used to filter the list. | 
| void | clearObjectAttributesToRetrieve()Clears the object attribtues to retrieve as part of this list. | 
| void | clearObjectAttributesToSortOn()Clears the object attributes used to sort the list. | 
| void | clearObjectAuthorityCriteria()Clears the object authority criteria used to filter the list. | 
| void | clearObjectSelectionCriteria()Clears the object statuses used to filter the list and resets the
 object selection to include objects in the list (true). | 
| void | close()Closes the object list on the system. | 
| protected void | finalize()Closes the list on the system when this object is garbage collected. | 
| java.lang.String | getAspDeviceName()Returns the name of an auxiliary storage pool (ASP) device in which storage is 
 allocated for the library that contains the object. | 
| java.lang.String | getAspSearchType()Returns the type of search to be used withn a specific auxiliary storage pool
 device name is specified. | 
| int | getLength()Returns the number of objects in the object list. | 
| java.lang.String | getLibrary()Returns the library used to filter this list. | 
| java.lang.String | getName()Returns the object name used to filter this list. | 
| java.util.Enumeration | getObjects()Returns the list of objects in the object list. | 
| ObjectDescription[] | getObjects(int listOffset,
          int number)Returns a subset of the list of objects. | 
| AS400 | getSystem()Returns the system. | 
| java.lang.String | getType()Returns the object type used to filter this list. | 
| void | load()Loads the list of objects on the system. | 
| void | setAspSearchType(java.lang.String aspSearchType)Specifies the type of the search when a specific auxiliary storage pool device name
 is specified for the ASP device name. | 
| void | setObjectSelection(boolean select)Sets whether or not the object selection criteria are used to include
 objects in the list or to omit them from the list. | 
public static final java.lang.String ALL
public static final java.lang.String ALL_USER
public static final java.lang.String ASP_NAME_ALL
public static final java.lang.String ASP_NAME_SYSBAS
public static final java.lang.String ASP_NAME_CURASPGRP
public static final java.lang.String ASP_NAME_ALLAVL
public static final java.lang.String ASP_SEARCH_TYPE_ASP
public static final java.lang.String ASP_SEARCH_TYPE_ASPGRP
public static final java.lang.String AUTH_ALL
public static final java.lang.String AUTH_ANY
public static final java.lang.String AUTH_CHANGE
public static final java.lang.String AUTH_DATA_ADD
public static final java.lang.String AUTH_DATA_DELETE
public static final java.lang.String AUTH_DATA_EXECUTE
public static final java.lang.String AUTH_DATA_READ
public static final java.lang.String AUTH_DATA_UPDATE
public static final java.lang.String AUTH_LIST_MANAGEMENT
public static final java.lang.String AUTH_OBJECT_ALTER
public static final java.lang.String AUTH_OBJECT_EXISTENCE
public static final java.lang.String AUTH_OBJECT_MANAGEMENT
public static final java.lang.String AUTH_OBJECT_OPERATIONAL
public static final java.lang.String AUTH_OBJECT_REFERENCE
public static final java.lang.String AUTH_USE
public static final java.lang.String CURRENT_LIBRARY
public static final java.lang.String IBM
public static final java.lang.String LIBRARY_LIST
public static final byte STATUS_ANY
public static final java.lang.String USER_LIBRARY_LIST
public ObjectList(AS400 system)
system - The system.public ObjectList(AS400 system, java.lang.String objectLibrary, java.lang.String objectName, java.lang.String objectType)
system - The system.objectLibrary - The library or set of libraries that are searched for objects.
 Valid values are a specific name, a generic name, or one of the following
 special values:
 ALL - All libraries are searched.
 ALL_USER - All user libraries are searched.
 CURRENT_LIBRARY - The current library is searched.
 LIBRARY_LIST - The library list is searched.
 USER_LIBRARY_LIST - The user portion of the library list is searched.
 objectName - The object name. Valid values are a specific name, a generic
 name, or one of the following special values:
 ALL - All object names are searched.
 ALL_USER - All objects that are libraries in QSYS or the
 library list are searched. The object library 
 must either be LIBRARY_LIST or QSYS. The object type
 must be *LIB. A list of user libraries is returned.
 IBM - All objects that are libraries in QSYS or the library
 list are searched. The object library must either be LIBRARY_LIST
 or QSYS. The object type must be *LIB. A list of saved (SAVLIB) and restored (RSTLIB)
 libraries is returned.
 objectType - The type of objects that are searched. Valid values include
 a specific object type (*LIB, *FILE, *OUTQ, etc) or ALL.public ObjectList(AS400 system, java.lang.String objectLibrary, java.lang.String objectName, java.lang.String objectType, java.lang.String aspDeviceName)
system - The system.objectLibrary - The library or set of libraries that are searched for objects.
 Valid values are a specific name, a generic name, or one of the following
 special values:
 ALL - All libraries are searched.
 ALL_USER - All user libraries are searched.
 CURRENT_LIBRARY - The current library is searched.
 LIBRARY_LIST - The library list is searched.
 USER_LIBRARY_LIST - The user portion of the library list is searched.
 objectName - The object name. Valid values are a specific name, a generic
 name, or one of the following special values:
 ALL - All object names are searched.
 ALL_USER - All objects that are libraries in QSYS or the
 library list are searched. The object library 
 must either be LIBRARY_LIST or QSYS. The object type
 must be *LIB. A list of user libraries is returned.
 IBM - All objects that are libraries in QSYS or the library
 list are searched. The object library must either be LIBRARY_LIST
 or QSYS. The object type must be *LIB. A list of saved (SAVLIB) and restored (RSTLIB)
 libraries is returned.
 objectType - The type of objects that are searched. Valid values include
 a specific object type (*LIB, *FILE, *OUTQ, etc) or ALL.aspDeviceName - The name of an auxiliary storage pool (ASP) device in which storage is 
 allocated for the library that contains the object or one of the following special values:
 ASP_NAME_ALL - The ASPs in the thread's library name space.ASP_NAME_ALLAVL - All available ASPs.ASP_NAME_CURASPGRP - The ASPs in the current thread's ASP group.ASP_NAME_SYSBAS - The system ASP (ASP 1) and defined basic user ASPs (ASPs 2-32).public void addLibraryAuthorityCriteria(java.lang.String authority)
AUTH_DATA_EXECUTE. A maximum of 10 authorities
 can be added.authority - The authority to search. Valid values are:
 AUTH_ALL - All authority. This consists of all 5 object
 authorities and all 5 data authorities.
 AUTH_CHANGE - Change authority. This consists of all 5
 data authorities and object operational authority.
 AUTH_USE - Use authority. This consists of the read and
 execute data authorities and object operational authority.
 AUTH_OBJECT_OPERATIONAL - Object operational authority.
 AUTH_OBJECT_MANAGEMENT - Object management authority.
 AUTH_OBJECT_EXISTENCE - Object existence authority.
 AUTH_OBJECT_ALTER - Alter authority.
 AUTH_OBJECT_REFERENCE - Reference authority.
 AUTH_DATA_READ - Read authority.
 AUTH_DATA_ADD - Add authority.
 AUTH_DATA_UPDATE - Update authority.
 AUTH_DATA_DELETE - Delete authority.
 AUTH_DATA_EXECUTE - Execute authority.
 clearLibraryAuthorityCriteria()public void addObjectAttributeToRetrieve(int attribute)
 The object NAME, LIBRARY, and TYPE are always retrieved. By
 default, these are the only attributes that are retrieved.
 If no other attributes are added, the statuses of the objects (returned
 by ObjectDescription.getStatus())
 are unknown. Any attributes that are not retrieved via this interface
 will require another call to the system to retrieve them when
 ObjectDescription.getValue()
 is called.
 The exceptions to this are the various attributes that represent Date objects,
 as they need to be converted from system timestamp format, which always requires
 another call to the system.
attribute - The attribute to retrieve. Valid values include
 any of the attributes on the ObjectDescription class.clearObjectAttributesToRetrieve()public void addObjectAttributeToSortOn(int attribute,
                              boolean sortOrder)
 The list of object attributes to sort on is maintained internally even when this ObjectList is closed and re-used.
 To start over with a new set of object attributes to sort on, call clearObjectAttributesToSortOn().
attribute - The object attribute on which to sort.
 Possible values are all object attributes contained in the ObjectDescription class,
 excluding the following:
 sortOrder - true to sort ascending; false to sort descending.clearObjectAttributesToSortOn(), 
addObjectAttributeToRetrieve(int), 
ObjectDescriptionpublic void addObjectAuthorityCriteria(java.lang.String authority)
AUTH_ANY. A maximum of 11 authorities
 can be added.authority - The authority to search. Valid values are:
 AUTH_ALL - All authority. This consists of all 5 object
 authorities and all 5 data authorities.
 AUTH_CHANGE - Change authority. This consists of all 5
 data authorities and object operational authority.
 AUTH_USE - Use authority. This consists of the read and
 execute data authorities and object operational authority.
 AUTH_LIST_MANAGEMENT - Authorization list management
 authority. This value is valid only for objects whose type is *AUTL. It is
 ignored for all other object types.
 AUTH_OBJECT_OPERATIONAL - Object operational authority.
 AUTH_OBJECT_MANAGEMENT - Object management authority.
 AUTH_OBJECT_EXISTENCE - Object existence authority.
 AUTH_OBJECT_ALTER - Alter authority.
 AUTH_OBJECT_REFERENCE - Reference authority.
 AUTH_DATA_READ - Read authority.
 AUTH_DATA_ADD - Add authority.
 AUTH_DATA_UPDATE - Update authority.
 AUTH_DATA_DELETE - Delete authority.
 AUTH_DATA_EXECUTE - Execute authority.
 AUTH_ANY - Any authority other than *EXCLUDE. If this value
 is specified, no other values can be specified.
 clearObjectAuthorityCriteria()public void addObjectSelectionCriteria(byte status)
STATUS_ANY. A maximum of 5 statuses can be added.status - The object information status criteria. Possible values
 include:
 ObjectDescription.STATUS_NO_AUTHORITY - Objects that
 do not meet the authorities specified in the object authority criteria
 for this user. See addObjectAuthorityCriteria.
 ObjectDescription.STATUS_DAMAGED - Objects that are damaged.
 ObjectDescription.STATUS_LOCKED - Objects that are locked.
 ObjectDescription.STATUS_PARTIALLY_DAMAGED - Objects
 that are partially damaged.
 ObjectList.STATUS_ANY - Objects with any status.
 clearObjectSelectionCriteria(), 
setObjectSelection(boolean)public void clearLibraryAuthorityCriteria()
public void clearObjectAttributesToRetrieve()
addObjectAttributeToRetrieve(int)public void clearObjectAttributesToSortOn()
public void clearObjectAuthorityCriteria()
public void clearObjectSelectionCriteria()
public void close()
           throws AS400Exception,
                  AS400SecurityException,
                  ErrorCompletingRequestException,
                  java.lang.InterruptedException,
                  java.io.IOException,
                  ObjectDoesNotExistException
AS400Exception - If the system returns an error message.AS400SecurityException - If a security or authority error occurs.ErrorCompletingRequestException - If an error occurs before the request is completed.java.lang.InterruptedException - If this thread is interrupted.java.io.IOException - If an error occurs while communicating with the system.ObjectDoesNotExistException - If the object does not exist on the system.load()public java.lang.String getAspDeviceName()
public java.lang.String getAspSearchType()
public int getLength()
              throws AS400Exception,
                     AS400SecurityException,
                     ErrorCompletingRequestException,
                     java.lang.InterruptedException,
                     java.io.IOException,
                     ObjectDoesNotExistException
load().AS400Exception - If the system returns an error message.AS400SecurityException - If a security or authority error occurs.ConnectionDroppedException - If the connection is dropped unexpectedly.ErrorCompletingRequestException - If an error occurs before the request is completed.java.lang.InterruptedException - If this thread is interrupted.java.io.IOException - If an error occurs while communicating with the system.ObjectDoesNotExistException - If the object does not exist on the system.ServerStartupException - If the host server cannot be started.load()public java.lang.String getLibrary()
public java.lang.String getName()
public java.util.Enumeration getObjects()
                                 throws AS400Exception,
                                        AS400SecurityException,
                                        ErrorCompletingRequestException,
                                        java.lang.InterruptedException,
                                        java.io.IOException,
                                        ObjectDoesNotExistException,
                                        RequestNotSupportedException
ObjectDescription objects.AS400Exception - If the system returns an error message.AS400SecurityException - If a security or authority error occurs.ConnectionDroppedException - If the connection is dropped unexpectedly.ErrorCompletingRequestException - If an error occurs before the request is completed.java.lang.InterruptedException - If this thread is interrupted.java.io.IOException - If an error occurs while communicating with the system.ObjectDoesNotExistException - If the system object does not exist.RequestNotSupportedException - If the requested function is not supported because the system is not at the correct level.close(), 
load()public ObjectDescription[] getObjects(int listOffset, int number) throws AS400Exception, AS400SecurityException, ErrorCompletingRequestException, java.lang.InterruptedException, java.io.IOException, ObjectDoesNotExistException
load() is made (either implicitly or explicitly),
 then the objects at a given list offset will change, so a subsequent call to
 getObjects() with the same listOffset and number
 will most likely not return the same ObjectDescriptions as the previous call.listOffset - The offset in the list of objects (0-based). This value must be greater than or equal to 0 and
 less than the list length; or specify -1 to retrieve all of the objects.number - The number of objects to retrieve out of the list, starting at the specified
 listOffset. This value must be greater than or equal to 0 and less than or equal
 to the list length. If the listOffset is -1, this parameter is ignored.ObjectDescription objects.
 The length of this array may not necessarily be equal to number, depending upon the size
 of the list on the system, and the specified listOffset.AS400Exception - If the system returns an error message.AS400SecurityException - If a security or authority error occurs.ErrorCompletingRequestException - If an error occurs before the request is completed.java.lang.InterruptedException - If this thread is interrupted.java.io.IOException - If an error occurs while communicating with the system.ObjectDoesNotExistException - If the object does not exist on the system.Job, 
close(), 
load()public AS400 getSystem()
public java.lang.String getType()
public void load()
          throws AS400Exception,
                 AS400SecurityException,
                 ErrorCompletingRequestException,
                 java.lang.InterruptedException,
                 java.io.IOException,
                 ObjectDoesNotExistException
getObjects() will retrieve the actual object information
 and attributes for each object in the list from the system.
 This method updates the list length.
AS400Exception - If the system returns an error message.AS400SecurityException - If a security or authority error occurs.ConnectionDroppedException - If the connection is dropped unexpectedly.ErrorCompletingRequestException - If an error occurs before the request is completed.java.lang.InterruptedException - If this thread is interrupted.java.io.IOException - If an error occurs while communicating with the system.ObjectDoesNotExistException - If the object does not exist on the system.ServerStartupException - If the host server cannot be started.getLength(), 
close()public void setAspSearchType(java.lang.String aspSearchType)
                      throws ExtendedIllegalArgumentException
aspSearchType - The type of search to be used.  One of the following values may be specified:
 ASP_SEARCH_TYPE_ASP - Only the single ASP named will be searched.ASP_SEARCH_TYPE_ASPGRP - All ASPs in the auxiliary storage pool
 group named will be searched.ASP_SEARCH_TYPE_ASP.ExtendedIllegalArgumentException - if an invalid search type is specified.public void setObjectSelection(boolean select)
addObjectSelectionCriteria().select - true to include objects in the list that have the
 specified statuses, false to omit objects from the list that have the
 specified statuses.addObjectSelectionCriteria(byte), 
clearObjectSelectionCriteria()protected void finalize()
                 throws java.lang.Throwable
finalize in class java.lang.Objectjava.lang.Throwable