com.ibm.as400.resource
Class SystemResourceList

java.lang.Object
  |
  +--com.ibm.as400.resource.ResourceList
        |
        +--com.ibm.as400.resource.BufferedResourceList
              |
              +--com.ibm.as400.resource.SystemResourceList
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
RJobList, RJobLog, RMessageQueue, RPrinterList, RUserList

public class SystemResourceList
extends BufferedResourceList

The SystemResourceList class represents a subclass of of the BufferedResourceList class which retrieves list items using AS/400 System Open List Application Programming Interfaces (APIs). This class is intended to be extended and customized by subclasses.

See Also:
Serialized Form

Method Summary
 void close()
          Closes the list.
protected  boolean isBidiEnabled()
          Indicates if this resource is enabled for bidirectional character conversion.
 boolean isResourceAvailable(long index)
          Indicates if the resource is available.
 void open()
          Opens the list.
 void refreshContents()
          Refreshes the contents of the list.
 void refreshStatus()
          Refreshes the status of the list.
 Resource resourceAt(long index)
          Returns the resource specified by the index.
 void setSelectionValue(java.lang.Object selectionID, java.lang.Object value, int bidiStringType)
          Sets the current value of a selection.
 void waitForComplete()
          Waits until the list is completely loaded.
 void waitForResource(long index)
          Waits until the resource is available or the list is complete.
 
Methods inherited from class com.ibm.as400.resource.BufferedResourceList
fireResourceAdded, getNumberOfPages, getPageSize, setNumberOfPages, setPageSize
 
Methods inherited from class com.ibm.as400.resource.ResourceList
addActiveStatusListener, addPropertyChangeListener, addResourceListListener, addVetoableChangeListener, arePropertiesFrozen, establishConnection, fireBusy, fireIdle, fireLengthChanged, fireListClosed, fireListCompleted, fireListInError, fireListOpened, firePropertyChange, fireVetoableChange, freezeProperties, getAttributeMetaData, getAttributeMetaData, getListLength, getPresentation, getSelectionMetaData, getSelectionMetaData, getSelectionValue, getSelectionValue, getSortMetaData, getSortMetaData, getSortOrder, getSortValue, getSystem, isComplete, isConnectionEstablished, isInError, isOpen, removeActiveStatusListener, removePropertyChangeListener, removeResourceListListener, removeVetoableChangeListener, resources, setAttributeMetaData, setPresentation, setSelectionValue, setSortOrder, setSortValue, setSystem, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

close

public void close()
           throws ResourceException
Closes the list. No further resources can be loaded. The list must be closed in order to clean up resources appropriately. This method has no effect if the list is already closed. This method fires a listClosed() ResourceListEvent.
Overrides:
close in class BufferedResourceList
Throws:
ResourceException - If an error occurs.

isBidiEnabled

protected boolean isBidiEnabled()
Indicates if this resource is enabled for bidirectional character conversion. This always returns true.
Overrides:
isBidiEnabled in class ResourceList
Returns:
Always true.

isResourceAvailable

public boolean isResourceAvailable(long index)
                            throws ResourceException
Indicates if the resource is available. This means that the resource has been loaded.
Overrides:
isResourceAvailable in class BufferedResourceList
Parameters:
index - The index.
Returns:
true if the resource is available, false if the resource is not available or the list is not open.
Throws:
ResourceException - If an error occurs.

open

public void open()
          throws ResourceException
Opens the list. The list must be open in order to perform most operations. This method has no effect if the list is already opened.
Overrides:
open in class BufferedResourceList
Throws:
ResourceException - If an error occurs.

refreshContents

public void refreshContents()
                     throws ResourceException
Refreshes the contents of the list.

This will implicitly open the list if needed.

Overrides:
refreshContents in class BufferedResourceList
Throws:
ResourceException - If an error occurs.

refreshStatus

public void refreshStatus()
                   throws ResourceException
Refreshes the status of the list. The status includes the length and whether the list is completed or in error. If the list is complete, this method has no effect.

This method does not refresh the contents of the list. Use refreshContents() to refresh the contents of the list.

This will implicitly open the list if needed.

Overrides:
refreshStatus in class ResourceList
Throws:
ResourceException - If an error occurs.

resourceAt

public Resource resourceAt(long index)
                    throws ResourceException
Returns the resource specified by the index.

This will implicitly open the list if needed.

Overrides:
resourceAt in class BufferedResourceList
Parameters:
index - The index.
Returns:
The resource specified by the index, or null if the resource is not yet available.
Throws:
ResourceException - If an error occurs.

setSelectionValue

public void setSelectionValue(java.lang.Object selectionID,
                              java.lang.Object value,
                              int bidiStringType)
                       throws ResourceException
Sets the current value of a selection. The changed selection value will take effect the next time the list is opened or refreshed.
Overrides:
setSelectionValue in class ResourceList
Parameters:
selectionID - Identifies the selection.
value - The selection value, or null to remove the selection.
bidiStringType - The bidi string type as defined by the CDRA (Character Data Representataion Architecture). See BidiStringType for more information and valid values.
Throws:
ResourceException - If an error occurs.

waitForComplete

public void waitForComplete()
                     throws ResourceException
Waits until the list is completely loaded.

This will implicitly open the list if needed.

Overrides:
waitForComplete in class ResourceList
Throws:
ResourceException - If an error occurs.

waitForResource

public void waitForResource(long index)
                     throws ResourceException
Waits until the resource is available or the list is complete.

This will implicitly open the list if needed.

Overrides:
waitForResource in class ResourceList
Parameters:
index - The index.
Throws:
ResourceException - If an error occurs.