@Deprecated public final class DefaultItemProvider extends java.lang.Object implements ResultSetProvider<Item>
A default item provider for Service Discovery. When items are requested via Service Discovery, this class provides the items and if requested with Result Set Management, it also takes care of providing the correct number of items or the total count of items.
This class is a view on a collection, if the underlying collection changes, the view on the collection will yield different results.
| Constructor and Description |
|---|
DefaultItemProvider(java.util.Collection<Item> items)
Deprecated.
|
| Modifier and Type | Method and Description |
|---|---|
int |
getItemCount()
Deprecated.
Gets the total item count.
|
java.util.List<Item> |
getItems()
Deprecated.
Gets all items.
|
java.util.List<Item> |
getItems(int index,
int maxSize)
Deprecated.
Gets the items in a specific range (by index).
|
java.util.List<Item> |
getItemsAfter(java.lang.String itemId,
int maxSize)
Deprecated.
Gets the items after a specific item, which is determined by an item id.
|
java.util.List<Item> |
getItemsBefore(java.lang.String itemId,
int maxSize)
Deprecated.
Gets the items before a specific item, which is determined by an item id.
|
int |
indexOf(java.lang.String itemId)
Deprecated.
Gets the index of a specific item.
|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitforItemspublic DefaultItemProvider(java.util.Collection<Item> items)
public java.util.List<Item> getItems()
ResultSetProviderGets all items. This method is called, if no result set management was included in the query.
getItems in interface ResultSetProvider<Item>public int getItemCount()
ResultSetProviderGets the total item count.
getItemCount in interface ResultSetProvider<Item>public java.util.List<Item> getItems(int index, int maxSize)
ResultSetProviderGets the items in a specific range (by index).
getItems in interface ResultSetProvider<Item>index - The index.maxSize - The maximal size of items.public java.util.List<Item> getItemsAfter(java.lang.String itemId, int maxSize)
ResultSetProviderGets the items after a specific item, which is determined by an item id.
getItemsAfter in interface ResultSetProvider<Item>itemId - The item id.maxSize - The maximal size of items.public java.util.List<Item> getItemsBefore(java.lang.String itemId, int maxSize)
ResultSetProviderGets the items before a specific item, which is determined by an item id.
getItemsBefore in interface ResultSetProvider<Item>itemId - The item id.maxSize - The maximal size of items.public int indexOf(java.lang.String itemId)
ResultSetProviderGets the index of a specific item.
indexOf in interface ResultSetProvider<Item>itemId - The item id.Copyright © 2014–2019 XMPP.rocks. All rights reserved.