com.ibm.as400.opnav
Interface ListManager

All Known Implementing Classes:
NativeListManager

public interface ListManager

The interface which models a list of system objects. A ListManager implementation provides list data to a user interface, without knowing or caring how the user interface is implemented.

User interface assumptions:

Implementation assumptions: ListManager implementations may choose to support enhanced functions such as sorting or custom toolbars by implementing the interfaces WindowsListManager or SortingListManager.

Since:
v4r4m0
See Also:
ActionsManager, DropTargetManager, WindowsListManager, SortingListManager

Field Summary
static int LIST_CLOSED
          Closed status.
static int LIST_COMPLETE
          Complete status.
static int LIST_ERROR
          Error status.
static int LIST_INCOMPLETE
          Incomplete status.
static int OBJECT_HASPROPERTIES
          Properties attribute.
static int OBJECT_HASSUBCONTAINERS
          Subcontainer attribute.
static int OBJECT_IMPLEMENTSPROPERTIES
          Properties implementation attribute.
static int OBJECT_ISCONTAINER
          Container attribute.
static int OBJECT_ISDROPTARGET
          Drop target attribute.
static int OBJECT_ISGUICONTAINER
          GUI container attribute.
static int OBJECT_ISTREELIST
          TreeList attribute.
static int OBJECT_OPENEXPANDED
          If the object is a folder, indicates that it sould be expanded initially.
static int OBJECT_SELECTED
          Selected attribute.
static int SINGLE_SELECTION
          Single Selection attribute.
 
Method Summary
 void close()
          Frees all list resources.
 int getAttributes(ItemIdentifier item)
          Returns the attributes of a list object.
 java.lang.String getColumnData(ItemIdentifier item, int columnID)
          Returns the data for a list column.
 ColumnDescriptor[] getColumnInfo()
          Returns the column headings for this list.
 java.lang.String getErrorMessage()
          Returns an error message.
 java.lang.String getImageFile(ItemIdentifier item, int flags)
          Returns the image file name for a list object.
 int getItemCount()
          Returns the total count of objects in the list.
 java.lang.Object getListObject(ObjectName objName)
          Returns a cached list object.
 int getStatus()
          Returns the current status of the list.
 void initialize(ObjectName container)
          Identifies the container to be enumerated.
 ItemIdentifier itemAt(int index)
          Returns the item identifier for a list object.
 void open()
          Prepares the list for enumeration.
 void prepareToExit()
          Provides notification that the application is terminating.
 

Field Detail

LIST_ERROR

public static final int LIST_ERROR
Error status. Indicates that this list could not be successfully opened.

LIST_INCOMPLETE

public static final int LIST_INCOMPLETE
Incomplete status. Indicates that this list was successfully opened, but that the total count of items in the list is not yet known.

LIST_COMPLETE

public static final int LIST_COMPLETE
Complete status. Indicates that this list was successfully opened, and that the total count of items in the list is available.

LIST_CLOSED

public static final int LIST_CLOSED
Closed status. Indicates that this list is in a deactivated state. No list items may be obtained.

OBJECT_ISTREELIST

public static final int OBJECT_ISTREELIST
TreeList attribute. Indicates that a list object is a TreeList.

OBJECT_OPENEXPANDED

public static final int OBJECT_OPENEXPANDED
If the object is a folder, indicates that it sould be expanded initially.

OBJECT_ISCONTAINER

public static final int OBJECT_ISCONTAINER
Container attribute. Indicates that a list object is a container.

OBJECT_ISGUICONTAINER

public static final int OBJECT_ISGUICONTAINER
GUI container attribute. Indicates that a list object is a gui contianer object.

OBJECT_HASSUBCONTAINERS

public static final int OBJECT_HASSUBCONTAINERS
Subcontainer attribute. Indicates that this list contains other lists.

OBJECT_HASPROPERTIES

public static final int OBJECT_HASPROPERTIES
Properties attribute. Indicates that a list object can supply property pages. Not currently supported.

OBJECT_IMPLEMENTSPROPERTIES

public static final int OBJECT_IMPLEMENTSPROPERTIES
Properties implementation attribute. Indicates that a list object implements its own properties panel.

OBJECT_ISDROPTARGET

public static final int OBJECT_ISDROPTARGET
Drop target attribute. Indicates that a list object is a drop target.

OBJECT_SELECTED

public static final int OBJECT_SELECTED
Selected attribute. Indicates that a list object has been selected by the user.

SINGLE_SELECTION

public static final int SINGLE_SELECTION
Single Selection attribute. Indicates this object allows only one selected item.
Method Detail

initialize

public void initialize(ObjectName container)
Identifies the container to be enumerated. This method is called immediately after this object is instantiated.
Parameters:
container - The container whose contents the user wishes to display.
Since:
v4r4m0
See Also:
ObjectName

open

public void open()
Prepares the list for enumeration. This method is called when the user initially selects a container. Once it has been called, getStatus should return a value other than LIST_CLOSED.

open is called on a data thread so that long running operations will not degrade the performance of the user interface.

Since:
v4r4m0

getStatus

public int getStatus()
Returns the current status of the list. This method is called after the list has been opened to learn whether the open attempt was successful.
Returns:
a status constant which reflects the current list status.
Since:
v4r4m0

getErrorMessage

public java.lang.String getErrorMessage()
Returns an error message. This method is called after getStatus has returned a value of LIST_ERROR. The returned message should be in a form suitable for displaying to the user.
Returns:
null if no error message is available.
Since:
v4r4m0

getItemCount

public int getItemCount()
Returns the total count of objects in the list.

This method is called after the list has been successfully opened. If getStatus returned a value of LIST_COMPLETE, this method should return the total number of objects in the list. If getStatus returned LIST_INCOMPLETE, this method should return the number of objects currently known to be in the list.

Returns:
the number of objects in the list.
Since:
v4r4m0

itemAt

public ItemIdentifier itemAt(int index)
Returns the item identifier for a list object.

This method is called repeatedly when populating the view of a container. Long running operations should be avoided.

Parameters:
index - the zero-based index of the item for which an item identifier is requested.
Returns:
the item identifier that describes the object at the specified position in the list.
Since:
v4r4m0
See Also:
ItemIdentifier

getAttributes

public int getAttributes(ItemIdentifier item)
Returns the attributes of a list object.

This method is called repeatedly when populating the view of a container. Long running operations should be avoided.

Parameters:
item - the item identifier for the object whose attributes are to be retrieved.
Returns:
the integer sum of the attribute constants.
Since:
v4r4m0
See Also:
ItemIdentifier

getImageFile

public java.lang.String getImageFile(ItemIdentifier item,
                                     int flags)
Returns the image file name for a list object.

This method is called repeatedly when populating the view of a container. Long running operations should be avoided.

Parameters:
item - the item identifier for the object whose image file name is to be retrieved.
flags - the constants which reflect the status of the object.
Returns:
the name of the image file containing the icon for the object.
Since:
v4r4m0
See Also:
ItemIdentifier

getColumnInfo

public ColumnDescriptor[] getColumnInfo()
Returns the column headings for this list. This method is called after the list has been successfully opened.
Returns:
an array of ColumnDescriptor objects that describe the column headings for this list.
Since:
v4r4m0
See Also:
ColumnDescriptor

getColumnData

public java.lang.String getColumnData(ItemIdentifier item,
                                      int columnID)
Returns the data for a list column.

This method is called repeatedly when populating the view of a container. Long running operations should be avoided.

Parameters:
item - the item identifier for the object whose column data is to be retrieved.
columnID - the numeric ID that identifies the column.
Returns:
the data for the specified column converted to a String.
Since:
v4r4m0
See Also:
ItemIdentifier

getListObject

public java.lang.Object getListObject(ObjectName objName)
Returns a cached list object. This method is called when another interface implementation requires access to the proxy object that represents a resource on the system being managed.
Parameters:
objName - the name of the object for which a proxy will be retrieved.
Returns:
the cached proxy object.
Since:
v4r4m0

close

public void close()
Frees all list resources. This method is called when the user closes a view of a container, or when a refresh of the container's contents is requested. Once it has been called, getStatus should return a value of LIST_CLOSED.
Since:
v4r4m0
See Also:
ObjectName

prepareToExit

public void prepareToExit()
Provides notification that the application is terminating. This method is called when the user closes the application. It provides the implementation with the opportunity to clean up any connection handles and save any persistent data.
Since:
v4r4m0