E
- The generic type.public class ResourceList<E>
extends java.util.ArrayList<E>
Modifier and Type | Field and Description |
---|---|
protected java.lang.Class<E> |
clazz |
protected java.lang.String |
firstLink |
protected int |
index |
protected java.lang.String |
nextLink |
protected int |
page |
protected java.lang.String |
previousLink |
protected java.lang.String |
resourceUri |
protected int |
size |
Constructor and Description |
---|
ResourceList(int page,
int size,
java.lang.String resourceUri,
java.lang.Class<E> clazz) |
ResourceList(java.lang.String resourceUri,
java.lang.Class<E> clazz) |
Modifier and Type | Method and Description |
---|---|
Client |
getClient() |
java.lang.String |
getFirstLink() |
java.lang.String |
getNextLink() |
protected void |
getNextPage()
This method updates the page value, creates the params for the API call and clears the current list
|
protected void |
getPage(org.json.simple.JSONObject params)
This method makes the API call to get the list value for the specified resource.
|
java.lang.String |
getPreviousLink() |
RestResponse |
getResponse() |
void |
initialize()
initializes ArrayList with first page from BW API
|
java.util.Iterator<E> |
iterator()
Customer iterator calls out to BW API when there is more data to retrieve
|
java.util.ListIterator<E> |
listIterator() |
java.util.ListIterator<E> |
listIterator(int index) |
void |
setClient(Client client) |
void |
setFirstLink(java.lang.String firstLink) |
void |
setNextLink(java.lang.String nextLink) |
void |
setPreviousLink(java.lang.String previousLink) |
void |
setResponse(RestResponse response) |
add, add, addAll, addAll, clear, clone, contains, ensureCapacity, forEach, get, indexOf, isEmpty, lastIndexOf, remove, remove, removeAll, removeIf, removeRange, replaceAll, retainAll, set, size, sort, spliterator, subList, toArray, toArray, trimToSize
protected int page
protected int size
protected int index
protected java.lang.String previousLink
protected java.lang.String nextLink
protected java.lang.String firstLink
protected java.lang.Class<E> clazz
protected java.lang.String resourceUri
public ResourceList(java.lang.String resourceUri, java.lang.Class<E> clazz)
public ResourceList(int page, int size, java.lang.String resourceUri, java.lang.Class<E> clazz)
public void initialize()
public java.util.Iterator<E> iterator()
protected void getNextPage()
protected void getPage(org.json.simple.JSONObject params)
params
- the paramspublic java.util.ListIterator<E> listIterator()
public java.util.ListIterator<E> listIterator(int index)
public java.lang.String getPreviousLink()
public void setPreviousLink(java.lang.String previousLink)
public java.lang.String getNextLink()
public void setNextLink(java.lang.String nextLink)
public java.lang.String getFirstLink()
public void setFirstLink(java.lang.String firstLink)
public RestResponse getResponse()
public void setResponse(RestResponse response)
public Client getClient()
public void setClient(Client client)
Copyright © 2019. All Rights Reserved.