Package com.testdroid.api
Class APIList<T extends APIEntity>
java.lang.Object
com.testdroid.api.APIEntity
com.testdroid.api.APIList<T>
- Author:
- Ćukasz Kajda <[email protected]>
-
Field Summary
Fields inherited from class com.testdroid.api.APIEntity
client, id, OBJECT_MAPPER, parentId, selfURI, XML_MAPPER
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected <S extends APIEntity>
voidclone
(S from) static String
filterParam
(List<FilterEntry> filters) get
(int index) getData()
Get found data of the list.getLimit()
Get limit of data page returned ingetData()
method.getNext()
Get full URL of the next page of the collection.Get offset of data page returned ingetData()
method.Get full URL of the previous page of the collection.Get search phrase used during retrieving data returned ingetData()
method.getSort()
Get serialized sort value used during retrieving data returned ingetData()
method.getTotal()
Get total number of items to be returned - independent from paging.boolean
isEmpty()
void
refresh()
void
setContext
(Context<T> context) void
void
void
void
void
setPrevious
(String previous) void
void
void
Methods inherited from class com.testdroid.api.APIEntity
cloneBase, createUri, deleteResource, getFile, getId, getListResource, getListResource, getParentId, getResource, getSelfURI, postFile, postResource, setId, setSelfURI, toJson
-
Constructor Details
-
APIList
public APIList() -
APIList
-
-
Method Details
-
getNext
Get full URL of the next page of the collection. Simple call it to fetch next items. -
setNext
-
getNextItems
- Throws:
APIException
-
getPreviousItems
- Throws:
APIException
-
getPrevious
Get full URL of the previous page of the collection. Simple call it to fetch previous items. -
setPrevious
-
getData
Get found data of the list. List contains only set of items contrained withoffset
,limit
andsearch
. -
setData
-
get
-
isEmpty
public boolean isEmpty() -
getOffset
Get offset of data page returned ingetData()
method. -
setOffset
-
getLimit
Get limit of data page returned ingetData()
method. -
setLimit
-
getTotal
Get total number of items to be returned - independent from paging. -
setTotal
-
getSearch
Get search phrase used during retrieving data returned ingetData()
method. -
setSearch
-
getSort
Get serialized sort value used during retrieving data returned ingetData()
method. -
setSort
-
setContext
-
getContext
-
refresh
- Overrides:
refresh
in classAPIEntity
- Throws:
APIException
-
filterParam
-
clone
-