Package com.testdroid.api
Class APIListResource<T extends APIEntity>
- java.lang.Object
-
- com.testdroid.api.APIListResource<T>
-
public class APIListResource<T extends APIEntity> extends java.lang.Object
- Author:
- Ćukasz Kajda
, Slawomir Pawluk
-
-
Constructor Summary
Constructors Constructor Description APIListResource(APIClient client, java.lang.String resourceURI, Context<T> context)
APIListResource(APIClient client, java.lang.String resourceURI, java.lang.Class<T> type)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description APIList<T>
getEntity()
APIListResource<T>
getNext()
Returns resource with next page of items in that list.APIListResource<T>
getPrevious()
Returns resource with previous page of items in that list.java.lang.Integer
getTotal()
Returns total number of available items in this resource list.
-
-
-
Method Detail
-
getEntity
public APIList<T> getEntity() throws APIException
- Throws:
APIException
-
getTotal
public java.lang.Integer getTotal() throws APIException
Returns total number of available items in this resource list.- Throws:
APIException
- on any API errors.
-
getNext
public APIListResource<T> getNext() throws APIException
Returns resource with next page of items in that list. Should check withisNextAvailable()
before calling this method. If no next page is available, returnsnull
.- Throws:
APIException
- on any API errors.
-
getPrevious
public APIListResource<T> getPrevious() throws APIException
Returns resource with previous page of items in that list. Should check withisPreviousAvailable()
before calling this method. If no previous page is available, returnsnull
.- Throws:
APIException
- on any API errors.
-
-