Package com.hellosign.sdk.resource
Class AbstractResourceList<E>
- java.lang.Object
-
- com.hellosign.sdk.resource.AbstractResource
-
- com.hellosign.sdk.resource.AbstractResourceList<E>
-
- All Implemented Interfaces:
java.lang.Iterable<E>
- Direct Known Subclasses:
ApiAppList,SignatureRequestList,TemplateList
public abstract class AbstractResourceList<E> extends AbstractResource implements java.lang.Iterable<E>
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringLIST_INFOstatic java.lang.StringNUM_PAGESstatic java.lang.StringNUM_RESULTSstatic java.lang.StringPAGEstatic java.lang.StringPAGE_SIZE-
Fields inherited from class com.hellosign.sdk.resource.AbstractResource
dataObj, warnings
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedAbstractResourceList(org.json.JSONObject json, java.lang.String listKey)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.List<E>filterCurrentPageBy(java.lang.String columnName, java.io.Serializable filterValue)Filters the current page of results by the given column and value.java.util.List<E>getCurrentPageList()Returns the current page of results for this list object.java.lang.IntegergetNumPages()java.lang.IntegergetNumResults()java.lang.IntegergetPage()java.lang.IntegergetPageSize()java.util.Iterator<E>iterator()-
Methods inherited from class com.hellosign.sdk.resource.AbstractResource
add, addToList, clearList, get, getBoolean, getConstructor, getDate, getInteger, getJSONObject, getList, getList, getLong, getString, getWarnings, has, hasString, set, toString, toString
-
-
-
-
Field Detail
-
LIST_INFO
public static final java.lang.String LIST_INFO
- See Also:
- Constant Field Values
-
PAGE
public static final java.lang.String PAGE
- See Also:
- Constant Field Values
-
NUM_PAGES
public static final java.lang.String NUM_PAGES
- See Also:
- Constant Field Values
-
NUM_RESULTS
public static final java.lang.String NUM_RESULTS
- See Also:
- Constant Field Values
-
PAGE_SIZE
public static final java.lang.String PAGE_SIZE
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
AbstractResourceList
protected AbstractResourceList(org.json.JSONObject json, java.lang.String listKey) throws HelloSignException- Throws:
HelloSignException
-
-
Method Detail
-
getPage
public java.lang.Integer getPage()
-
getNumPages
public java.lang.Integer getNumPages()
-
getNumResults
public java.lang.Integer getNumResults()
-
getPageSize
public java.lang.Integer getPageSize()
-
iterator
public java.util.Iterator<E> iterator()
- Specified by:
iteratorin interfacejava.lang.Iterable<E>
-
getCurrentPageList
public java.util.List<E> getCurrentPageList() throws HelloSignException
Returns the current page of results for this list object.- Returns:
- List
- Throws:
HelloSignException- thrown if the list cannot be generated
-
filterCurrentPageBy
public java.util.List<E> filterCurrentPageBy(java.lang.String columnName, java.io.Serializable filterValue)
Filters the current page of results by the given column and value.- Parameters:
columnName- String column name to filter byfilterValue- Serializable matching value- Returns:
- List results
-
-