public class BufferedResourceList extends ResourceList
ResourceList
class which manages a list of resources and buffers them efficiently.
This class is intended to be extended and customized by subclasses.
The list is retrieved in pages, and each page contains multiple
resources (those which make up the list). The higher that page size, the
more resources are retrieved at once. While the page size does not
affect functionality of the list, it may influence performance. For
instance, setting the page size to match the number of rows presented
in a GUI or servlet may improve overall response time. Call
the setPageSize()
method to set a specific
page size.
Constructor and Description |
---|
BufferedResourceList()
Deprecated.
Constructs a BufferedResourceList object.
|
BufferedResourceList(Presentation presentation,
ResourceMetaData[] attributeMetaData,
ResourceMetaData[] selectionMetaData,
ResourceMetaData[] sortMetaData)
Deprecated.
Constructs a BufferedResourceList object.
|
Modifier and Type | Method and Description |
---|---|
void |
close()
Deprecated.
Closes the list.
|
protected void |
fireResourceAdded(Resource resource,
long index)
Deprecated.
Fires a resourceAdded() ResourceListEvent.
|
int |
getNumberOfPages()
Deprecated.
Returns the number of pages in the list buffer.
|
int |
getPageSize()
Deprecated.
Returns the page size of the list buffer.
|
boolean |
isResourceAvailable(long index)
Deprecated.
Indicates if the resource is available.
|
void |
open()
Deprecated.
Opens the list.
|
void |
refreshContents()
Deprecated.
Refreshes the contents of the list.
|
Resource |
resourceAt(long index)
Deprecated.
Returns the resource specified by the index.
|
void |
setNumberOfPages(int numberOfPages)
Deprecated.
Sets the number of pages in the list buffer.
|
void |
setPageSize(int pageSize)
Deprecated.
Sets the page size of the list buffer.
|
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, isBidiEnabled, isComplete, isConnectionEstablished, isInError, isOpen, refreshStatus, removeActiveStatusListener, removePropertyChangeListener, removeResourceListListener, removeVetoableChangeListener, resources, setAttributeMetaData, setPresentation, setSelectionValue, setSelectionValue, setSortOrder, setSortValue, setSystem, toString, waitForComplete, waitForResource
public BufferedResourceList()
public BufferedResourceList(Presentation presentation, ResourceMetaData[] attributeMetaData, ResourceMetaData[] selectionMetaData, ResourceMetaData[] sortMetaData)
presentation
- The presentation.attributeMetaData
- The attribute meta data, or null if not applicable.selectionMetaData
- The selection meta data, or null if not applicable.sortMetaData
- The sort meta data, or null if not applicable.public void close() throws ResourceException
close
in class ResourceList
ResourceException
- If an error occurs.protected void fireResourceAdded(Resource resource, long index)
fireResourceAdded
in class ResourceList
resource
- The resource.index
- The index.public int getNumberOfPages()
public int getPageSize()
public boolean isResourceAvailable(long index) throws ResourceException
isResourceAvailable
in class ResourceList
index
- The index.ResourceException
- If an error occurs.public void open() throws ResourceException
open
in class ResourceList
ResourceException
- If an error occurs.public void refreshContents() throws ResourceException
This will implicitly open the list if needed.
refreshContents
in class ResourceList
ResourceException
- If an error occurs.public Resource resourceAt(long index) throws ResourceException
This will implicitly open the list if needed.
resourceAt
in class ResourceList
index
- The index.ResourceException
- If an error occurs.public void setNumberOfPages(int numberOfPages)
numberOfPages
- The number of pages.public void setPageSize(int pageSize)
pageSize
- The page size, in number of resources.