Class EthosProxyClient<T>
- java.lang.Object
-
- com.ellucian.ethos.integration.client.EthosClient
-
- com.ellucian.ethos.integration.client.proxy.EthosProxyClient<T>
-
- Direct Known Subclasses:
EthosFilterQueryClient
,EthosProxyClientAsync
public class EthosProxyClient<T> extends EthosClient
An EthosClient used to retrieve data from the Ethos Integration Proxy API.Supports (but not limited to) the following functionality:
- Getting data for a given Ethos/BPAPI resource
- Getting an Ethos resource by ID (GUID)
- Getting the page size and/or total count for a resource
- Paging support when multiple resources are retrieved
- Making POST/PUT requests for adding or updating data through Ethos Integration.
Supports paging for data in the following formats:
List<EthosResponse>
a list of EthosResponse objects containing response bodies as JSON formatted stringsList<EthosResponse>
a list of EthosResponse objects containing response bodies as generic type objects (POJOs/Java Beans)List<String>
a list of StringsList<JsonNode>
a list of Jackson JsonNode objects
Note that the preferred way to instantiate this class is through the
EthosClientBuilder
.NOTE: None of the methods in this class should be used to bulk load Ethos data. Such is NOT the intent of this SDK. It is possible that long running process times could result and/or
OutOfMemoryError
s could occur if trying to get a large quantity of data. Instead, the Ethos bulk loading solution should be used for loading data in Ethos data model format in bulk.- Since:
- 0.0.1
- Author:
- David Kumar
-
-
Field Summary
Fields Modifier and Type Field Description static int
DEFAULT_MAX_PAGE_SIZE
The value used for the max page size if the max page size header is not found in the response.static int
DEFAULT_PAGE_SIZE
A default value used for the page size if no page size is specified.static String
DEFAULT_VERSION
The default version used if no version is specified.protected EthosRequestConverter<T>
ethosRequestConverter
TheEthosRequestConverter
used to convert generic typed objects into JSON formatted strings for request bodies.protected EthosResponseConverter
ethosResponseConverter
TheEthosResponseConverter
used to convert EthosResponses into other supported formats (Strings and JsonNodes).static String
HDR_APPLICATION_CONTEXT
Response header for the application designation in Ethos Integration.static String
HDR_CONTENT_TYPE
Response header for the content-type.static String
HDR_DATE
Response header for the current date of the response.static String
HDR_HEDTECH_ETHOS_INTEGRATION_APPLICATION_ID
Response header for the application ID of the application used in Ethos Integration.static String
HDR_HEDTECH_ETHOS_INTEGRATION_APPLICATION_NAME
Response header for the application name of the application used in Ethos Integration.static String
HDR_X_CONTENT_RESTRICTED
Response header for content restricted.static String
HDR_X_MAX_PAGE_SIZE
Response header for the max page size.static String
HDR_X_MEDIA_TYPE
Response header for the version of the Ethos resource (data-model).static String
HDR_X_TOTAL_COUNT
Response header for the total count (total number of rows) for the given resource.-
Fields inherited from class com.ellucian.ethos.integration.client.EthosClient
ethosResponseBuilder, httpProtocolClientBuilder, responseHandler, token
-
-
Constructor Summary
Constructors Constructor Description EthosProxyClient(String apiKey, Integer connectionTimeout, Integer connectionRequestTimeout, Integer socketTimeout)
Instantiates this class using the given API key.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected Map<String,String>
buildHeadersMap(String version)
Intended to be used internally by the SDK.protected EthosResponse
convertResponseContentToType(EthosResponse ethosResponse, Class classType)
Converts the response body content within the given EthosResponse to an object of the given class type.protected EthosResponse
convertResponseContentToTypedList(EthosResponse ethosResponse, Class classType)
Converts the response body content within the given EthosResponse to a list of objects of the given class type.protected List<EthosResponse>
convertResponsesContentToTypedList(List<EthosResponse> ethosResponseList, Class classType)
Converts the response body content of each EthosResponse within the given ethosResponseList to a list of objects of the given class type.void
delete(String resourceName, String id)
Deletes an instance of the given resource by the given id.protected List<EthosResponse>
doPagingForAll(String resourceName, String version, int totalCount, int pageSize)
Intended to be used internally within the SDK.protected List<EthosResponse>
doPagingForNumPages(String resourceName, String version, int totalCount, int pageSize, int numPages)
Intended to be used internally within the SDK.protected List<EthosResponse>
doPagingForNumRows(String resourceName, String version, int totalCount, int pageSize, int numRows)
Intended to be used internally within the SDK.protected List<EthosResponse>
doPagingFromOffset(String resourceName, String version, String filter, int totalCount, int pageSize, int offset)
Intended to be used internally within the SDK.protected List<EthosResponse>
doPagingFromOffsetForNumPages(String resourceName, String version, int totalCount, int pageSize, int numPages, int offset)
Intended to be used internally within the SDK.protected List<EthosResponse>
doPagingFromOffsetForNumRows(String resourceName, String version, int totalCount, int pageSize, int offset, int numRows)
Intended to be used internally within the SDK.EthosResponse
get(String resourceName)
Gets a page of resource data for the given resource by name.EthosResponse
get(String resourceName, int offset, int pageSize)
Gets a page of data for the given resource by name, offset, and pageSize.EthosResponse
get(String resourceName, int offset, int pageSize, Class classType)
Gets a page of data for the given resource by name, offset, and pageSize.EthosResponse
get(String resourceName, Class classType)
Gets a page of resource data for the given resource by name.EthosResponse
get(String resourceName, String version)
Gets a page of data for the given resource by name and version.EthosResponse
get(String resourceName, String version, int offset, int pageSize)
Gets a page of data for the given resource by name, version, offset, and pageSize.EthosResponse
get(String resourceName, String version, int offset, int pageSize, Class classType)
Gets a page of data for the given resource by name, version, offset, and pageSize.EthosResponse
get(String resourceName, String version, Class classType)
Gets a page of resource data for the given resource by name.List<EthosResponse>
getAllPages(String resourceName)
Gets all pages for the given resource.List<EthosResponse>
getAllPages(String resourceName, int pageSize)
Gets all pages for the given resource and page size.List<EthosResponse>
getAllPages(String resourceName, int pageSize, Class classType)
Gets all pages for the given resource and page size.List<EthosResponse>
getAllPages(String resourceName, Class classType)
Gets all pages for the given resource.List<EthosResponse>
getAllPages(String resourceName, String version)
Gets all pages for the given resource and version.List<EthosResponse>
getAllPages(String resourceName, String version, int pageSize)
Gets all pages for the given resource, version, and page size.List<EthosResponse>
getAllPages(String resourceName, String version, int pageSize, Class classType)
Gets all pages for the given resource, version, and page size.List<EthosResponse>
getAllPages(String resourceName, String version, Class classType)
Gets all pages for the given resource and version.List<com.fasterxml.jackson.databind.JsonNode>
getAllPagesAsJsonNodes(String resourceName)
Gets all pages for the given resource.List<com.fasterxml.jackson.databind.JsonNode>
getAllPagesAsJsonNodes(String resourceName, int pageSize)
Gets all pages for the given resource and page size.List<com.fasterxml.jackson.databind.JsonNode>
getAllPagesAsJsonNodes(String resourceName, String version)
Gets all pages for the given resource and version.List<com.fasterxml.jackson.databind.JsonNode>
getAllPagesAsJsonNodes(String resourceName, String version, int pageSize)
Gets all pages for the given resource, version, and page size.List<String>
getAllPagesAsStrings(String resourceName)
Gets all pages for the given resource.List<String>
getAllPagesAsStrings(String resourceName, int pageSize)
Gets all pages for the given resource and page size.List<String>
getAllPagesAsStrings(String resourceName, String version)
Gets all pages for the given resource and version.List<String>
getAllPagesAsStrings(String resourceName, String version, int pageSize)
Gets all pages for the given resource, version, and page size.List<EthosResponse>
getAllPagesFromOffset(String resourceName, int offset)
Gets all pages for the given resource from the given offset.List<EthosResponse>
getAllPagesFromOffset(String resourceName, int offset, int pageSize)
Gets all pages for the given resource, offset, and page size.List<EthosResponse>
getAllPagesFromOffset(String resourceName, int offset, int pageSize, Class classType)
Gets all pages for the given resource, offset, and page size.List<EthosResponse>
getAllPagesFromOffset(String resourceName, int offset, Class classType)
Gets all pages for the given resource from the given offset.List<EthosResponse>
getAllPagesFromOffset(String resourceName, String version, int offset)
Gets all pages for the given resource, version, and offset.List<EthosResponse>
getAllPagesFromOffset(String resourceName, String version, int offset, int pageSize)
Gets all pages for the given resource, version, and page size, from the offset.List<EthosResponse>
getAllPagesFromOffset(String resourceName, String version, int offset, int pageSize, Class classType)
Gets all pages for the given resource, version, and page size, from the offset.List<EthosResponse>
getAllPagesFromOffset(String resourceName, String version, int offset, Class classType)
Gets all pages for the given resource, version, and offset.List<com.fasterxml.jackson.databind.JsonNode>
getAllPagesFromOffsetAsJsonNodes(String resourceName, int offset)
Gets all pages for the given resource from the given offset.List<com.fasterxml.jackson.databind.JsonNode>
getAllPagesFromOffsetAsJsonNodes(String resourceName, int offset, int pageSize)
Gets all pages for the given resource and page size from the given offset.List<com.fasterxml.jackson.databind.JsonNode>
getAllPagesFromOffsetAsJsonNodes(String resourceName, String version, int offset)
Gets all pages for the given resource and version from the given offset.List<com.fasterxml.jackson.databind.JsonNode>
getAllPagesFromOffsetAsJsonNodes(String resourceName, String version, int offset, int pageSize)
Gets all pages for the given resource, version, and page size, from the given offset.List<String>
getAllPagesFromOffsetAsStrings(String resourceName, int offset)
Gets all pages for the given resource from the given offset.List<String>
getAllPagesFromOffsetAsStrings(String resourceName, int offset, int pageSize)
Gets all pages for the given resource from the given offset with the given page size.List<String>
getAllPagesFromOffsetAsStrings(String resourceName, String version, int offset)
Gets all pages for the given resource and version from the given offset.List<String>
getAllPagesFromOffsetAsStrings(String resourceName, String version, int offset, int pageSize)
Gets all pages for the given resource, version, and page size from the given offset.com.fasterxml.jackson.databind.JsonNode
getAsJsonNode(String resourceName)
Gets resource data for the given resource by name.com.fasterxml.jackson.databind.JsonNode
getAsJsonNode(String resourceName, int offset, int pageSize)
Gets a page of data for the given resource by name, offset, and pageSize.com.fasterxml.jackson.databind.JsonNode
getAsJsonNode(String resourceName, String version)
Gets data for the given resource by name and version.com.fasterxml.jackson.databind.JsonNode
getAsJsonNode(String resourceName, String version, int offset, int pageSize)
Gets a page of data for the given resource by name, version, offset, and pageSize.String
getAsString(String resourceName)
Gets a page of resource data for the given resource by name.String
getAsString(String resourceName, int offset, int pageSize)
Gets a page of data for the given resource by name, offset, and pageSize.String
getAsString(String resourceName, String version)
Gets a page of data for the given resource by name and version.String
getAsString(String resourceName, String version, int offset, int pageSize)
Gets a page of data for the given resource by name, version, offset, and pageSize.EthosResponse
getById(String resourceName, String id)
Gets a resource by ID (GUID) for the given resource name.EthosResponse
getById(String resourceName, String id, Class classType)
Gets a resource by ID (GUID) for the given resource name.EthosResponse
getById(String resourceName, String id, String version)
Gets a resource by ID (GUID) for the given resource name and version.EthosResponse
getById(String resourceName, String id, String version, Class classType)
Gets a resource by ID (GUID) for the given resource name and version.com.fasterxml.jackson.databind.JsonNode
getByIdAsJsonNode(String resourceName, String id)
Gets a resource by ID (GUID) for the given resource name.com.fasterxml.jackson.databind.JsonNode
getByIdAsJsonNode(String resourceName, String id, String version)
Gets a resource by ID (GUID) for the given resource name and version.String
getByIdAsString(String resourceName, String id)
Gets a resource by ID (GUID) for the given resource name.String
getByIdAsString(String resourceName, String id, String version)
Gets a resource by ID (GUID) for the given resource name and version.protected List<EthosResponse>
getDataFromInitialContent(Pager pager)
Intended to be used internally within the SDK.protected List<EthosResponse>
getDataFromPaging(Pager pager)
Intended to be used internally within the SDK.EthosResponse
getFromOffset(String resourceName, int offset)
Gets a page of data for the given resource by name and from the given offset index.EthosResponse
getFromOffset(String resourceName, int offset, Class classType)
Gets a page of data for the given resource by name and from the given offset index.EthosResponse
getFromOffset(String resourceName, String version, int offset)
Gets a page of data for the given resource by name and version, from the given offset index.EthosResponse
getFromOffset(String resourceName, String version, int offset, Class classType)
Gets a page of data for the given resource by name and version, from the given offset index.com.fasterxml.jackson.databind.JsonNode
getFromOffsetAsJsonNode(String resourceName, int offset)
Gets a page of data for the given resource by name and from the given offset index.com.fasterxml.jackson.databind.JsonNode
getFromOffsetAsJsonNode(String resourceName, String version, int offset)
Gets a page of data for the given resource by name and version, from the given offset index.String
getFromOffsetAsString(String resourceName, int offset)
Gets a page of data for the given resource by name and from the given offset index.String
getFromOffsetAsString(String resourceName, String version, int offset)
Gets a page of data for the given resource by name and version, from the given offset index.protected String
getHeaderValue(EthosResponse ethosResponse, String headerName)
Intended to be used internally within the SDK.int
getMaxPageSize(String resourceName)
Gets the max page size for the given Ethos resource.int
getMaxPageSize(String resourceName, String version)
Gets the max page size for the given Ethos resource and version.protected int
getMaxPageSize(String resourceName, String version, EthosResponse ethosResponse)
Intended to be used internally within the SDK.List<EthosResponse>
getPages(String resourceName, int numPages)
Gets some number of pages for the given resource.List<EthosResponse>
getPages(String resourceName, int pageSize, int numPages)
Gets some number of pages for the given resource and page size.List<EthosResponse>
getPages(String resourceName, int pageSize, int numPages, Class classType)
Gets some number of pages for the given resource and page size.List<EthosResponse>
getPages(String resourceName, int numPages, Class classType)
Gets some number of pages for the given resource.List<EthosResponse>
getPages(String resourceName, String version, int numPages)
Gets some number of pages for the given resource and version.List<EthosResponse>
getPages(String resourceName, String version, int pageSize, int numPages)
Gets some number of pages for the given resource, version, and page size.List<EthosResponse>
getPages(String resourceName, String version, int pageSize, int numPages, Class classType)
Gets some number of pages for the given resource, version, and page size.List<EthosResponse>
getPages(String resourceName, String version, int numPages, Class classType)
Gets some number of pages for the given resource and version.List<com.fasterxml.jackson.databind.JsonNode>
getPagesAsJsonNodes(String resourceName, int numPages)
Gets some number of pages for the given resource.List<com.fasterxml.jackson.databind.JsonNode>
getPagesAsJsonNodes(String resourceName, int pageSize, int numPages)
Gets some number of pages for the given resource and page size.List<com.fasterxml.jackson.databind.JsonNode>
getPagesAsJsonNodes(String resourceName, String version, int numPages)
Gets some number of pages for the given resource and version.List<com.fasterxml.jackson.databind.JsonNode>
getPagesAsJsonNodes(String resourceName, String version, int pageSize, int numPages)
Gets some number of pages for the given resource, version, and page size.List<String>
getPagesAsStrings(String resourceName, int numPages)
Gets some number of pages for the given resource.List<String>
getPagesAsStrings(String resourceName, int pageSize, int numPages)
Gets some number of pages for the given resource and page size.List<String>
getPagesAsStrings(String resourceName, String version, int numPages)
Gets some number of pages for the given resource.List<String>
getPagesAsStrings(String resourceName, String version, int pageSize, int numPages)
Gets some number of pages for the given resource, version, and page size.List<EthosResponse>
getPagesFromOffset(String resourceName, int offset, int numPages)
Gets some number of pages for the given resource from the given offset.List<EthosResponse>
getPagesFromOffset(String resourceName, int pageSize, int offset, int numPages)
Gets some number of pages for the given resource and page size from the given offset.List<EthosResponse>
getPagesFromOffset(String resourceName, int pageSize, int offset, int numPages, Class classType)
Gets some number of pages for the given resource and page size from the given offset.List<EthosResponse>
getPagesFromOffset(String resourceName, int offset, int numPages, Class classType)
Gets some number of pages for the given resource from the given offset.List<EthosResponse>
getPagesFromOffset(String resourceName, String version, int offset, int numPages)
Gets some number of pages for the given resource and version from the given offset.List<EthosResponse>
getPagesFromOffset(String resourceName, String version, int pageSize, int offset, int numPages)
Gets some number of pages for the given resource, version, and page size, from the given offset.List<EthosResponse>
getPagesFromOffset(String resourceName, String version, int pageSize, int offset, int numPages, Class classType)
Gets some number of pages for the given resource, version, and page size, from the given offset.List<EthosResponse>
getPagesFromOffset(String resourceName, String version, int offset, int numPages, Class classType)
Gets some number of pages for the given resource and version from the given offset.List<com.fasterxml.jackson.databind.JsonNode>
getPagesFromOffsetAsJsonNodes(String resourceName, int offset, int numPages)
Gets some number of pages for the given resource from the given offset.List<com.fasterxml.jackson.databind.JsonNode>
getPagesFromOffsetAsJsonNodes(String resourceName, int pageSize, int offset, int numPages)
Gets some number of pages for the given resource and page size, from the given offset.List<com.fasterxml.jackson.databind.JsonNode>
getPagesFromOffsetAsJsonNodes(String resourceName, String version, int offset, int numPages)
Gets some number of pages for the given resource and version, from the given offset.List<com.fasterxml.jackson.databind.JsonNode>
getPagesFromOffsetAsJsonNodes(String resourceName, String version, int pageSize, int offset, int numPages)
Gets some number of pages for the given resource, version, and page size, from the given offset.List<String>
getPagesFromOffsetAsStrings(String resourceName, int offset, int numPages)
Gets some number of pages for the given resource from the given offset.List<String>
getPagesFromOffsetAsStrings(String resourceName, int pageSize, int offset, int numPages)
Gets some number of pages for the given resource and page size from the given offset.List<String>
getPagesFromOffsetAsStrings(String resourceName, String version, int offset, int numPages)
Gets some number of pages for the given resource and version from the given offset.List<String>
getPagesFromOffsetAsStrings(String resourceName, String version, int pageSize, int offset, int numPages)
Gets some number of pages for the given resource, version, and page size, from the given offset.int
getPageSize(String resourceName)
Gets the page size for the given Ethos resource.int
getPageSize(String resourceName, String version)
Gets the page size for the given Ethos resource and version.protected int
getPageSize(String resourceName, String version, EthosResponse ethosResponse)
Intended to be used internally within the SDK.List<EthosResponse>
getRows(String resourceName, int numRows)
Gets some number of rows for the given resource.List<EthosResponse>
getRows(String resourceName, int pageSize, int numRows)
Gets some number of rows for the given resource and page size.List<EthosResponse>
getRows(String resourceName, int pageSize, int numRows, Class classType)
Gets some number of rows for the given resource and page size.List<EthosResponse>
getRows(String resourceName, int numRows, Class classType)
Gets some number of rows for the given resource.List<EthosResponse>
getRows(String resourceName, String version, int numRows)
Gets some number of rows for the given resource and version.List<EthosResponse>
getRows(String resourceName, String version, int pageSize, int numRows)
Gets some number of rows for the given resource, version, and page size.List<EthosResponse>
getRows(String resourceName, String version, int pageSize, int numRows, Class classType)
Gets some number of rows for the given resource, version, and page size.List<EthosResponse>
getRows(String resourceName, String version, int numRows, Class classType)
Gets some number of rows for the given resource and version.List<com.fasterxml.jackson.databind.JsonNode>
getRowsAsJsonNodes(String resourceName, int numRows)
Gets some number of rows for the given resource.List<com.fasterxml.jackson.databind.JsonNode>
getRowsAsJsonNodes(String resourceName, int pageSize, int numRows)
Gets some number of rows for the given resource and page size.List<com.fasterxml.jackson.databind.JsonNode>
getRowsAsJsonNodes(String resourceName, String version, int numRows)
Gets some number of rows for the given resource and version.List<com.fasterxml.jackson.databind.JsonNode>
getRowsAsJsonNodes(String resourceName, String version, int pageSize, int numRows)
Gets some number of rows for the given resource, version, and page size.List<String>
getRowsAsStrings(String resourceName, int numRows)
Gets some number of rows for the given resource.List<String>
getRowsAsStrings(String resourceName, int pageSize, int numRows)
Gets some number of rows for the given resource and page size.List<String>
getRowsAsStrings(String resourceName, String version, int numRows)
Gets some number of rows for the given resource.List<String>
getRowsAsStrings(String resourceName, String version, int pageSize, int numRows)
Gets some number of rows for the given resource, version, and page size.List<EthosResponse>
getRowsFromOffset(String resourceName, int offset, int numRows)
Gets some number of rows for the given resource from the given offset.List<EthosResponse>
getRowsFromOffset(String resourceName, int pageSize, int offset, int numRows)
Gets some number of rows for the given resource and page size from the given offset.List<EthosResponse>
getRowsFromOffset(String resourceName, int pageSize, int offset, int numRows, Class classType)
Gets some number of rows for the given resource and page size from the given offset.List<EthosResponse>
getRowsFromOffset(String resourceName, int offset, int numRows, Class classType)
Gets some number of rows for the given resource from the given offset.List<EthosResponse>
getRowsFromOffset(String resourceName, String version, int offset, int numRows)
Gets some number of rows for the given resource and version from the given offset.List<EthosResponse>
getRowsFromOffset(String resourceName, String version, int pageSize, int offset, int numRows)
Gets some number of rows for the given resource, version, and page size, from the given offset.List<EthosResponse>
getRowsFromOffset(String resourceName, String version, int pageSize, int offset, int numRows, Class classType)
Gets some number of rows for the given resource, version, and page size, from the given offset.List<EthosResponse>
getRowsFromOffset(String resourceName, String version, int offset, int numRows, Class classType)
Gets some number of rows for the given resource and version from the given offset.List<com.fasterxml.jackson.databind.JsonNode>
getRowsFromOffsetAsJsonNodes(String resourceName, int offset, int numRows)
Gets some number of rows for the given resource from the given offset.List<com.fasterxml.jackson.databind.JsonNode>
getRowsFromOffsetAsJsonNodes(String resourceName, int pageSize, int offset, int numRows)
Gets some number of rows for the given resource and page size, from the given offset.List<com.fasterxml.jackson.databind.JsonNode>
getRowsFromOffsetAsJsonNodes(String resourceName, String version, int offset, int numRows)
Gets some number of rows for the given resource and version, from the given offset.List<com.fasterxml.jackson.databind.JsonNode>
getRowsFromOffsetAsJsonNodes(String resourceName, String version, int pageSize, int offset, int numRows)
Gets some number of rows for the given resource, version, and page size, from the given offset.List<String>
getRowsFromOffsetAsStrings(String resourceName, int offset, int numRows)
Gets some number of rows for the given resource from the given offset.List<String>
getRowsFromOffsetAsStrings(String resourceName, int pageSize, int offset, int numRows)
Gets some number of rows for the given resource and page size, from the given offset.List<String>
getRowsFromOffsetAsStrings(String resourceName, String version, int offset, int numRows)
Gets some number of rows for the given resource and version, from the given offset.List<String>
getRowsFromOffsetAsStrings(String resourceName, String version, int pageSize, int offset, int numRows)
Gets some number of rows for the given resource, version, and page size, from the given offset.int
getTotalCount(String resourceName)
Gets the total count of rows for the given Ethos resource.int
getTotalCount(String resourceName, String version)
Gets the total count of rows for the given Ethos resource and version.protected int
getTotalCount(String resourceName, String version, EthosResponse ethosResponse)
Intended to be used internally within the SDK.EthosResponse
getWithPageSize(String resourceName, int pageSize)
Gets a page of data for the given resource by name using the given page size.EthosResponse
getWithPageSize(String resourceName, int pageSize, Class classType)
Gets a page of data for the given resource by name using the given page size.EthosResponse
getWithPageSize(String resourceName, String version, int pageSize)
Gets a page of data for the given resource by name and version, using the given page size.EthosResponse
getWithPageSize(String resourceName, String version, int pageSize, Class classType)
Gets a page of data for the given resource by name and version, using the given page size.com.fasterxml.jackson.databind.JsonNode
getWithPageSizeAsJsonNode(String resourceName, int pageSize)
Gets a page of data for the given resource by name using the given page size.com.fasterxml.jackson.databind.JsonNode
getWithPageSizeAsJsonNode(String resourceName, String version, int pageSize)
Gets a page of data for the given resource by name and version, using the given page size.String
getWithPageSizeAsString(String resourceName, int pageSize)
Gets a page of data for the given resource by name using the given page size.String
getWithPageSizeAsString(String resourceName, String version, int pageSize)
Gets a page of data for the given resource by name and version, using the given page size.protected List<EthosResponse>
handlePaging(Pager pager)
Intended to be used internally within the SDK.protected boolean
needToPage(int pageSize, int totalCount)
Intended to be used internally within the SDK.protected boolean
needToPage(com.fasterxml.jackson.databind.JsonNode jsonNode, int totalCount)
Intended to be used internally within the SDK.protected boolean
needToPage(String proxyApiResponseBody, int totalCount)
Intended to be used internally within the SDK.EthosResponse
post(String resourceName, com.fasterxml.jackson.databind.JsonNode requestBodyNode)
Submits a POST request for the given resourceName with the given requestBodyNode.EthosResponse
post(String resourceName, String requestBody)
Submits a POST request for the given resourceName with the given requestBody.EthosResponse
post(String resourceName, String version, com.fasterxml.jackson.databind.JsonNode requestBodyNode)
Submits a POST request for the given resourceName with the given requestBodyNode, which is a JsonNode.EthosResponse
post(String resourceName, String version, String requestBody)
Submits a POST request for the given resourceName with the given requestBody.EthosResponse
post(String resourceName, String version, T genericTypeBody)
Submits a POST request for the given resourceName and version using the given genericTypeBody.EthosResponse
post(String resourceName, T genericTypeBody)
Submits a POST request for the given resourceName using the given genericTypeBody.protected Pager
prepareForPaging(Pager pager)
Intended to be used internally within the SDK.EthosResponse
put(String resourceName, String resourceId, com.fasterxml.jackson.databind.JsonNode requestBodyNode)
Submits a PUT request for the given resourceName to update a resource with the given requestBodyNode.EthosResponse
put(String resourceName, String resourceId, String requestBody)
Submits a PUT request for the given resourceName to update a resource with the given requestBody.EthosResponse
put(String resourceName, String resourceId, String version, com.fasterxml.jackson.databind.JsonNode requestBodyNode)
Submits a PUT request for the given resourceName to update a resource with the given requestBodyNode, which is a JsonNode.EthosResponse
put(String resourceName, String resourceId, String version, String requestBody)
Submits a PUT request for the given resourceName to update a resource with the given requestBody.EthosResponse
put(String resourceName, String resourceId, String version, T genericTypeBody)
Submits a PUT request for the given resourceName to update a resource with the given genericTypeBody.EthosResponse
put(String resourceName, String resourceId, T genericTypeBody)
Submits a PUT request for the given resourceName to update a resource with the given genericTypeBody.EthosResponse
put(String resourceName, T genericTypeBody)
Submits a PUT request for the given resourceName to update a resource with the given genericTypeBody.EthosResponse
put(T genericTypeBody, String resourceName, String version)
Submits a PUT request for the given resourceName to update a resource with the given genericTypeBody.protected Pager
shouldDoPaging(Pager pager, boolean forNumRows)
Intended to be used internally within the SDK.-
Methods inherited from class com.ellucian.ethos.integration.client.EthosClient
delete, get, getAccessToken, getAutoRefresh, getExpirationMinutes, getHttpClient, getRegion, head, post, put, setAutoRefresh, setExpirationMinutes, setRegion, submitRequest
-
-
-
-
Field Detail
-
DEFAULT_VERSION
public static final String DEFAULT_VERSION
The default version used if no version is specified.- See Also:
- Constant Field Values
-
DEFAULT_PAGE_SIZE
public static final int DEFAULT_PAGE_SIZE
A default value used for the page size if no page size is specified. The length of the response body will be used as the page size if this default value is used.- See Also:
- Constant Field Values
-
DEFAULT_MAX_PAGE_SIZE
public static final int DEFAULT_MAX_PAGE_SIZE
The value used for the max page size if the max page size header is not found in the response.- See Also:
- Constant Field Values
-
HDR_DATE
public static final String HDR_DATE
Response header for the current date of the response.- See Also:
- Constant Field Values
-
HDR_CONTENT_TYPE
public static final String HDR_CONTENT_TYPE
Response header for the content-type.- See Also:
- Constant Field Values
-
HDR_X_TOTAL_COUNT
public static final String HDR_X_TOTAL_COUNT
Response header for the total count (total number of rows) for the given resource.- See Also:
- Constant Field Values
-
HDR_APPLICATION_CONTEXT
public static final String HDR_APPLICATION_CONTEXT
Response header for the application designation in Ethos Integration.- See Also:
- Constant Field Values
-
HDR_X_MAX_PAGE_SIZE
public static final String HDR_X_MAX_PAGE_SIZE
Response header for the max page size. Specifies the maximum number of resources returned in a response.- See Also:
- Constant Field Values
-
HDR_X_MEDIA_TYPE
public static final String HDR_X_MEDIA_TYPE
Response header for the version of the Ethos resource (data-model).- See Also:
- Constant Field Values
-
HDR_X_CONTENT_RESTRICTED
public static final String HDR_X_CONTENT_RESTRICTED
Response header for content restricted.- See Also:
- Constant Field Values
-
HDR_HEDTECH_ETHOS_INTEGRATION_APPLICATION_ID
public static final String HDR_HEDTECH_ETHOS_INTEGRATION_APPLICATION_ID
Response header for the application ID of the application used in Ethos Integration.- See Also:
- Constant Field Values
-
HDR_HEDTECH_ETHOS_INTEGRATION_APPLICATION_NAME
public static final String HDR_HEDTECH_ETHOS_INTEGRATION_APPLICATION_NAME
Response header for the application name of the application used in Ethos Integration.- See Also:
- Constant Field Values
-
ethosResponseConverter
protected EthosResponseConverter ethosResponseConverter
TheEthosResponseConverter
used to convert EthosResponses into other supported formats (Strings and JsonNodes).
-
ethosRequestConverter
protected EthosRequestConverter<T> ethosRequestConverter
TheEthosRequestConverter
used to convert generic typed objects into JSON formatted strings for request bodies.
-
-
Constructor Detail
-
EthosProxyClient
public EthosProxyClient(String apiKey, Integer connectionTimeout, Integer connectionRequestTimeout, Integer socketTimeout)
Instantiates this class using the given API key.Note that the preferred way to get an instance of this class is through the
EthosClientBuilder
.- Parameters:
apiKey
- A valid API key from Ethos Integration. This is required to be a valid 36 character GUID string. If it is null, empty, or not in a valid GUID format, then anIllegalArgumentException
will be thrown.connectionTimeout
- The timeout in seconds for a connection to be established.connectionRequestTimeout
- The timeout in seconds when requesting a connection from the Apache connection manager.socketTimeout
- The timeout in seconds when waiting for data between consecutive data packets.
-
-
Method Detail
-
post
public EthosResponse post(String resourceName, String requestBody) throws IOException
Submits a POST request for the given resourceName with the given requestBody. Uses the default version. The requestBody should be a string in JSON format.- Parameters:
resourceName
- The name of the resource to add an instance of.requestBody
- The body of the request to POST for the given resource.- Returns:
- An EthosResponse containing the instance of the resource that was added by this POST operation.
- Throws:
IllegalArgumentException
- Thrown if the given resourceName or requestBody is null or blank.IOException
- Propagates this exception if it occurs when making the call in theEthosClient
.
-
post
public EthosResponse post(String resourceName, String version, String requestBody) throws IOException
Submits a POST request for the given resourceName with the given requestBody. The requestBody should be a string in JSON format.- Parameters:
resourceName
- The name of the resource to add an instance of.version
- The full version header value of the resource used for this POST request.requestBody
- The body of the request to POST for the given resource.- Returns:
- An EthosResponse containing the instance of the resource that was added by this POST operation.
- Throws:
IllegalArgumentException
- Thrown if the given resourceName or requestBody is null or blank.IOException
- Propagates this exception if it occurs when making the call in theEthosClient
.
-
post
public EthosResponse post(String resourceName, com.fasterxml.jackson.databind.JsonNode requestBodyNode) throws IOException
Submits a POST request for the given resourceName with the given requestBodyNode. Uses the default version. This is a convenience method equivalent topost(resourceName, requestBodyNode.toString())
.- Parameters:
resourceName
- The name of the resource to add an instance of.requestBodyNode
- The body of the request to POST for the given resource as a JsonNode.- Returns:
- An EthosResponse containing the instance of the resource that was added by this POST operation.
- Throws:
IllegalArgumentException
- Thrown if the given resourceName or requestBodyNode is null or blank.IOException
- Propagates this exception if it occurs when making the call in theEthosClient
.
-
post
public EthosResponse post(String resourceName, String version, com.fasterxml.jackson.databind.JsonNode requestBodyNode) throws IOException
Submits a POST request for the given resourceName with the given requestBodyNode, which is a JsonNode. This is a convenience method equivalent to callingpost(resourceName, version, requestBodyNode.toString())
.- Parameters:
resourceName
- The name of the resource to add an instance of.version
- The full version header value of the resource used for this POST request.requestBodyNode
- The body of the request to POST for the given resource as a JsonNode.- Returns:
- An EthosResponse containing the instance of the resource that was added by this POST operation.
- Throws:
IllegalArgumentException
- Thrown if the given resourceName or requestBodyNode is null or blank.IOException
- Propagates this exception if it occurs when making the call in theEthosClient
.
-
post
public EthosResponse post(String resourceName, T genericTypeBody) throws IOException
Submits a POST request for the given resourceName using the given genericTypeBody. Uses the default version. This is a convenience method equivalent topost(resourceName, DEFAULT_VERSION, genericTypeBody)
. Converts the generic type body into a JSON formatted string when making the request.- Parameters:
resourceName
- The name of the resource to add an instance of.genericTypeBody
- A generic type object representing the POST request body.- Returns:
- An EthosResponse containing the instance of the resource that was added by this POST operation.
- Throws:
IllegalArgumentException
- Thrown if the given genericTypeBody is null.IOException
- Propagates this exception if it occurs when making the call in theEthosClient
.
-
post
public EthosResponse post(String resourceName, String version, T genericTypeBody) throws IOException
Submits a POST request for the given resourceName and version using the given genericTypeBody. Converts the generic type body into a JSON formatted string when making the request.- Parameters:
resourceName
- The name of the resource to add an instance of.version
- The full version header value of the resource used for this POST request.genericTypeBody
- A generic type object representing the POST request body.- Returns:
- An EthosResponse containing the instance of the resource that was added by this POST operation.
- Throws:
IllegalArgumentException
- Thrown if the given genericTypeBody is null.IOException
- Propagates this exception if it occurs when making the call in theEthosClient
.
-
put
public EthosResponse put(String resourceName, String resourceId, String requestBody) throws IOException
Submits a PUT request for the given resourceName to update a resource with the given requestBody. Uses the default version. The requestBody should be a string in JSON format.- Parameters:
resourceName
- The name of the resource to add an instance of.resourceId
- The unique id (GUID) for the given resource, as required when making a PUT/update request for EEDM APIs. Can be null if the PUT request does not require this param.requestBody
- The body of the request to PUT/update for the given resource.- Returns:
- An EthosResponse containing the instance of the resource that was added by this PUT operation.
- Throws:
IllegalArgumentException
- Thrown if the given resourceName or requestBody is null or blank.IOException
- Propagates this exception if it occurs when making the call in theEthosClient
.
-
put
public EthosResponse put(String resourceName, String resourceId, String version, String requestBody) throws IOException
Submits a PUT request for the given resourceName to update a resource with the given requestBody. The requestBody should be a string in JSON format.- Parameters:
resourceName
- The name of the resource to add an instance of.resourceId
- The unique id (GUID) for the given resource, as required when making a PUT/update request for EEDM APIs. Can be null if the PUT request does not require this param.version
- The full version header value of the resource used for this PUT/update request.requestBody
- The body of the request to PUT/update for the given resource.- Returns:
- An EthosResponse containing the instance of the resource that was added by this PUT operation.
- Throws:
IllegalArgumentException
- Thrown if the given resourceName or requestBody is null or blank.IOException
- Propagates this exception if it occurs when making the call in theEthosClient
.
-
put
public EthosResponse put(String resourceName, String resourceId, com.fasterxml.jackson.databind.JsonNode requestBodyNode) throws IOException
Submits a PUT request for the given resourceName to update a resource with the given requestBodyNode. Uses the default version. This is a convenience method equivalent toput(resourceName, requestBodyNode.toString())
.- Parameters:
resourceName
- The name of the resource to add an instance of.resourceId
- The unique id (GUID) for the given resource, as required when making a PUT/update request for EEDM APIs. Can be null if the PUT request does not require this param.requestBodyNode
- The body of the request to PUT/update for the given resource as a JsonNode.- Returns:
- An EthosResponse containing the instance of the resource that was added by this PUT operation.
- Throws:
IllegalArgumentException
- Thrown if the given resourceName or requestBodyNode is null or blank.IOException
- Propagates this exception if it occurs when making the call in theEthosClient
.
-
put
public EthosResponse put(String resourceName, String resourceId, String version, com.fasterxml.jackson.databind.JsonNode requestBodyNode) throws IOException
Submits a PUT request for the given resourceName to update a resource with the given requestBodyNode, which is a JsonNode. This is a convenience method equivalent to callingput(resourceName, version, requestBodyNode.toString())
.- Parameters:
resourceName
- The name of the resource to add an instance of.resourceId
- The unique id (GUID) for the given resource, as required when making a PUT/update request for EEDM APIs. Can be null if the PUT request does not require this param.version
- The full version header value of the resource used for this PUT/update request.requestBodyNode
- The body of the request to PUT/update for the given resource as a JsonNode.- Returns:
- An EthosResponse containing the instance of the resource that was added by this PUT operation.
- Throws:
IllegalArgumentException
- Thrown if the given resourceName or requestBodyNode is null or blank.IOException
- Propagates this exception if it occurs when making the call in theEthosClient
.
-
put
public EthosResponse put(String resourceName, T genericTypeBody) throws IOException
Submits a PUT request for the given resourceName to update a resource with the given genericTypeBody. Uses the default version. Does not support PUT requests requiring a resourceId (like EEDM API requests). This is a convenience method equivalent to callingput(resourceName, null, genericTypeBody)
.- Parameters:
resourceName
- The name of the resource to add an instance of.genericTypeBody
- A generic type object representing the PUT request body.- Returns:
- An EthosResponse containing the instance of the resource that was added by this PUT operation.
- Throws:
IllegalArgumentException
- Thrown if the given resourceName or genericTypeBody is null or blank.IOException
- Propagates this exception if it occurs when making the call in theEthosClient
.
-
put
public EthosResponse put(String resourceName, String resourceId, T genericTypeBody) throws IOException
Submits a PUT request for the given resourceName to update a resource with the given genericTypeBody. Uses the default version. This is a convenience method equivalent to callingput(resourceName, resourceId, DEFAULT_VERSION, genericTypeBody)
.- Parameters:
resourceName
- The name of the resource to add an instance of.resourceId
- The unique id (GUID) for the given resource, as required when making a PUT/update request.genericTypeBody
- A generic type object representing the PUT request body.- Returns:
- An EthosResponse containing the instance of the resource that was added by this PUT operation.
- Throws:
IllegalArgumentException
- Thrown if the given resourceName or genericTypeBody is null or blank.IOException
- Propagates this exception if it occurs when making the call in theEthosClient
.
-
put
public EthosResponse put(T genericTypeBody, String resourceName, String version) throws IOException
Submits a PUT request for the given resourceName to update a resource with the given genericTypeBody. Does not support PUT requests requiring a resourceId (like EEDM API requests). This is a convenience method equivalent to callingput(resourceName, null, version, genericTypeBody)
.- Parameters:
genericTypeBody
- A generic type object representing the PUT request body.resourceName
- The name of the resource to add an instance of.version
- The full version header value of the resource used for this PUT/update request.- Returns:
- An EthosResponse containing the instance of the resource that was added by this PUT operation.
- Throws:
IllegalArgumentException
- Thrown if the given resourceName or genericTypeBody is null or blank.IOException
- Propagates this exception if it occurs when making the call in theEthosClient
.
-
put
public EthosResponse put(String resourceName, String resourceId, String version, T genericTypeBody) throws IOException
Submits a PUT request for the given resourceName to update a resource with the given genericTypeBody.- Parameters:
resourceName
- The name of the resource to add an instance of.resourceId
- The unique id (GUID) for the given resource, as required when making a PUT/update request for EEDM APIs. Can be null if the PUT request does not require this param.version
- The full version header value of the resource used for this PUT/update request.genericTypeBody
- A generic type object representing the PUT request body.- Returns:
- An EthosResponse containing the instance of the resource that was added by this PUT operation.
- Throws:
IllegalArgumentException
- Thrown if the given resourceName or genericTypeBody is null or blank.IOException
- Propagates this exception if it occurs when making the call in theEthosClient
.
-
delete
public void delete(String resourceName, String id) throws IOException
Deletes an instance of the given resource by the given id.- Parameters:
resourceName
- The name of the resource to delete an instance of identified by the given id.id
- The unique ID (GUID) of the resource to delete.- Throws:
IOException
- Propagates this exception if it occurs when making the call in theEthosClient
.
-
get
public EthosResponse get(String resourceName) throws IOException
Gets a page of resource data for the given resource by name. Uses the default version.- Overrides:
get
in classEthosClient
- Parameters:
resourceName
- The name of the resource to get data for.- Returns:
- An
EthosResponse
containing an initial page (EthosResponse content) of resource data according to the current version of the resource. - Throws:
IOException
- Propagates this exception if it occurs when making the call in theEthosClient
.
-
get
public EthosResponse get(String resourceName, String version) throws IOException
Gets a page of data for the given resource by name and version.- Parameters:
resourceName
- The name of the resource to get data for.version
- The desired resource version header to use, as provided in the HTTP Accept Header of the request.- Returns:
- An
EthosResponse
containing an initial page (EthosResponse content) of resource data according to the requested version of the resource. - Throws:
IOException
- Propagates this exception if it occurs when making the call in theEthosClient
.
-
get
public EthosResponse get(String resourceName, Class classType) throws IOException
Gets a page of resource data for the given resource by name. Uses the default version. The response body is returned within the EthosResponse as a list of objects of the given class type.- Parameters:
resourceName
- The name of the resource to get data for.classType
- The class of the generic type object containing the response body to return within the EthosResponse.- Returns:
- An
EthosResponse
containing an initial page (EthosResponse content) of resource data according to the current version of the resource. - Throws:
IllegalArgumentException
- Thrown if the given classType is null.IOException
- Propagates this exception if it occurs when making the call in theEthosClient
.
-
get
public EthosResponse get(String resourceName, String version, Class classType) throws IOException
Gets a page of resource data for the given resource by name. The response body is returned within the EthosResponse as a list of objects of the given class type, if the classType is not null. If the classType is null, the returned EthosResponse will not contain a generic type object response body, but only a JSON formatted string response body.- Parameters:
resourceName
- The name of the resource to get data for.version
- The desired resource version header to use, as provided in the HTTP Accept Header of the request.classType
- The class of the generic type object containing the response body to return within the EthosResponse.- Returns:
- An
EthosResponse
containing an initial page (EthosResponse content) of resource data according to the current version of the resource. - Throws:
IllegalArgumentException
- Thrown if the given classType is null.IOException
- Propagates this exception if it occurs when making the call in theEthosClient
.
-
getAsString
public String getAsString(String resourceName) throws IOException
Gets a page of resource data for the given resource by name. Uses the default version.- Parameters:
resourceName
- The name of the resource to get data for.- Returns:
- A
String
containing an initial page (EthosResponse content) of resource data according to the current version of the resource. - Throws:
IOException
- Propagates this exception if it occurs when making the call in theEthosClient
.
-
getAsString
public String getAsString(String resourceName, String version) throws IOException
Gets a page of data for the given resource by name and version.- Parameters:
resourceName
- The name of the resource to get data for.version
- The desired resource version header to use, as provided in the HTTP Accept Header of the request.- Returns:
- A
String
containing an initial page (EthosResponse content) of resource data according to the requested version of the resource. - Throws:
IOException
- Propagates this exception if it occurs when making the call in theEthosClient
.
-
getAsJsonNode
public com.fasterxml.jackson.databind.JsonNode getAsJsonNode(String resourceName) throws IOException
Gets resource data for the given resource by name. Uses the default version.- Parameters:
resourceName
- The name of the resource to get data for.- Returns:
- A
JsonNode
containing an initial page (EthosResponse content) of resource data according to the current version of the resource. - Throws:
IOException
- Propagates this exception if it occurs when making the call in theEthosClient
.
-
getAsJsonNode
public com.fasterxml.jackson.databind.JsonNode getAsJsonNode(String resourceName, String version) throws IOException
Gets data for the given resource by name and version.- Parameters:
resourceName
- The name of the resource to get data for.version
- The desired resource version header to use, as provided in the HTTP Accept Header of the request.- Returns:
- A
JsonNode
containing an initial page (EthosResponse content) of resource data according to the requested version of the resource. - Throws:
IOException
- Propagates this exception if it occurs when making the call in theEthosClient
.
-
get
public EthosResponse get(String resourceName, int offset, int pageSize) throws IOException
Gets a page of data for the given resource by name, offset, and pageSize. A page of data is returned from the given offset index containing the number of rows (pageSize) specified. The default version is used.- Parameters:
resourceName
- The name of the resource to get data for.offset
- The 0 based index from which to get a page of data for the given resource.pageSize
- The number of rows to include in the returned page (EthosResponse).- Returns:
- A page of data for the given resource from the given offset with the given page size.
- Throws:
IOException
- Propagates this exception if it occurs when making the call in theEthosClient
.
-
get
public EthosResponse get(String resourceName, String version, int offset, int pageSize) throws IOException
Gets a page of data for the given resource by name, version, offset, and pageSize. A page of data is returned from the given offset index containing the number of rows (pageSize) specified. If the given offset is negative, it will not be used. If the given pageSize is 0 or negative, it will not be used.- Parameters:
resourceName
- The name of the resource to get data for.version
- The desired resource version header to use, as provided in the HTTP Accept Header of the request.offset
- The 0 based index from which to get a page of data for the given resource.pageSize
- The number of rows to include in the returned page (EthosResponse).- Returns:
- A page of data for the given resource from the given offset with the given page size.
- Throws:
IOException
- Propagates this exception if it occurs when making the call in theEthosClient
.
-
get
public EthosResponse get(String resourceName, int offset, int pageSize, Class classType) throws IOException
Gets a page of data for the given resource by name, offset, and pageSize. A page of data is returned from the given offset index containing the number of rows (pageSize) specified. The default version is used. The response body is returned within the EthosResponse as a list of objects of the given class type.- Parameters:
resourceName
- The name of the resource to get data for.offset
- The 0 based index from which to get a page of data for the given resource.pageSize
- The number of rows to include in the returned page (EthosResponse).classType
- The class of the generic type object containing the response body to return within the EthosResponse.- Returns:
- A page of data for the given resource from the given offset with the given page size.
- Throws:
IOException
- Propagates this exception if it occurs when making the call in theEthosClient
.
-
get
public EthosResponse get(String resourceName, String version, int offset, int pageSize, Class classType) throws IOException
Gets a page of data for the given resource by name, version, offset, and pageSize. A page of data is returned from the given offset index containing the number of rows (pageSize) specified. If the given offset is negative, it will not be used. If the given pageSize is 0 or negative, it will not be used. The response body is returned within the EthosResponse as a list of objects of the given class type, if the classType is not null. If the classType is null, the returned EthosResponse will not contain a generic type object response body, but only a JSON formatted string response body.- Parameters:
resourceName
- The name of the resource to get data for.version
- The desired resource version header to use, as provided in the HTTP Accept Header of the request.offset
- The 0 based index from which to get a page of data for the given resource.pageSize
- The number of rows to include in the returned page (EthosResponse).classType
- The class of the generic type object containing the response body to return within the EthosResponse.- Returns:
- A page of data for the given resource from the given offset with the given page size.
- Throws:
IOException
- Propagates this exception if it occurs when making the call in theEthosClient
.
-
getAsString
public String getAsString(String resourceName, int offset, int pageSize) throws IOException
Gets a page of data for the given resource by name, offset, and pageSize. A page of data is returned from the given offset index containing the number of rows (pageSize) specified. The default version is used.- Parameters:
resourceName
- The name of the resource to get data for.offset
- The 0 based index from which to get a page of data for the given resource.pageSize
- The number of rows to include in the returned page (EthosResponse).- Returns:
- A
String
containing a page (EthosResponse content) of resource data from the given offset with the given page size according to the default version of the resource. - Throws:
IOException
- Propagates this exception if it occurs when making the call in theEthosClient
.
-
getAsString
public String getAsString(String resourceName, String version, int offset, int pageSize) throws IOException
Gets a page of data for the given resource by name, version, offset, and pageSize. A page of data is returned from the given offset index containing the number of rows (pageSize) specified. If the given offset is negative, it will not be used. If the given pageSize is 0 or negative, it will not be used.- Parameters:
resourceName
- The name of the resource to get data for.version
- The desired resource version header to use, as provided in the HTTP Accept Header of the request.offset
- The 0 based index from which to get a page of data for the given resource.pageSize
- The number of rows to include in the returned page (EthosResponse).- Returns:
- A
String
containing a page (EthosResponse content) of resource data from the given offset with the given page size according to the requested version of the resource. - Throws:
IOException
- Propagates this exception if it occurs when making the call in theEthosClient
.
-
getAsJsonNode
public com.fasterxml.jackson.databind.JsonNode getAsJsonNode(String resourceName, int offset, int pageSize) throws IOException
Gets a page of data for the given resource by name, offset, and pageSize. A page of data is returned from the given offset index containing the number of rows (pageSize) specified. The default version is used.- Parameters:
resourceName
- The name of the resource to get data for.offset
- The 0 based index from which to get a page of data for the given resource.pageSize
- The number of rows to include in the returned page (EthosResponse).- Returns:
- A
JsonNode
containing a page (EthosResponse content) of resource data from the given offset with the given page size according to the default version of the resource. - Throws:
IOException
- Propagates this exception if it occurs when making the call in theEthosClient
.
-
getAsJsonNode
public com.fasterxml.jackson.databind.JsonNode getAsJsonNode(String resourceName, String version, int offset, int pageSize) throws IOException
Gets a page of data for the given resource by name, version, offset, and pageSize. A page of data is returned from the given offset index containing the number of rows (pageSize) specified. If the given offset is negative, it will not be used. If the given pageSize is 0 or negative, it will not be used.- Parameters:
resourceName
- The name of the resource to get data for.version
- The desired resource version header to use, as provided in the HTTP Accept Header of the request.offset
- The 0 based index from which to get a page of data for the given resource.pageSize
- The number of rows to include in the returned page (EthosResponse).- Returns:
- A
JsonNode
containing a page (EthosResponse content) of resource data from the given offset with the given page size according to the requested version of the resource. - Throws:
IOException
- Propagates this exception if it occurs when making the call in theEthosClient
.
-
getFromOffset
public EthosResponse getFromOffset(String resourceName, int offset) throws IOException
Gets a page of data for the given resource by name and from the given offset index. The default version and page size are used.- Parameters:
resourceName
- The name of the resource to get data for.offset
- The 0 based index from which to get a page of data for the given resource.- Returns:
- A page of data for the given resource from the given offset using the default page size.
- Throws:
IOException
- Propagates this exception if it occurs when making the call in theEthosClient
.
-
getFromOffset
public EthosResponse getFromOffset(String resourceName, String version, int offset) throws IOException
Gets a page of data for the given resource by name and version, from the given offset index. The default page size is used.- Parameters:
resourceName
- The name of the resource to get data for.version
- The desired resource version header to use, as provided in the HTTP Accept Header of the request.offset
- The 0 based index from which to get a page of data for the given resource.- Returns:
- A page of data for the given resource from the given offset using the default page size.
- Throws:
IOException
- Propagates this exception if it occurs when making the call in theEthosClient
.
-
getFromOffset
public EthosResponse getFromOffset(String resourceName, int offset, Class classType) throws IOException
Gets a page of data for the given resource by name and from the given offset index. The default version and page size are used. The response body is returned within the EthosResponse as a list of objects of the given class type.- Parameters:
resourceName
- The name of the resource to get data for.offset
- The 0 based index from which to get a page of data for the given resource.classType
- The class of the generic type object containing the response body to return within the EthosResponse.- Returns:
- A page of data for the given resource from the given offset using the default page size.
- Throws:
IOException
- Propagates this exception if it occurs when making the call in theEthosClient
.
-
getFromOffset
public EthosResponse getFromOffset(String resourceName, String version, int offset, Class classType) throws IOException
Gets a page of data for the given resource by name and version, from the given offset index. The default page size is used. The response body is returned within the EthosResponse as a list of objects of the given class type, if the classType is not null. If the classType is null, the returned EthosResponse will not contain a generic type object response body, but only a JSON formatted string response body.- Parameters:
resourceName
- The name of the resource to get data for.version
- The desired resource version header to use, as provided in the HTTP Accept Header of the request.offset
- The 0 based index from which to get a page of data for the given resource.classType
- The class of the generic type object containing the response body to return within the EthosResponse.- Returns:
- A page of data for the given resource from the given offset using the default page size.
- Throws:
IOException
- Propagates this exception if it occurs when making the call in theEthosClient
.
-
getFromOffsetAsString
public String getFromOffsetAsString(String resourceName, int offset) throws IOException
Gets a page of data for the given resource by name and from the given offset index. The default version and page size are used.- Parameters:
resourceName
- The name of the resource to get data for.offset
- The 0 based index from which to get a page of data for the given resource.- Returns:
- A
String
containing a page (EthosResponse content) of resource data from the given offset with the default page size according to the default version of the resource. - Throws:
IOException
- Propagates this exception if it occurs when making the call in theEthosClient
.
-
getFromOffsetAsString
public String getFromOffsetAsString(String resourceName, String version, int offset) throws IOException
Gets a page of data for the given resource by name and version, from the given offset index. The default page size is used.- Parameters:
resourceName
- The name of the resource to get data for.version
- The desired resource version header to use, as provided in the HTTP Accept Header of the request.offset
- The 0 based index from which to get a page of data for the given resource.- Returns:
- A
String
containing a page (EthosResponse content) of resource data from the given offset with the default page size according to the requested version of the resource. - Throws:
IOException
- Propagates this exception if it occurs when making the call in theEthosClient
.
-
getFromOffsetAsJsonNode
public com.fasterxml.jackson.databind.JsonNode getFromOffsetAsJsonNode(String resourceName, int offset) throws IOException
Gets a page of data for the given resource by name and from the given offset index. The default version and page size are used.- Parameters:
resourceName
- The name of the resource to get data for.offset
- The 0 based index from which to get a page of data for the given resource.- Returns:
- A
JsonNode
containing a page (EthosResponse content) of resource data from the given offset with the default page size according to the default version of the resource. - Throws:
IOException
- Propagates this exception if it occurs when making the call in theEthosClient
.
-
getFromOffsetAsJsonNode
public com.fasterxml.jackson.databind.JsonNode getFromOffsetAsJsonNode(String resourceName, String version, int offset) throws IOException
Gets a page of data for the given resource by name and version, from the given offset index. The default page size is used.- Parameters:
resourceName
- The name of the resource to get data for.version
- The desired resource version header to use, as provided in the HTTP Accept Header of the request.offset
- The 0 based index from which to get a page of data for the given resource.- Returns:
- A
JsonNode
containing a page (EthosResponse content) of resource data from the given offset with the default page size according to the requested version of the resource. - Throws:
IOException
- Propagates this exception if it occurs when making the call in theEthosClient
.
-
getWithPageSize
public EthosResponse getWithPageSize(String resourceName, int pageSize) throws IOException
Gets a page of data for the given resource by name using the given page size. The default version is used from offset index 0.- Parameters:
resourceName
- The name of the resource to get data for.pageSize
- The number of rows to include in the returned page (EthosResponse).- Returns:
- A page of data for the given resource from the given offset using the default page size.
- Throws:
IOException
- Propagates this exception if it occurs when making the call in theEthosClient
.
-
getWithPageSize
public EthosResponse getWithPageSize(String resourceName, String version, int pageSize) throws IOException
Gets a page of data for the given resource by name and version, using the given page size. Offset index 0 is used.- Parameters:
resourceName
- The name of the resource to get data for.version
- The desired resource version header to use, as provided in the HTTP Accept Header of the request.pageSize
- The number of rows to include in the returned page (EthosResponse).- Returns:
- A page of data for the given resource from the given offset using the default page size.
- Throws:
IOException
- Propagates this exception if it occurs when making the call in theEthosClient
.
-
getWithPageSize
public EthosResponse getWithPageSize(String resourceName, int pageSize, Class classType) throws IOException
Gets a page of data for the given resource by name using the given page size. The default version is used from offset index 0. The response body is returned within the EthosResponse as a list of objects of the given class type.- Parameters:
resourceName
- The name of the resource to get data for.pageSize
- The number of rows to include in the returned page (EthosResponse).classType
- The class of the generic type object containing the response body to return within the EthosResponse.- Returns:
- A page of data for the given resource from the given offset using the default page size.
- Throws:
IOException
- Propagates this exception if it occurs when making the call in theEthosClient
.
-
getWithPageSize
public EthosResponse getWithPageSize(String resourceName, String version, int pageSize, Class classType) throws IOException
Gets a page of data for the given resource by name and version, using the given page size. Offset index 0 is used. The response body is returned within the EthosResponse as a list of objects of the given class type, if the classType is not null. If the classType is null, the returned EthosResponse will not contain a generic type object response body, but only a JSON formatted string response body.- Parameters:
resourceName
- The name of the resource to get data for.version
- The desired resource version header to use, as provided in the HTTP Accept Header of the request.pageSize
- The number of rows to include in the returned page (EthosResponse).classType
- The class of the generic type object containing the response body to return within the EthosResponse.- Returns:
- A page of data for the given resource from the given offset using the default page size.
- Throws:
IOException
- Propagates this exception if it occurs when making the call in theEthosClient
.
-
getWithPageSizeAsString
public String getWithPageSizeAsString(String resourceName, int pageSize) throws IOException
Gets a page of data for the given resource by name using the given page size. The default version is used from offset index 0.- Parameters:
resourceName
- The name of the resource to get data for.pageSize
- The number of rows to include in the returned page (EthosResponse).- Returns:
- A
String
containing a page (EthosResponse content) of resource data from offset index 0 with the given page size according to the default version of the resource. - Throws:
IOException
- Propagates this exception if it occurs when making the call in theEthosClient
.
-
getWithPageSizeAsString
public String getWithPageSizeAsString(String resourceName, String version, int pageSize) throws IOException
Gets a page of data for the given resource by name and version, using the given page size. Offset index 0 is used.- Parameters:
resourceName
- The name of the resource to get data for.version
- The desired resource version header to use, as provided in the HTTP Accept Header of the request.pageSize
- The number of rows to include in the returned page (EthosResponse).- Returns:
- A
String
containing a page (EthosResponse content) of resource data from offset index 0 with the given page size according to the requested version of the resource. - Throws:
IOException
- Propagates this exception if it occurs when making the call in theEthosClient
.
-
getWithPageSizeAsJsonNode
public com.fasterxml.jackson.databind.JsonNode getWithPageSizeAsJsonNode(String resourceName, int pageSize) throws IOException
Gets a page of data for the given resource by name using the given page size. The default version is used from offset index 0.- Parameters:
resourceName
- The name of the resource to get data for.pageSize
- The number of rows to include in the returned page (EthosResponse).- Returns:
- A
JsonNode
containing a page (EthosResponse content) of resource data from offset index 0 with the given page size according to the default version of the resource. - Throws:
IOException
- Propagates this exception if it occurs when making the call in theEthosClient
.
-
getWithPageSizeAsJsonNode
public com.fasterxml.jackson.databind.JsonNode getWithPageSizeAsJsonNode(String resourceName, String version, int pageSize) throws IOException
Gets a page of data for the given resource by name and version, using the given page size. Offset index 0 is used.- Parameters:
resourceName
- The name of the resource to get data for.version
- The desired resource version header to use, as provided in the HTTP Accept Header of the request.pageSize
- The number of rows to include in the returned page (EthosResponse).- Returns:
- A
JsonNode
containing a page (EthosResponse content) of resource data from offset index 0 with the given page size according to the requested version of the resource. - Throws:
IOException
- Propagates this exception if it occurs when making the call in theEthosClient
.
-
getAllPages
public List<EthosResponse> getAllPages(String resourceName) throws IOException
Gets all pages for the given resource. Uses the default page size of the response body content length, and the default version.NOTE: This method could result in a long running process and return a large volume of data. It is possible that an
OutOfMemoryError
could occur if trying to get a large quantity of data. This is NOT intended to be used for any kind of resource bulk loading of data. The Ethos bulk loading solution should be used for loading data in Ethos data model format in bulk.- Parameters:
resourceName
- The name of the resource to get data for.- Returns:
- A list of
EthosResponse
s where the content of eachEthosResponse
in the list represents a page of data. - Throws:
IOException
- Propagates this exception if it occurs when making the call in theEthosClient
.
-
getAllPages
public List<EthosResponse> getAllPages(String resourceName, String version) throws IOException
Gets all pages for the given resource and version. Uses the default page size of the response body content length.NOTE: This method could result in a long running process and return a large volume of data. It is possible that an
OutOfMemoryError
could occur if trying to get a large quantity of data. This is NOT intended to be used for any kind of resource bulk loading of data. The Ethos bulk loading solution should be used for loading data in Ethos data model format in bulk.- Parameters:
resourceName
- The name of the resource to get data for.version
- The desired resource version header to use, as provided in the HTTP Accept Header of the request.- Returns:
- A list of
EthosResponse
s where the content of eachEthosResponse
in the list represents a page of data according to the requested version of the resource. - Throws:
IOException
- Propagates this exception if it occurs when making the call in theEthosClient
.
-
getAllPages
public List<EthosResponse> getAllPages(String resourceName, int pageSize) throws IOException
Gets all pages for the given resource and page size. Uses the default version of the resource.NOTE: This method could result in a long running process and return a large volume of data. It is possible that an
OutOfMemoryError
could occur if trying to get a large quantity of data. This is NOT intended to be used for any kind of resource bulk loading of data. The Ethos bulk loading solution should be used for loading data in Ethos data model format in bulk.- Parameters:
resourceName
- The name of the resource to get data for.pageSize
- The number of rows to include in each page (EthosResponse) of the list returned.- Returns:
- A list of
EthosResponse
s where the content of eachEthosResponse
in the list represents a page of data with the given page size according to the current version of the resource. - Throws:
IOException
- Propagates this exception if it occurs when making the call in theEthosClient
.
-
getAllPages
public List<EthosResponse> getAllPages(String resourceName, String version, int pageSize) throws IOException
Gets all pages for the given resource, version, and page size.NOTE: This method could result in a long running process and return a large volume of data. It is possible that an
OutOfMemoryError
could occur if trying to get a large quantity of data. This is NOT intended to be used for any kind of resource bulk loading of data. The Ethos bulk loading solution should be used for loading data in Ethos data model format in bulk.- Parameters:
resourceName
- The name of the resource to get data for.version
- The desired resource version header to use, as provided in the HTTP Accept Header of the request.pageSize
- The number of rows to include in each page (EthosResponse) of the list returned.- Returns:
- A list of
EthosResponse
s where the content of eachEthosResponse
in the list represents a page of data with the given page size according to the requested version of the resource. - Throws:
IOException
- Propagates this exception if it occurs when making the call in theEthosClient
.
-
getAllPages
public List<EthosResponse> getAllPages(String resourceName, String version, int pageSize, Class classType) throws IOException
Gets all pages for the given resource, version, and page size. The response body is returned within each EthosResponse from the returned list as a list of objects of the given class type, if the classType is not null. If the classType is null, the returned EthosResponse will not contain a generic type object response body, but only a JSON formatted string response body.NOTE: This method could result in a long running process and return a large volume of data. It is possible that an
OutOfMemoryError
could occur if trying to get a large quantity of data. This is NOT intended to be used for any kind of resource bulk loading of data. The Ethos bulk loading solution should be used for loading data in Ethos data model format in bulk.- Parameters:
resourceName
- The name of the resource to get data for.version
- The desired resource version header to use, as provided in the HTTP Accept Header of the request.pageSize
- The number of rows to include in each page (EthosResponse) of the list returned.classType
- The class of the generic type object containing the response body to return within the EthosResponse.- Returns:
- A list of
EthosResponse
s where the content of eachEthosResponse
in the list represents a page of data with the given page size according to the requested version of the resource. - Throws:
IOException
- Propagates this exception if it occurs when making the call in theEthosClient
.
-
getAllPages
public List<EthosResponse> getAllPages(String resourceName, int pageSize, Class classType) throws IOException
Gets all pages for the given resource and page size. Uses the default version of the resource. The response body is returned within each EthosResponse from the returned list as a list of objects of the given class type.NOTE: This method could result in a long running process and return a large volume of data. It is possible that an
OutOfMemoryError
could occur if trying to get a large quantity of data. This is NOT intended to be used for any kind of resource bulk loading of data. The Ethos bulk loading solution should be used for loading data in Ethos data model format in bulk.- Parameters:
resourceName
- The name of the resource to get data for.pageSize
- The number of rows to include in each page (EthosResponse) of the list returned.classType
- The class of the generic type object containing the response body to return within the EthosResponse.- Returns:
- A list of
EthosResponse
s where the content of eachEthosResponse
in the list represents a page of data with the given page size according to the current version of the resource. - Throws:
IOException
- Propagates this exception if it occurs when making the call in theEthosClient
.
-
getAllPages
public List<EthosResponse> getAllPages(String resourceName, String version, Class classType) throws IOException
Gets all pages for the given resource and version. Uses the default page size of the response body content length. The response body is returned within each EthosResponse from the returned list as a list of objects of the given class type.NOTE: This method could result in a long running process and return a large volume of data. It is possible that an
OutOfMemoryError
could occur if trying to get a large quantity of data. This is NOT intended to be used for any kind of resource bulk loading of data. The Ethos bulk loading solution should be used for loading data in Ethos data model format in bulk.- Parameters:
resourceName
- The name of the resource to get data for.version
- The desired resource version header to use, as provided in the HTTP Accept Header of the request.classType
- The class of the generic type object containing the response body to return within the EthosResponse.- Returns:
- A list of
EthosResponse
s where the content of eachEthosResponse
in the list represents a page of data according to the requested version of the resource. - Throws:
IOException
- Propagates this exception if it occurs when making the call in theEthosClient
.
-
getAllPages
public List<EthosResponse> getAllPages(String resourceName, Class classType) throws IOException
Gets all pages for the given resource. Uses the default page size of the response body content length, and the default version. The response body is returned within each EthosResponse from the returned list as a list of objects of the given class type, if the classType is not null. If the classType is null, the returned EthosResponse will not contain a generic type object response body, but only a JSON formatted string response body.NOTE: This method could result in a long running process and return a large volume of data. It is possible that an
OutOfMemoryError
could occur if trying to get a large quantity of data. This is NOT intended to be used for any kind of resource bulk loading of data. The Ethos bulk loading solution should be used for loading data in Ethos data model format in bulk.- Parameters:
resourceName
- The name of the resource to get data for.classType
- The class of the generic type object containing the response body to return within the EthosResponse.- Returns:
- A list of
EthosResponse
s where the content of eachEthosResponse
in the list represents a page of data. - Throws:
IOException
- Propagates this exception if it occurs when making the call in theEthosClient
.
-
getAllPagesAsStrings
public List<String> getAllPagesAsStrings(String resourceName) throws IOException
Gets all pages for the given resource. Uses the default page size of the response body content length, and the default version.NOTE: This method could result in a long running process and return a large volume of data. It is possible that an
OutOfMemoryError
could occur if trying to get a large quantity of data. This is NOT intended to be used for any kind of resource bulk loading of data. The Ethos bulk loading solution should be used for loading data in Ethos data model format in bulk.- Parameters:
resourceName
- The name of the resource to get data for.- Returns:
- A list of
String
s where eachString
in the list represents a page of data according to the default version of the resource. The page size of each page is determined by the response body content length. - Throws:
IOException
- Propagates this exception if it occurs when making the call in theEthosClient
.
-
getAllPagesAsStrings
public List<String> getAllPagesAsStrings(String resourceName, String version) throws IOException
Gets all pages for the given resource and version. Uses the default page size of the response body content length.NOTE: This method could result in a long running process and return a large volume of data. It is possible that an
OutOfMemoryError
could occur if trying to get a large quantity of data. This is NOT intended to be used for any kind of resource bulk loading of data. The Ethos bulk loading solution should be used for loading data in Ethos data model format in bulk.- Parameters:
resourceName
- The name of the Ethos resource to get data for.version
- The desired resource version header to use, as provided in the HTTP Accept Header of the request.- Returns:
- A list of
String
s where eachString
in the list represents a page of data according to the requested version of the resource. The page size of each page is determined by the response body content length. - Throws:
IOException
- Propagates this exception if it occurs when making the call in theEthosClient
.
-
getAllPagesAsStrings
public List<String> getAllPagesAsStrings(String resourceName, int pageSize) throws IOException
Gets all pages for the given resource and page size. Uses the default version of the resource.NOTE: This method could result in a long running process and return a large volume of data. It is possible that an
OutOfMemoryError
could occur if trying to get a large quantity of data. This is NOT intended to be used for any kind of resource bulk loading of data. The Ethos bulk loading solution should be used for loading data in Ethos data model format in bulk.- Parameters:
resourceName
- The name of the Ethos resource to get data for.pageSize
- The number of rows to include in each page (String) of the list returned.- Returns:
- A list of
String
s where eachString
in the list represents a page of data with the given page size according to the default version of the resource. - Throws:
IOException
- Propagates this exception if it occurs when making the call in theEthosClient
.
-
getAllPagesAsStrings
public List<String> getAllPagesAsStrings(String resourceName, String version, int pageSize) throws IOException
Gets all pages for the given resource, version, and page size.NOTE: This method could result in a long running process and return a large volume of data. It is possible that an
OutOfMemoryError
could occur if trying to get a large quantity of data. This is NOT intended to be used for any kind of resource bulk loading of data. The Ethos bulk loading solution should be used for loading data in Ethos data model format in bulk.- Parameters:
resourceName
- The name of the Ethos resource to get data for.version
- The desired resource version header to use, as provided in the HTTP Accept Header of the request.pageSize
- The number of rows to include in each page (String) of the list returned.- Returns:
- A list of
String
s where eachString
in the list represents a page of data with the given page size according to the requested version of the resource. - Throws:
IOException
- Propagates this exception if it occurs when making the call in theEthosClient
.
-
getAllPagesAsJsonNodes
public List<com.fasterxml.jackson.databind.JsonNode> getAllPagesAsJsonNodes(String resourceName) throws IOException
Gets all pages for the given resource. Uses the default page size of the response body content length, and the default version.NOTE: This method could result in a long running process and return a large volume of data. It is possible that an
OutOfMemoryError
could occur if trying to get a large quantity of data. This is NOT intended to be used for any kind of resource bulk loading of data. The Ethos bulk loading solution should be used for loading data in Ethos data model format in bulk.- Parameters:
resourceName
- The name of the Ethos resource to get data for.- Returns:
- A list of
JsonNode
s where eachJsonNode
in the list represents a page of data according to the default version of the resource. The page size of each page is determined by the response body content length. - Throws:
IOException
- Propagates this exception if it occurs when making the call in theEthosClient
.
-
getAllPagesAsJsonNodes
public List<com.fasterxml.jackson.databind.JsonNode> getAllPagesAsJsonNodes(String resourceName, String version) throws IOException
Gets all pages for the given resource and version. Uses the default page size of the response body content length.NOTE: This method could result in a long running process and return a large volume of data. It is possible that an
OutOfMemoryError
could occur if trying to get a large quantity of data. This is NOT intended to be used for any kind of resource bulk loading of data. The Ethos bulk loading solution should be used for loading data in Ethos data model format in bulk.- Parameters:
resourceName
- The name of the Ethos resource to get data for.version
- The desired resource version header to use, as provided in the HTTP Accept Header of the request.- Returns:
- A list of
JsonNode
s where eachJsonNode
in the list represents a page of data according to the requested version of the resource. The page size of each page is determined by the response body content length. - Throws:
IOException
- Propagates this exception if it occurs when making the call in theEthosClient
.
-
getAllPagesAsJsonNodes
public List<com.fasterxml.jackson.databind.JsonNode> getAllPagesAsJsonNodes(String resourceName, int pageSize) throws IOException
Gets all pages for the given resource and page size. Uses the default version.NOTE: This method could result in a long running process and return a large volume of data. It is possible that an
OutOfMemoryError
could occur if trying to get a large quantity of data. This is NOT intended to be used for any kind of resource bulk loading of data. The Ethos bulk loading solution should be used for loading data in Ethos data model format in bulk.- Parameters:
resourceName
- The name of the Ethos resource to get data for.pageSize
- The number of rows to include in each page (JsonNode) of the list returned.- Returns:
- A list of
JsonNode
s where eachJsonNode
in the list represents a page of data with the given page size according to the default version of the resource. - Throws:
IOException
- Propagates this exception if it occurs when making the call in theEthosClient
.
-
getAllPagesAsJsonNodes
public List<com.fasterxml.jackson.databind.JsonNode> getAllPagesAsJsonNodes(String resourceName, String version, int pageSize) throws IOException
Gets all pages for the given resource, version, and page size.NOTE: This method could result in a long running process and return a large volume of data. It is possible that an
OutOfMemoryError
could occur if trying to get a large quantity of data. This is NOT intended to be used for any kind of resource bulk loading of data. The Ethos bulk loading solution should be used for loading data in Ethos data model format in bulk.- Parameters:
resourceName
- The name of the Ethos resource to get data for.version
- The desired resource version header to use, as provided in the HTTP Accept Header of the request.pageSize
- The number of rows to include in each page (JsonNode) of the list returned.- Returns:
- A list of
JsonNode
s where eachJsonNode
in the list represents a page of data with the given page size according to the requested version of the resource. - Throws:
IOException
- Propagates this exception if it occurs when making the call in theEthosClient
.
-
getAllPagesFromOffset
public List<EthosResponse> getAllPagesFromOffset(String resourceName, int offset) throws IOException
Gets all pages for the given resource from the given offset. Uses the default page size of the response body content length, and the default version.NOTE: This method could result in a long running process and return a large volume of data. It is possible that an
OutOfMemoryError
could occur if trying to get a large quantity of data. This is NOT intended to be used for any kind of resource bulk loading of data. The Ethos bulk loading solution should be used for loading data in Ethos data model format in bulk.- Parameters:
resourceName
- The name of the Ethos resource to get data for.offset
- The 0 based index from which to begin paging for the given resource.- Returns:
- A list of
EthosResponse
s from the given offset where the content of eachEthosResponse
in the list represents a page of data according to the default version of the resource. - Throws:
IOException
- Propagates this exception if it occurs when making the call in theEthosClient
.
-
getAllPagesFromOffset
public List<EthosResponse> getAllPagesFromOffset(String resourceName, int offset, int pageSize) throws IOException
Gets all pages for the given resource, offset, and page size. Uses the default version of the resource.NOTE: This method could result in a long running process and return a large volume of data. It is possible that an
OutOfMemoryError
could occur if trying to get a large quantity of data. This is NOT intended to be used for any kind of resource bulk loading of data. The Ethos bulk loading solution should be used for loading data in Ethos data model format in bulk.- Parameters:
resourceName
- The name of the Ethos resource to get data for.offset
- The 0 based index from which to begin paging for the given resource.pageSize
- The number of rows to include in each page (EthosResponse) of the list returned.- Returns:
- A list of
EthosResponse
s from the given offset where the content of eachEthosResponse
in the list represents a page of data with the given page size according to the default version of the resource. - Throws:
IOException
- Propagates this exception if it occurs when making the call in theEthosClient
.
-
getAllPagesFromOffset
public List<EthosResponse> getAllPagesFromOffset(String resourceName, String version, int offset) throws IOException
Gets all pages for the given resource, version, and offset. Uses the default page size of the response body content length.NOTE: This method could result in a long running process and return a large volume of data. It is possible that an
OutOfMemoryError
could occur if trying to get a large quantity of data. This is NOT intended to be used for any kind of resource bulk loading of data. The Ethos bulk loading solution should be used for loading data in Ethos data model format in bulk.- Parameters:
resourceName
- The name of the Ethos resource to get data for.version
- The desired resource version header to use, as provided in the HTTP Accept Header of the request.offset
- The 0 based index from which to begin paging for the given resource.- Returns:
- A list of
EthosResponse
s from the given offset where the content of eachEthosResponse
in the list represents a page of data with the response content body length as the page size according to the requested version of the resource. - Throws:
IOException
- Propagates this exception if it occurs when making the call in theEthosClient
.
-
getAllPagesFromOffset
public List<EthosResponse> getAllPagesFromOffset(String resourceName, String version, int offset, int pageSize) throws IOException
Gets all pages for the given resource, version, and page size, from the offset. If the offset is negative, all pages will be returned.NOTE: This method could result in a long running process and return a large volume of data. It is possible that an
OutOfMemoryError
could occur if trying to get a large quantity of data. This is NOT intended to be used for any kind of resource bulk loading of data. The Ethos bulk loading solution should be used for loading data in Ethos data model format in bulk.- Parameters:
resourceName
- The name of the Ethos resource to get data for.version
- The desired resource version header to use, as provided in the HTTP Accept Header of the request.offset
- The 0 based index from which to begin paging for the given resource.pageSize
- The number of rows to include in each page (EthosResponse) of the list returned.- Returns:
- A list of
EthosResponse
s from the given offset where the content of eachEthosResponse
in the list represents a page of data with the given page size according to the requested version of the resource. - Throws:
IOException
- Propagates this exception if it occurs when making the call in theEthosClient
.
-
getAllPagesFromOffset
public List<EthosResponse> getAllPagesFromOffset(String resourceName, String version, int offset, int pageSize, Class classType) throws IOException
Gets all pages for the given resource, version, and page size, from the offset. If the offset is negative, all pages will be returned. The response body is returned within each EthosResponse from the returned list as a list of objects of the given class type, if the classType is not null. If the classType is null, the returned EthosResponse will not contain a generic type object response body, but only a JSON formatted string response body.NOTE: This method could result in a long running process and return a large volume of data. It is possible that an
OutOfMemoryError
could occur if trying to get a large quantity of data. This is NOT intended to be used for any kind of resource bulk loading of data. The Ethos bulk loading solution should be used for loading data in Ethos data model format in bulk.- Parameters:
resourceName
- The name of the Ethos resource to get data for.version
- The desired resource version header to use, as provided in the HTTP Accept Header of the request.offset
- The 0 based index from which to begin paging for the given resource.pageSize
- The number of rows to include in each page (EthosResponse) of the list returned.classType
- The class of the generic type object containing the response body to return within the EthosResponse.- Returns:
- A list of
EthosResponse
s from the given offset where the content of eachEthosResponse
in the list represents a page of data with the given page size according to the requested version of the resource. - Throws:
IOException
- Propagates this exception if it occurs when making the call in theEthosClient
.
-
getAllPagesFromOffset
public List<EthosResponse> getAllPagesFromOffset(String resourceName, String version, int offset, Class classType) throws IOException
Gets all pages for the given resource, version, and offset. Uses the default page size of the response body content length. The response body is returned within each EthosResponse from the returned list as a list of objects of the given class type.NOTE: This method could result in a long running process and return a large volume of data. It is possible that an
OutOfMemoryError
could occur if trying to get a large quantity of data. This is NOT intended to be used for any kind of resource bulk loading of data. The Ethos bulk loading solution should be used for loading data in Ethos data model format in bulk.- Parameters:
resourceName
- The name of the Ethos resource to get data for.version
- The desired resource version header to use, as provided in the HTTP Accept Header of the request.offset
- The 0 based index from which to begin paging for the given resource.classType
- The class of the generic type object containing the response body to return within the EthosResponse.- Returns:
- A list of
EthosResponse
s from the given offset where the content of eachEthosResponse
in the list represents a page of data with the response content body length as the page size according to the requested version of the resource. - Throws:
IOException
- Propagates this exception if it occurs when making the call in theEthosClient
.
-
getAllPagesFromOffset
public List<EthosResponse> getAllPagesFromOffset(String resourceName, int offset, int pageSize, Class classType) throws IOException
Gets all pages for the given resource, offset, and page size. Uses the default version of the resource. The response body is returned within each EthosResponse from the returned list as a list of objects of the given class type.NOTE: This method could result in a long running process and return a large volume of data. It is possible that an
OutOfMemoryError
could occur if trying to get a large quantity of data. This is NOT intended to be used for any kind of resource bulk loading of data. The Ethos bulk loading solution should be used for loading data in Ethos data model format in bulk.- Parameters:
resourceName
- The name of the Ethos resource to get data for.offset
- The 0 based index from which to begin paging for the given resource.pageSize
- The number of rows to include in each page (EthosResponse) of the list returned.classType
- The class of the generic type object containing the response body to return within the EthosResponse.- Returns:
- A list of
EthosResponse
s from the given offset where the content of eachEthosResponse
in the list represents a page of data with the given page size according to the default version of the resource. - Throws:
IOException
- Propagates this exception if it occurs when making the call in theEthosClient
.
-
getAllPagesFromOffset
public List<EthosResponse> getAllPagesFromOffset(String resourceName, int offset, Class classType) throws IOException
Gets all pages for the given resource from the given offset. Uses the default page size of the response body content length, and the default version. The response body is returned within each EthosResponse from the returned list as a list of objects of the given class type.NOTE: This method could result in a long running process and return a large volume of data. It is possible that an
OutOfMemoryError
could occur if trying to get a large quantity of data. This is NOT intended to be used for any kind of resource bulk loading of data. The Ethos bulk loading solution should be used for loading data in Ethos data model format in bulk.- Parameters:
resourceName
- The name of the Ethos resource to get data for.offset
- The 0 based index from which to begin paging for the given resource.classType
- The class of the generic type object containing the response body to return within the EthosResponse.- Returns:
- A list of
EthosResponse
s from the given offset where the content of eachEthosResponse
in the list represents a page of data according to the default version of the resource. - Throws:
IOException
- Propagates this exception if it occurs when making the call in theEthosClient
.
-
getAllPagesFromOffsetAsStrings
public List<String> getAllPagesFromOffsetAsStrings(String resourceName, int offset) throws IOException
Gets all pages for the given resource from the given offset. Uses the default page size of the response body content length, and the default version of the resource.NOTE: This method could result in a long running process and return a large volume of data. It is possible that an
OutOfMemoryError
could occur if trying to get a large quantity of data. This is NOT intended to be used for any kind of resource bulk loading of data. The Ethos bulk loading solution should be used for loading data in Ethos data model format in bulk.- Parameters:
resourceName
- The name of the Ethos resource to get data for.offset
- The 0 based index from which to begin paging for the given resource.- Returns:
- A list of
String
s where eachString
in the list represents a page of data from the given offset with the response content body length as the page size according to the default version of the resource. - Throws:
IOException
- Propagates this exception if it occurs when making the call in theEthosClient
.
-
getAllPagesFromOffsetAsStrings
public List<String> getAllPagesFromOffsetAsStrings(String resourceName, int offset, int pageSize) throws IOException
Gets all pages for the given resource from the given offset with the given page size. Uses the default version of the resource.NOTE: This method could result in a long running process and return a large volume of data. It is possible that an
OutOfMemoryError
could occur if trying to get a large quantity of data. This is NOT intended to be used for any kind of resource bulk loading of data. The Ethos bulk loading solution should be used for loading data in Ethos data model format in bulk.- Parameters:
resourceName
- The name of the Ethos resource to get data for.offset
- The 0 based index from which to begin paging for the given resource.pageSize
- The number of rows to include in each page (String) of the list returned.- Returns:
- A list of
String
s where eachString
in the list represents a page of data from the given offset with the given page size according to the default version of the resource. - Throws:
IOException
- Propagates this exception if it occurs when making the call in theEthosClient
.
-
getAllPagesFromOffsetAsStrings
public List<String> getAllPagesFromOffsetAsStrings(String resourceName, String version, int offset) throws IOException
Gets all pages for the given resource and version from the given offset. Uses the default page size of the response body content length.NOTE: This method could result in a long running process and return a large volume of data. It is possible that an
OutOfMemoryError
could occur if trying to get a large quantity of data. This is NOT intended to be used for any kind of resource bulk loading of data. The Ethos bulk loading solution should be used for loading data in Ethos data model format in bulk.- Parameters:
resourceName
- The name of the Ethos resource to get data for.version
- The desired resource version header to use, as provided in the HTTP Accept Header of the request.offset
- The 0 based index from which to begin paging for the given resource.- Returns:
- A list of
String
s where eachString
in the list represents a page of data from the given offset with the response content body length as the page size according to the requested version of the resource. - Throws:
IOException
- Propagates this exception if it occurs when making the call in theEthosClient
.
-
getAllPagesFromOffsetAsStrings
public List<String> getAllPagesFromOffsetAsStrings(String resourceName, String version, int offset, int pageSize) throws IOException
Gets all pages for the given resource, version, and page size from the given offset.NOTE: This method could result in a long running process and return a large volume of data. It is possible that an
OutOfMemoryError
could occur if trying to get a large quantity of data. This is NOT intended to be used for any kind of resource bulk loading of data. The Ethos bulk loading solution should be used for loading data in Ethos data model format in bulk.- Parameters:
resourceName
- The name of the Ethos resource to get data for.version
- The desired resource version header to use, as provided in the HTTP Accept Header of the request.offset
- The 0 based index from which to begin paging for the given resource.pageSize
- The number of rows to include in each page (String) of the list returned.- Returns:
- A list of
String
s where eachString
in the list represents a page of data from the given offset with the given page size according to the requested version of the resource. - Throws:
IOException
- Propagates this exception if it occurs when making the call in theEthosClient
.
-
getAllPagesFromOffsetAsJsonNodes
public List<com.fasterxml.jackson.databind.JsonNode> getAllPagesFromOffsetAsJsonNodes(String resourceName, int offset) throws IOException
Gets all pages for the given resource from the given offset. Uses the default page size of the response body content length, and the default version.NOTE: This method could result in a long running process and return a large volume of data. It is possible that an
OutOfMemoryError
could occur if trying to get a large quantity of data. This is NOT intended to be used for any kind of resource bulk loading of data. The Ethos bulk loading solution should be used for loading data in Ethos data model format in bulk.- Parameters:
resourceName
- The name of the Ethos resource to get data for.offset
- The 0 based index from which to begin paging for the given resource.- Returns:
- A list of
JsonNode
s where eachJsonNode
in the list represents a page of data from the given offset with the response content body length as the page size according to the default version of the resource. - Throws:
IOException
- Propagates this exception if it occurs when making the call in theEthosClient
.
-
getAllPagesFromOffsetAsJsonNodes
public List<com.fasterxml.jackson.databind.JsonNode> getAllPagesFromOffsetAsJsonNodes(String resourceName, int offset, int pageSize) throws IOException
Gets all pages for the given resource and page size from the given offset. Uses the default version.NOTE: This method could result in a long running process and return a large volume of data. It is possible that an
OutOfMemoryError
could occur if trying to get a large quantity of data. This is NOT intended to be used for any kind of resource bulk loading of data. The Ethos bulk loading solution should be used for loading data in Ethos data model format in bulk.- Parameters:
resourceName
- The name of the Ethos resource to get data for.offset
- The 0 based index from which to begin paging for the given resource.pageSize
- The number of rows to include in each page (JsonNode) of the list returned.- Returns:
- A list of
JsonNode
s where eachJsonNode
in the list represents a page of data from the given offset with the given page size according to the default version of the resource. - Throws:
IOException
- Propagates this exception if it occurs when making the call in theEthosClient
.
-
getAllPagesFromOffsetAsJsonNodes
public List<com.fasterxml.jackson.databind.JsonNode> getAllPagesFromOffsetAsJsonNodes(String resourceName, String version, int offset) throws IOException
Gets all pages for the given resource and version from the given offset. Uses the default page size of the response body content length.NOTE: This method could result in a long running process and return a large volume of data. It is possible that an
OutOfMemoryError
could occur if trying to get a large quantity of data. This is NOT intended to be used for any kind of resource bulk loading of data. The Ethos bulk loading solution should be used for loading data in Ethos data model format in bulk.- Parameters:
resourceName
- The name of the Ethos resource to get data for.version
- The desired resource version header to use, as provided in the HTTP Accept Header of the request.offset
- The 0 based index from which to begin paging for the given resource.- Returns:
- A list of
JsonNode
s where eachJsonNode
in the list represents a page of data from the given offset with the response content body length as the page size according to the requested version of the resource. - Throws:
IOException
- Propagates this exception if it occurs when making the call in theEthosClient
.
-
getAllPagesFromOffsetAsJsonNodes
public List<com.fasterxml.jackson.databind.JsonNode> getAllPagesFromOffsetAsJsonNodes(String resourceName, String version, int offset, int pageSize) throws IOException
Gets all pages for the given resource, version, and page size, from the given offset.NOTE: This method could result in a long running process and return a large volume of data. It is possible that an
OutOfMemoryError
could occur if trying to get a large quantity of data. This is NOT intended to be used for any kind of resource bulk loading of data. The Ethos bulk loading solution should be used for loading data in Ethos data model format in bulk.- Parameters:
resourceName
- The name of the Ethos resource to get data for.version
- The desired resource version header to use, as provided in the HTTP Accept Header of the request.offset
- The 0 based index from which to begin paging for the given resource.pageSize
- The number of rows to include in each page (JsonNode) of the list returned.- Returns:
- A list of
JsonNode
s where eachJsonNode
in the list represents a page of data from the given offset with the given page size according to the requested version of the resource. - Throws:
IOException
- Propagates this exception if it occurs when making the call in theEthosClient
.
-
getPages
public List<EthosResponse> getPages(String resourceName, int numPages) throws IOException
Gets some number of pages for the given resource. Uses the default page size of the response body content length, and default version.- Parameters:
resourceName
- The name of the Ethos resource to get data for.numPages
- The number of pages of the given resource to return.- Returns:
- A list of
EthosResponse
s where eachEthosResponse
in the list represents a page of data with the response content body length as the page size according to the default version of the resource, up to the number of pages specified or the max number of pages (whichever is less). - Throws:
IOException
- Propagates this exception if it occurs when making the call in theEthosClient
.
-
getPages
public List<EthosResponse> getPages(String resourceName, String version, int numPages) throws IOException
Gets some number of pages for the given resource and version. Uses the default page size of the response body content length.- Parameters:
resourceName
- The name of the Ethos resource to get data for.version
- The desired resource version header to use, as provided in the HTTP Accept Header of the request.numPages
- The number of pages of the given resource to return.- Returns:
- A list of
EthosResponse
s where eachEthosResponse
in the list represents a page of data with the response content body length as the page size according to the requested version of the resource, up to the number of pages specified or the max number of pages (whichever is less). - Throws:
IOException
- Propagates this exception if it occurs when making the call in theEthosClient
.
-
getPages
public List<EthosResponse> getPages(String resourceName, int pageSize, int numPages) throws IOException
Gets some number of pages for the given resource and page size. Uses the default version of the resource.- Parameters:
resourceName
- The name of the Ethos resource to get data for.pageSize
- The number of rows to include in each page (EthosResponse) of the list returned.numPages
- The number of pages of the given resource to return.- Returns:
- A list of
EthosResponse
s where eachEthosResponse
in the list represents a page of data with the given page size according to the default version of the resource, up to the number of pages specified or the max number of pages (whichever is less). - Throws:
IOException
- Propagates this exception if it occurs when making the call in theEthosClient
.
-
getPages
public List<EthosResponse> getPages(String resourceName, String version, int pageSize, int numPages) throws IOException
Gets some number of pages for the given resource, version, and page size. If numPages is negative, all pages will be returned.- Parameters:
resourceName
- The name of the Ethos resource to get data for.version
- The desired resource version header to use, as provided in the HTTP Accept Header of the request.pageSize
- The number of rows to include in each page (EthosResponse) of the list returned.numPages
- The number of pages of the given resource to return.- Returns:
- A list of
EthosResponse
s where eachEthosResponse
in the list represents a page of data with the given page size according to the requested version of the resource, up to the number of pages specified or the max number of pages (whichever is less). - Throws:
IOException
- Propagates this exception if it occurs when making the call in theEthosClient
.
-
getPages
public List<EthosResponse> getPages(String resourceName, String version, int pageSize, int numPages, Class classType) throws IOException
Gets some number of pages for the given resource, version, and page size. If numPages is negative, all pages will be returned. The response body is returned within each EthosResponse from the returned list as a list of objects of the given class type, if the classType is not null. If the classType is null, the returned EthosResponse will not contain a generic type object response body, but only a JSON formatted string response body.- Parameters:
resourceName
- The name of the Ethos resource to get data for.version
- The desired resource version header to use, as provided in the HTTP Accept Header of the request.pageSize
- The number of rows to include in each page (EthosResponse) of the list returned.numPages
- The number of pages of the given resource to return.classType
- The class of the generic type object containing the response body to return within the EthosResponse.- Returns:
- A list of
EthosResponse
s where eachEthosResponse
in the list represents a page of data with the given page size according to the requested version of the resource, up to the number of pages specified or the max number of pages (whichever is less). - Throws:
IOException
- Propagates this exception if it occurs when making the call in theEthosClient
.
-
getPages
public List<EthosResponse> getPages(String resourceName, int pageSize, int numPages, Class classType) throws IOException
Gets some number of pages for the given resource and page size. Uses the default version of the resource. The response body is returned within each EthosResponse from the returned list as a list of objects of the given class type.- Parameters:
resourceName
- The name of the Ethos resource to get data for.pageSize
- The number of rows to include in each page (EthosResponse) of the list returned.numPages
- The number of pages of the given resource to return.classType
- The class of the generic type object containing the response body to return within the EthosResponse.- Returns:
- A list of
EthosResponse
s where eachEthosResponse
in the list represents a page of data with the given page size according to the default version of the resource, up to the number of pages specified or the max number of pages (whichever is less). - Throws:
IOException
- Propagates this exception if it occurs when making the call in theEthosClient
.
-
getPages
public List<EthosResponse> getPages(String resourceName, String version, int numPages, Class classType) throws IOException
Gets some number of pages for the given resource and version. Uses the default page size of the response body content length. The response body is returned within each EthosResponse from the returned list as a list of objects of the given class type.- Parameters:
resourceName
- The name of the Ethos resource to get data for.version
- The desired resource version header to use, as provided in the HTTP Accept Header of the request.numPages
- The number of pages of the given resource to return.classType
- The class of the generic type object containing the response body to return within the EthosResponse.- Returns:
- A list of
EthosResponse
s where eachEthosResponse
in the list represents a page of data with the response content body length as the page size according to the requested version of the resource, up to the number of pages specified or the max number of pages (whichever is less). - Throws:
IOException
- Propagates this exception if it occurs when making the call in theEthosClient
.
-
getPages
public List<EthosResponse> getPages(String resourceName, int numPages, Class classType) throws IOException
Gets some number of pages for the given resource. Uses the default page size of the response body content length, and default version. The response body is returned within each EthosResponse from the returned list as a list of objects of the given class type.- Parameters:
resourceName
- The name of the Ethos resource to get data for.numPages
- The number of pages of the given resource to return.classType
- The class of the generic type object containing the response body to return within the EthosResponse.- Returns:
- A list of
EthosResponse
s where eachEthosResponse
in the list represents a page of data with the response content body length as the page size according to the default version of the resource, up to the number of pages specified or the max number of pages (whichever is less). - Throws:
IOException
- Propagates this exception if it occurs when making the call in theEthosClient
.
-
getPagesAsStrings
public List<String> getPagesAsStrings(String resourceName, int numPages) throws IOException
Gets some number of pages for the given resource. Uses the default page size of the response body content length, and the default version of the resource.- Parameters:
resourceName
- The name of the Ethos resource to get data for.numPages
- The number of pages of the given resource to return.- Returns:
- A list of
String
s where eachString
in the list represents a page of data with the response content body length as the page size according to the default version of the resource, up to the number of pages specified or the max number of pages (whichever is less). - Throws:
IOException
- Propagates this exception if it occurs when making the call in theEthosClient
.
-
getPagesAsStrings
public List<String> getPagesAsStrings(String resourceName, String version, int numPages) throws IOException
Gets some number of pages for the given resource. Uses the default page size of the response body content length.- Parameters:
resourceName
- The name of the Ethos resource to get data for.version
- The desired resource version header to use, as provided in the HTTP Accept Header of the request.numPages
- The number of pages of the given resource to return.- Returns:
- A list of
String
s where eachString
in the list represents a page of data with the response content body length as the page size according to the requested version of the resource, up to the number of pages specified or the max number of pages (whichever is less). - Throws:
IOException
- Propagates this exception if it occurs when making the call in theEthosClient
.
-
getPagesAsStrings
public List<String> getPagesAsStrings(String resourceName, int pageSize, int numPages) throws IOException
Gets some number of pages for the given resource and page size. Uses the default version of the resource.- Parameters:
resourceName
- The name of the Ethos resource to get data for.pageSize
- The number of rows to include in each page (String) of the list returned.numPages
- The number of pages of the given resource to return.- Returns:
- A list of
String
s where eachString
in the list represents a page of data with the given page size according to the default version of the resource, up to the number of pages specified or the max number of pages (whichever is less). - Throws:
IOException
- Propagates this exception if it occurs when making the call in theEthosClient
.
-
getPagesAsStrings
public List<String> getPagesAsStrings(String resourceName, String version, int pageSize, int numPages) throws IOException
Gets some number of pages for the given resource, version, and page size.- Parameters:
resourceName
- The name of the Ethos resource to get data for.version
- The desired resource version header to use, as provided in the HTTP Accept Header of the request.pageSize
- The number of rows to include in each page (String) of the list returned.numPages
- The number of pages of the given resource to return.- Returns:
- A list of
String
s where eachString
in the list represents a page of data with the given page size according to the requested version of the resource, up to the number of pages specified or the max number of pages (whichever is less). - Throws:
IOException
- Propagates this exception if it occurs when making the call in theEthosClient
.
-
getPagesAsJsonNodes
public List<com.fasterxml.jackson.databind.JsonNode> getPagesAsJsonNodes(String resourceName, int numPages) throws IOException
Gets some number of pages for the given resource. Uses the default page size of the response body content length, and the default version of the resource.- Parameters:
resourceName
- The name of the Ethos resource to get data for.numPages
- The number of pages of the given resource to return.- Returns:
- A list of
JsonNode
s where eachJsonNode
in the list represents a page of data with the response content body length as the page size according to the default version of the resource, up to the number of pages specified or the max number of pages (whichever is less). - Throws:
IOException
- Propagates this exception if it occurs when making the call in theEthosClient
.
-
getPagesAsJsonNodes
public List<com.fasterxml.jackson.databind.JsonNode> getPagesAsJsonNodes(String resourceName, String version, int numPages) throws IOException
Gets some number of pages for the given resource and version. Uses the default page size of the response body content length.- Parameters:
resourceName
- The name of the Ethos resource to get data for.version
- The desired resource version header to use, as provided in the HTTP Accept Header of the request.numPages
- The number of pages of the given resource to return.- Returns:
- A list of
JsonNode
s where eachJsonNode
in the list represents a page of data with the response content body length as the page size according to the requested version of the resource, up to the number of pages specified or the max number of pages (whichever is less). - Throws:
IOException
- Propagates this exception if it occurs when making the call in theEthosClient
.
-
getPagesAsJsonNodes
public List<com.fasterxml.jackson.databind.JsonNode> getPagesAsJsonNodes(String resourceName, int pageSize, int numPages) throws IOException
Gets some number of pages for the given resource and page size. Uses the default version of the resource.- Parameters:
resourceName
- The name of the Ethos resource to get data for.pageSize
- The number of rows to include in each page (JsonNode) of the list returned.numPages
- The number of pages of the given resource to return.- Returns:
- A list of
JsonNode
s where eachJsonNode
in the list represents a page of data with the given page size according to the default version of the resource, up to the number of pages specified or the max number of pages (whichever is less). - Throws:
IOException
- Propagates this exception if it occurs when making the call in theEthosClient
.
-
getPagesAsJsonNodes
public List<com.fasterxml.jackson.databind.JsonNode> getPagesAsJsonNodes(String resourceName, String version, int pageSize, int numPages) throws IOException
Gets some number of pages for the given resource, version, and page size.- Parameters:
resourceName
- The name of the Ethos resource to get data for.version
- The desired resource version header to use, as provided in the HTTP Accept Header of the request.pageSize
- The number of rows to include in each page (JsonNode) of the list returned.numPages
- The number of pages of the given resource to return.- Returns:
- A list of
JsonNode
s where eachJsonNode
in the list represents a page of data with the given page size according to the requested version of the resource, up to the number of pages specified or the max number of pages (whichever is less). - Throws:
IOException
- Propagates this exception if it occurs when making the call in theEthosClient
.
-
getPagesFromOffset
public List<EthosResponse> getPagesFromOffset(String resourceName, int offset, int numPages) throws IOException
Gets some number of pages for the given resource from the given offset. Uses the default page size of the response body content length, and the default version of the resource.- Parameters:
resourceName
- The name of the Ethos resource to get data for.offset
- The 0 based index from which to begin paging for the given resource.numPages
- The number of pages of the given resource to return.- Returns:
- A list of
EthosResponse
s where eachEthosResponse
in the list represents a page of data with the response content body length as the page size according to the default version of the resource, beginning at the given offset index and up to the number of pages specified or the max number of pages (whichever is less). - Throws:
IOException
- Propagates this exception if it occurs when making the call in theEthosClient
.
-
getPagesFromOffset
public List<EthosResponse> getPagesFromOffset(String resourceName, int pageSize, int offset, int numPages) throws IOException
Gets some number of pages for the given resource and page size from the given offset. Uses the default version of the resource.- Parameters:
resourceName
- The name of the Ethos resource to get data for.pageSize
- The number of rows to include in each page (EthosResponse) of the list returned.offset
- The 0 based index from which to begin paging for the given resource.numPages
- The number of pages of the given resource to return.- Returns:
- A list of
EthosResponse
s where eachEthosResponse
in the list represents a page of data with the given page size according to the default version of the resource, beginning at the given offset index and up to the number of pages specified or the max number of pages (whichever is less). - Throws:
IOException
- Propagates this exception if it occurs when making the call in theEthosClient
.
-
getPagesFromOffset
public List<EthosResponse> getPagesFromOffset(String resourceName, String version, int offset, int numPages) throws IOException
Gets some number of pages for the given resource and version from the given offset. Uses the default page size of the response body content length.- Parameters:
resourceName
- The name of the Ethos resource to get data for.version
- The desired resource version header to use, as provided in the HTTP Accept Header of the request.offset
- The 0 based index from which to begin paging for the given resource.numPages
- The number of pages of the given resource to return.- Returns:
- A list of
EthosResponse
s where eachEthosResponse
in the list represents a page of data with the response content body length as the page size according to the requested version of the resource, beginning at the given offset index and up to the number of pages specified or the max number of pages (whichever is less). - Throws:
IOException
- Propagates this exception if it occurs when making the call in theEthosClient
.
-
getPagesFromOffset
public List<EthosResponse> getPagesFromOffset(String resourceName, String version, int pageSize, int offset, int numPages) throws IOException
Gets some number of pages for the given resource, version, and page size, from the given offset. If both the offset and numPages are negative, all pages will be returned. If the offset is negative, pages up to the numPages will be returned. If numPages is negative, all pages from the offset will be returned.- Parameters:
resourceName
- The name of the Ethos resource to get data for.version
- The desired resource version header to use, as provided in the HTTP Accept Header of the request.pageSize
- The number of rows to include in each page (EthosResponse) of the list returned.offset
- The 0 based index from which to begin paging for the given resource.numPages
- The number of pages of the given resource to return.- Returns:
- A list of
EthosResponse
s where eachEthosResponse
in the list represents a page of data with the given page size according to the requested version of the resource, beginning at the given offset index and up to the number of pages specified or the max number of pages (whichever is less). - Throws:
IOException
- Propagates this exception if it occurs when making the call in theEthosClient
.
-
getPagesFromOffset
public List<EthosResponse> getPagesFromOffset(String resourceName, String version, int pageSize, int offset, int numPages, Class classType) throws IOException
Gets some number of pages for the given resource, version, and page size, from the given offset. If both the offset and numPages are negative, all pages will be returned. If the offset is negative, pages up to the numPages will be returned. If numPages is negative, all pages from the offset will be returned. The response body is returned within each EthosResponse from the returned list as a list of objects of the given class type, if the classType is not null. If the classType is null, the returned EthosResponse will not contain a generic type object response body, but only a JSON formatted string response body.- Parameters:
resourceName
- The name of the Ethos resource to get data for.version
- The desired resource version header to use, as provided in the HTTP Accept Header of the request.pageSize
- The number of rows to include in each page (EthosResponse) of the list returned.offset
- The 0 based index from which to begin paging for the given resource.numPages
- The number of pages of the given resource to return.classType
- The class of the generic type object containing the response body to return within the EthosResponse.- Returns:
- A list of
EthosResponse
s where eachEthosResponse
in the list represents a page of data with the given page size according to the requested version of the resource, beginning at the given offset index and up to the number of pages specified or the max number of pages (whichever is less). - Throws:
IOException
- Propagates this exception if it occurs when making the call in theEthosClient
.
-
getPagesFromOffset
public List<EthosResponse> getPagesFromOffset(String resourceName, String version, int offset, int numPages, Class classType) throws IOException
Gets some number of pages for the given resource and version from the given offset. Uses the default page size of the response body content length. The response body is returned within each EthosResponse from the returned list as a list of objects of the given class type.- Parameters:
resourceName
- The name of the Ethos resource to get data for.version
- The desired resource version header to use, as provided in the HTTP Accept Header of the request.offset
- The 0 based index from which to begin paging for the given resource.numPages
- The number of pages of the given resource to return.classType
- The class of the generic type object containing the response body to return within the EthosResponse.- Returns:
- A list of
EthosResponse
s where eachEthosResponse
in the list represents a page of data with the response content body length as the page size according to the requested version of the resource, beginning at the given offset index and up to the number of pages specified or the max number of pages (whichever is less). - Throws:
IOException
- Propagates this exception if it occurs when making the call in theEthosClient
.
-
getPagesFromOffset
public List<EthosResponse> getPagesFromOffset(String resourceName, int pageSize, int offset, int numPages, Class classType) throws IOException
Gets some number of pages for the given resource and page size from the given offset. Uses the default version of the resource. The response body is returned within each EthosResponse from the returned list as a list of objects of the given class type.- Parameters:
resourceName
- The name of the Ethos resource to get data for.pageSize
- The number of rows to include in each page (EthosResponse) of the list returned.offset
- The 0 based index from which to begin paging for the given resource.numPages
- The number of pages of the given resource to return.classType
- The class of the generic type object containing the response body to return within the EthosResponse.- Returns:
- A list of
EthosResponse
s where eachEthosResponse
in the list represents a page of data with the given page size according to the default version of the resource, beginning at the given offset index and up to the number of pages specified or the max number of pages (whichever is less). - Throws:
IOException
- Propagates this exception if it occurs when making the call in theEthosClient
.
-
getPagesFromOffset
public List<EthosResponse> getPagesFromOffset(String resourceName, int offset, int numPages, Class classType) throws IOException
Gets some number of pages for the given resource from the given offset. Uses the default page size of the response body content length, and the default version of the resource. The response body is returned within each EthosResponse from the returned list as a list of objects of the given class type.- Parameters:
resourceName
- The name of the Ethos resource to get data for.offset
- The 0 based index from which to begin paging for the given resource.numPages
- The number of pages of the given resource to return.classType
- The class of the generic type object containing the response body to return within the EthosResponse.- Returns:
- A list of
EthosResponse
s where eachEthosResponse
in the list represents a page of data with the response content body length as the page size according to the default version of the resource, beginning at the given offset index and up to the number of pages specified or the max number of pages (whichever is less). - Throws:
IOException
- Propagates this exception if it occurs when making the call in theEthosClient
.
-
getPagesFromOffsetAsStrings
public List<String> getPagesFromOffsetAsStrings(String resourceName, int offset, int numPages) throws IOException
Gets some number of pages for the given resource from the given offset. Uses the default page size of the response body content length, and the default version of the resource.- Parameters:
resourceName
- The name of the Ethos resource to get data for.offset
- The 0 based index from which to begin paging for the given resource.numPages
- The number of pages of the given resource to return.- Returns:
- A list of
String
s where eachString
in the list represents a page of data with the response content body length as the page size according to the default version of the resource, beginning at the given offset index and up to the number of pages specified or the max number of pages (whichever is less). - Throws:
IOException
- Propagates this exception if it occurs when making the call in theEthosClient
.
-
getPagesFromOffsetAsStrings
public List<String> getPagesFromOffsetAsStrings(String resourceName, int pageSize, int offset, int numPages) throws IOException
Gets some number of pages for the given resource and page size from the given offset. Uses the default version of the resource.- Parameters:
resourceName
- The name of the Ethos resource to get data for.pageSize
- The number of rows to include in each page (String) of the list returned.offset
- The 0 based index from which to begin paging for the given resource.numPages
- The number of pages of the given resource to return.- Returns:
- A list of
String
s where eachString
in the list represents a page of data with the given page size according to the default version of the resource, beginning at the given offset index and up to the number of pages specified or the max number of pages (whichever is less). - Throws:
IOException
- Propagates this exception if it occurs when making the call in theEthosClient
.
-
getPagesFromOffsetAsStrings
public List<String> getPagesFromOffsetAsStrings(String resourceName, String version, int offset, int numPages) throws IOException
Gets some number of pages for the given resource and version from the given offset. Uses the default page size of the response body content length.- Parameters:
resourceName
- The name of the Ethos resource to get data for.version
- The desired resource version header to use, as provided in the HTTP Accept Header of the request.offset
- The 0 based index from which to begin paging for the given resource.numPages
- The number of pages of the given resource to return.- Returns:
- A list of
String
s where eachString
in the list represents a page of data with the response content body length as the page size according to the requested version of the resource, beginning at the given offset index and up to the number of pages specified or the max number of pages (whichever is less). - Throws:
IOException
- Propagates this exception if it occurs when making the call in theEthosClient
.
-
getPagesFromOffsetAsStrings
public List<String> getPagesFromOffsetAsStrings(String resourceName, String version, int pageSize, int offset, int numPages) throws IOException
Gets some number of pages for the given resource, version, and page size, from the given offset.- Parameters:
resourceName
- The name of the Ethos resource to get data for.version
- The desired resource version header to use, as provided in the HTTP Accept Header of the request.pageSize
- The number of rows to include in each page (String) of the list returned.offset
- The 0 based index from which to begin paging for the given resource.numPages
- The number of pages of the given resource to return.- Returns:
- A list of
String
s where eachString
in the list represents a page of data with the given page size according to the requested version of the resource, beginning at the given offset index and up to the number of pages specified or the max number of pages (whichever is less). - Throws:
IOException
- Propagates this exception if it occurs when making the call in theEthosClient
.
-
getPagesFromOffsetAsJsonNodes
public List<com.fasterxml.jackson.databind.JsonNode> getPagesFromOffsetAsJsonNodes(String resourceName, int offset, int numPages) throws IOException
Gets some number of pages for the given resource from the given offset. Uses the default page size of the response body content length, and the default version of the resource.- Parameters:
resourceName
- The name of the Ethos resource to get data for.offset
- The 0 based index from which to begin paging for the given resource.numPages
- The number of pages of the given resource to return.- Returns:
- A list of
JsonNode
s where eachJsonNode
in the list represents a page of data with the response content body length as the page size according to the default version of the resource, beginning at the given offset index and up to the number of pages specified or the max number of pages (whichever is less). - Throws:
IOException
- Propagates this exception if it occurs when making the call in theEthosClient
.
-
getPagesFromOffsetAsJsonNodes
public List<com.fasterxml.jackson.databind.JsonNode> getPagesFromOffsetAsJsonNodes(String resourceName, int pageSize, int offset, int numPages) throws IOException
Gets some number of pages for the given resource and page size, from the given offset. Uses the default version of the resource.- Parameters:
resourceName
- The name of the Ethos resource to get data for.pageSize
- The number of rows to include in each page (JsonNode) of the list returned.offset
- The 0 based index from which to begin paging for the given resource.numPages
- The number of pages of the given resource to return.- Returns:
- A list of
JsonNode
s where eachJsonNode
in the list represents a page of data with the given page size according to the default version of the resource, beginning at the given offset index and up to the number of pages specified or the max number of pages (whichever is less). - Throws:
IOException
- Propagates this exception if it occurs when making the call in theEthosClient
.
-
getPagesFromOffsetAsJsonNodes
public List<com.fasterxml.jackson.databind.JsonNode> getPagesFromOffsetAsJsonNodes(String resourceName, String version, int offset, int numPages) throws IOException
Gets some number of pages for the given resource and version, from the given offset. Uses the default page size of the response body content length.- Parameters:
resourceName
- The name of the Ethos resource to get data for.version
- The desired resource version header to use, as provided in the HTTP Accept Header of the request.offset
- The 0 based index from which to begin paging for the given resource.numPages
- The number of pages of the given resource to return.- Returns:
- A list of
JsonNode
s where eachJsonNode
in the list represents a page of data with the response content body length as the page size according to the requested version of the resource, beginning at the given offset index and up to the number of pages specified or the max number of pages (whichever is less). - Throws:
IOException
- Propagates this exception if it occurs when making the call in theEthosClient
.
-
getPagesFromOffsetAsJsonNodes
public List<com.fasterxml.jackson.databind.JsonNode> getPagesFromOffsetAsJsonNodes(String resourceName, String version, int pageSize, int offset, int numPages) throws IOException
Gets some number of pages for the given resource, version, and page size, from the given offset.- Parameters:
resourceName
- The name of the Ethos resource to get data for.version
- The desired resource version header to use, as provided in the HTTP Accept Header of the request.pageSize
- The number of rows to include in each page (JsonNode) of the list returned.offset
- The 0 based index from which to begin paging for the given resource.numPages
- The number of pages of the given resource to return.- Returns:
- A list of
JsonNode
s where eachJsonNode
in the list represents a page of data with given page size according to the requested version of the resource, beginning at the given offset index and up to the number of pages specified or the max number of pages (whichever is less). - Throws:
IOException
- Propagates this exception if it occurs when making the call in theEthosClient
.
-
getRows
public List<EthosResponse> getRows(String resourceName, int numRows) throws IOException
Gets some number of rows for the given resource. The number of rows is returned as a paged-based list of EthosResponses, altogether containing the number of rows. Uses the default page size of the response body content length, and the default version of the resource.- Parameters:
resourceName
- The name of the Ethos resource to get data for.numRows
- The number of rows of the given resource to return.- Returns:
- A list of
EthosResponse
s where eachEthosResponse
in the list represents a page of data with the response content body length as the page size according to the default version of the resource, up to the number of rows specified or the total count of the resource (whichever is less). - Throws:
IOException
- Propagates this exception if it occurs when making the call in theEthosClient
.
-
getRows
public List<EthosResponse> getRows(String resourceName, String version, int numRows) throws IOException
Gets some number of rows for the given resource and version. The number of rows is returned as a paged-based list of EthosResponses, altogether containing the number of rows. Uses the default page size of the response body content length.- Parameters:
resourceName
- The name of the Ethos resource to get data for.version
- The desired resource version header to use, as provided in the HTTP Accept Header of the request.numRows
- The number of rows of the given resource to return.- Returns:
- A list of
EthosResponse
s where eachEthosResponse
in the list represents a page of data with the response content body length as the page size according to the requested version of the resource, up to the number of rows specified or the total count of the resource (whichever is less). - Throws:
IOException
- Propagates this exception if it occurs when making the call in theEthosClient
.
-
getRows
public List<EthosResponse> getRows(String resourceName, int pageSize, int numRows) throws IOException
Gets some number of rows for the given resource and page size. The number of rows is returned as a paged-based list of EthosResponses, altogether containing the number of rows. Uses the default version of the resource.- Parameters:
resourceName
- The name of the Ethos resource to get data for.pageSize
- The number of rows to include in each page (EthosResponse) of the list returned.numRows
- The number of rows of the given resource to return.- Returns:
- A list of
EthosResponse
s where eachEthosResponse
in the list represents a page of data with the given page size according to the default version of the resource, up to the number of rows specified or the total count of the resource (whichever is less). - Throws:
IOException
- Propagates this exception if it occurs when making the call in theEthosClient
.
-
getRows
public List<EthosResponse> getRows(String resourceName, String version, int pageSize, int numRows) throws IOException
Gets some number of rows for the given resource, version, and page size. The number of rows is returned as a paged-based list of EthosResponses, altogether containing the number of rows. If numRows is negative, all pages will be returned.- Parameters:
resourceName
- The name of the Ethos resource to get data for.version
- The desired resource version header to use, as provided in the HTTP Accept Header of the request.pageSize
- The number of rows to include in each page (EthosResponse) of the list returned.numRows
- The number of rows of the given resource to return.- Returns:
- A list of
EthosResponse
s where eachEthosResponse
in the list represents a page of data with the given page size according to the requested version of the resource, up to the number of rows specified or the total count of the resource (whichever is less). - Throws:
IOException
- Propagates this exception if it occurs when making the call in theEthosClient
.
-
getRows
public List<EthosResponse> getRows(String resourceName, String version, int pageSize, int numRows, Class classType) throws IOException
Gets some number of rows for the given resource, version, and page size. The number of rows is returned as a paged-based list of EthosResponses, altogether containing the number of rows. If numRows is negative, all pages will be returned. The response body is returned within each EthosResponse from the returned list as a list of objects of the given class type, if the classType is not null. If the classType is null, the returned EthosResponse will not contain a generic type object response body, but only a JSON formatted string response body.- Parameters:
resourceName
- The name of the Ethos resource to get data for.version
- The desired resource version header to use, as provided in the HTTP Accept Header of the request.pageSize
- The number of rows to include in each page (EthosResponse) of the list returned.numRows
- The number of rows of the given resource to return.classType
- The class of the generic type object containing the response body to return within the EthosResponse.- Returns:
- A list of
EthosResponse
s where eachEthosResponse
in the list represents a page of data with the given page size according to the requested version of the resource, up to the number of rows specified or the total count of the resource (whichever is less). - Throws:
IOException
- Propagates this exception if it occurs when making the call in theEthosClient
.
-
getRows
public List<EthosResponse> getRows(String resourceName, int pageSize, int numRows, Class classType) throws IOException
Gets some number of rows for the given resource and page size. The number of rows is returned as a paged-based list of EthosResponses, altogether containing the number of rows. Uses the default version of the resource. The response body is returned within each EthosResponse from the returned list as a list of objects of the given class type.- Parameters:
resourceName
- The name of the Ethos resource to get data for.pageSize
- The number of rows to include in each page (EthosResponse) of the list returned.numRows
- The number of rows of the given resource to return.classType
- The class of the generic type object containing the response body to return within the EthosResponse.- Returns:
- A list of
EthosResponse
s where eachEthosResponse
in the list represents a page of data with the given page size according to the default version of the resource, up to the number of rows specified or the total count of the resource (whichever is less). - Throws:
IOException
- Propagates this exception if it occurs when making the call in theEthosClient
.
-
getRows
public List<EthosResponse> getRows(String resourceName, String version, int numRows, Class classType) throws IOException
Gets some number of rows for the given resource and version. The number of rows is returned as a paged-based list of EthosResponses, altogether containing the number of rows. Uses the default page size of the response body content length. The response body is returned within each EthosResponse from the returned list as a list of objects of the given class type.- Parameters:
resourceName
- The name of the Ethos resource to get data for.version
- The desired resource version header to use, as provided in the HTTP Accept Header of the request.numRows
- The number of rows of the given resource to return.classType
- The class of the generic type object containing the response body to return within the EthosResponse.- Returns:
- A list of
EthosResponse
s where eachEthosResponse
in the list represents a page of data with the response content body length as the page size according to the requested version of the resource, up to the number of rows specified or the total count of the resource (whichever is less). - Throws:
IOException
- Propagates this exception if it occurs when making the call in theEthosClient
.
-
getRows
public List<EthosResponse> getRows(String resourceName, int numRows, Class classType) throws IOException
Gets some number of rows for the given resource. The number of rows is returned as a paged-based list of EthosResponses, altogether containing the number of rows. Uses the default page size of the response body content length, and the default version of the resource. The response body is returned within each EthosResponse from the returned list as a list of objects of the given class type.- Parameters:
resourceName
- The name of the Ethos resource to get data for.numRows
- The number of rows of the given resource to return.classType
- The class of the generic type object containing the response body to return within the EthosResponse.- Returns:
- A list of
EthosResponse
s where eachEthosResponse
in the list represents a page of data with the response content body length as the page size according to the default version of the resource, up to the number of rows specified or the total count of the resource (whichever is less). - Throws:
IOException
- Propagates this exception if it occurs when making the call in theEthosClient
.
-
getRowsAsStrings
public List<String> getRowsAsStrings(String resourceName, int numRows) throws IOException
Gets some number of rows for the given resource. The number of rows is returned as a row-based list of Strings, the size of which is the number of rows requested. Uses the default version of the resource, and the default page size of the response body content length during internal paging operations.- Parameters:
resourceName
- The name of the Ethos resource to get data for.numRows
- The number of rows of the given resource to return.- Returns:
- A list of JSON formatted
String
s where eachString
in the list represents a row (or individual instance) of a resource, where the length of the list returned is the number of rows requested or the total count of the resource (whichever is less). - Throws:
IOException
- Propagates this exception if it occurs when making the call in theEthosClient
.
-
getRowsAsStrings
public List<String> getRowsAsStrings(String resourceName, String version, int numRows) throws IOException
Gets some number of rows for the given resource. The number of rows is returned as a row-based list of Strings, the size of which is the number of rows requested. Uses the default page size of the response body content length during internal paging operations.- Parameters:
resourceName
- The name of the Ethos resource to get data for.version
- The desired resource version header to use, as provided in the HTTP Accept Header of the request.numRows
- The number of rows of the given resource to return.- Returns:
- A list of JSON formatted
String
s where eachString
in the list represents a row (or individual instance) of a resource, where the length of the list returned is the number of rows requested or the total count of the resource (whichever is less). - Throws:
IOException
- Propagates this exception if it occurs when making the call in theEthosClient
.
-
getRowsAsStrings
public List<String> getRowsAsStrings(String resourceName, int pageSize, int numRows) throws IOException
Gets some number of rows for the given resource and page size. The number of rows is returned as a row-based list of Strings, the size of which is the number of rows requested. Uses the default version of the resource.- Parameters:
resourceName
- The name of the Ethos resource to get data for.pageSize
- The number of rows to include in each page during execution of paging operations. This value is used internally by the SDK during paging operations.numRows
- The number of rows of the given resource to return.- Returns:
- A list of JSON formatted
String
s where eachString
in the list represents a row (or individual instance) of a resource, where the length of the list returned is the number of rows requested or the total count of the resource (whichever is less). - Throws:
IOException
- Propagates this exception if it occurs when making the call in theEthosClient
.
-
getRowsAsStrings
public List<String> getRowsAsStrings(String resourceName, String version, int pageSize, int numRows) throws IOException
Gets some number of rows for the given resource, version, and page size. The number of rows is returned as a row-based list of Strings, the size of which is the number of rows requested.- Parameters:
resourceName
- The name of the Ethos resource to get data for.version
- The desired resource version header to use, as provided in the HTTP Accept Header of the request.pageSize
- The number of rows to include in each page during execution of paging operations. This value is used internally by the SDK during paging operations.numRows
- The number of rows of the given resource to return.- Returns:
- A list of JSON formatted
String
s where eachString
in the list represents a row (or individual instance) of a resource, where the length of the list returned is the number of rows requested or the total count of the resource (whichever is less). - Throws:
IOException
- Propagates this exception if it occurs when making the call in theEthosClient
.
-
getRowsAsJsonNodes
public List<com.fasterxml.jackson.databind.JsonNode> getRowsAsJsonNodes(String resourceName, int numRows) throws IOException
Gets some number of rows for the given resource. The number of rows is returned as a row-based list of JsonNodes, the size of which is the number of rows requested. Uses the default version of the resource, and the default page size of the response body content length during internal paging operations.- Parameters:
resourceName
- The name of the Ethos resource to get data for.numRows
- The number of rows of the given resource to return.- Returns:
- A list of
JsonNode
s where eachJsonNode
in the list represents a row (or individual instance) of a resource, where the length of the list returned is the number of rows requested or the total count of the resource (whichever is less). - Throws:
IOException
- Propagates this exception if it occurs when making the call in theEthosClient
.
-
getRowsAsJsonNodes
public List<com.fasterxml.jackson.databind.JsonNode> getRowsAsJsonNodes(String resourceName, String version, int numRows) throws IOException
Gets some number of rows for the given resource and version. The number of rows is returned as a row-based list of JsonNodes, the size of which is the number of rows requested. Uses the default page size of the response body content length during internal paging operations.- Parameters:
resourceName
- The name of the Ethos resource to get data for.version
- The desired resource version header to use, as provided in the HTTP Accept Header of the request.numRows
- The number of rows of the given resource to return.- Returns:
- A list of
JsonNode
s where eachJsonNode
in the list represents a row (or individual instance) of a resource, where the length of the list returned is the number of rows requested or the total count of the resource (whichever is less). - Throws:
IOException
- Propagates this exception if it occurs when making the call in theEthosClient
.
-
getRowsAsJsonNodes
public List<com.fasterxml.jackson.databind.JsonNode> getRowsAsJsonNodes(String resourceName, int pageSize, int numRows) throws IOException
Gets some number of rows for the given resource and page size. The number of rows is returned as a row-based list of JsonNodes, the size of which is the number of rows requested. Uses the default version of the resource.- Parameters:
resourceName
- The name of the Ethos resource to get data for.pageSize
- The number of rows to include in each page during execution of paging operations. This value is used internally by the SDK during paging operations.numRows
- The number of rows of the given resource to return.- Returns:
- A list of
JsonNode
s where eachJsonNode
in the list represents a row (or individual instance) of a resource, where the length of the list returned is the number of rows requested or the total count of the resource (whichever is less). - Throws:
IOException
- Propagates this exception if it occurs when making the call in theEthosClient
.
-
getRowsAsJsonNodes
public List<com.fasterxml.jackson.databind.JsonNode> getRowsAsJsonNodes(String resourceName, String version, int pageSize, int numRows) throws IOException
Gets some number of rows for the given resource, version, and page size. The number of rows is returned as a row-based list of JsonNodes, the size of which is the number of rows requested.- Parameters:
resourceName
- The name of the Ethos resource to get data for.version
- The desired resource version header to use, as provided in the HTTP Accept Header of the request.pageSize
- The number of rows to include in each page during execution of paging operations. This value is used internally by the SDK during paging operations.numRows
- The number of rows of the given resource to return.- Returns:
- A list of
JsonNode
s where eachJsonNode
in the list represents a row (or individual instance) of a resource, where the length of the list returned is the number of rows requested or the total count of the resource (whichever is less). - Throws:
IOException
- Propagates this exception if it occurs when making the call in theEthosClient
.
-
getRowsFromOffset
public List<EthosResponse> getRowsFromOffset(String resourceName, int offset, int numRows) throws IOException
Gets some number of rows for the given resource from the given offset. The number of rows is returned in a list of pages altogether containing the number of rows. Uses the default page size of the response body content length and the default version of the resource.- Parameters:
resourceName
- The name of the Ethos resource to get data for.offset
- The 0 based index from which to begin paging for the given resource.numRows
- The number of rows of the given resource to return.- Returns:
- A list of
EthosResponse
s where eachEthosResponse
in the list represents a page of data with the response content body length as the page size according to the default version of the resource, beginning at the given offset index and up to the number of rows specified or the total count of the resource (whichever is less). - Throws:
IOException
- Propagates this exception if it occurs when making the call in theEthosClient
.
-
getRowsFromOffset
public List<EthosResponse> getRowsFromOffset(String resourceName, int pageSize, int offset, int numRows) throws IOException
Gets some number of rows for the given resource and page size from the given offset. The number of rows is returned in a list of pages altogether containing the number of rows. Uses the default version of the resource.- Parameters:
resourceName
- The name of the Ethos resource to get data for.pageSize
- The number of rows to include in each page (EthosResponse) of the list returned.offset
- The 0 based index from which to begin paging for the given resource.numRows
- The number of rows of the given resource to return.- Returns:
- A list of
EthosResponse
s where eachEthosResponse
in the list represents a page of data with the given page size according to the default version of the resource, beginning at the given offset index and up to the number of rows specified or the total count of the resource (whichever is less). - Throws:
IOException
- Propagates this exception if it occurs when making the call in theEthosClient
.
-
getRowsFromOffset
public List<EthosResponse> getRowsFromOffset(String resourceName, String version, int offset, int numRows) throws IOException
Gets some number of rows for the given resource and version from the given offset. The number of rows is returned in a list of pages altogether containing the number of rows. Uses the default page size of the response body content length.- Parameters:
resourceName
- The name of the Ethos resource to get data for.version
- The desired resource version header to use, as provided in the HTTP Accept Header of the request.offset
- The 0 based index from which to begin paging for the given resource.numRows
- The number of rows of the given resource to return.- Returns:
- A list of
EthosResponse
s where eachEthosResponse
in the list represents a page of data with the response content body length as the page size according to the requested version of the resource, beginning at the given offset index and up to the number of rows specified or the total count of the resource (whichever is less). - Throws:
IOException
- Propagates this exception if it occurs when making the call in theEthosClient
.
-
getRowsFromOffset
public List<EthosResponse> getRowsFromOffset(String resourceName, String version, int pageSize, int offset, int numRows) throws IOException
Gets some number of rows for the given resource, version, and page size, from the given offset. The number of rows is returned in a list of pages altogether containing the number of rows. If both the offset and numRows are negative, all pages will be returned. If the offset is negative, pages up to the numRows will be returned. If numRows is negative, all pages from the offset will be returned.- Parameters:
resourceName
- The name of the Ethos resource to get data for.version
- The desired resource version header to use, as provided in the HTTP Accept Header of the request.pageSize
- The number of rows to include in each page (EthosResponse) of the list returned.offset
- The 0 based index from which to begin paging for the given resource.numRows
- The number of rows of the given resource to return.- Returns:
- A list of
EthosResponse
s where eachEthosResponse
in the list represents a page of data with the given page size according to the requested version of the resource, beginning at the given offset index and up to the number of rows specified or the total count of the resource (whichever is less). - Throws:
IOException
- Propagates this exception if it occurs when making the call in theEthosClient
.
-
getRowsFromOffset
public List<EthosResponse> getRowsFromOffset(String resourceName, String version, int pageSize, int offset, int numRows, Class classType) throws IOException
Gets some number of rows for the given resource, version, and page size, from the given offset. The number of rows is returned in a list of pages altogether containing the number of rows. If both the offset and numRows are negative, all pages will be returned. If the offset is negative, pages up to the numRows will be returned. If numRows is negative, all pages from the offset will be returned. The response body is returned within each EthosResponse from the returned list as a list of objects of the given class type, if the classType is not null. If the classType is null, the returned EthosResponse will not contain a generic type object response body, but only a JSON formatted string response body.- Parameters:
resourceName
- The name of the Ethos resource to get data for.version
- The desired resource version header to use, as provided in the HTTP Accept Header of the request.pageSize
- The number of rows to include in each page (EthosResponse) of the list returned.offset
- The 0 based index from which to begin paging for the given resource.numRows
- The number of rows of the given resource to return.classType
- The class of the generic type object containing the response body to return within the EthosResponse.- Returns:
- A list of
EthosResponse
s where eachEthosResponse
in the list represents a page of data with the given page size according to the requested version of the resource, beginning at the given offset index and up to the number of rows specified or the total count of the resource (whichever is less). - Throws:
IOException
- Propagates this exception if it occurs when making the call in theEthosClient
.
-
getRowsFromOffset
public List<EthosResponse> getRowsFromOffset(String resourceName, String version, int offset, int numRows, Class classType) throws IOException
Gets some number of rows for the given resource and version from the given offset. The number of rows is returned in a list of pages altogether containing the number of rows. Uses the default page size of the response body content length. The response body is returned within each EthosResponse from the returned list as a list of objects of the given class type.- Parameters:
resourceName
- The name of the Ethos resource to get data for.version
- The desired resource version header to use, as provided in the HTTP Accept Header of the request.offset
- The 0 based index from which to begin paging for the given resource.numRows
- The number of rows of the given resource to return.classType
- The class of the generic type object containing the response body to return within the EthosResponse.- Returns:
- A list of
EthosResponse
s where eachEthosResponse
in the list represents a page of data with the response content body length as the page size according to the requested version of the resource, beginning at the given offset index and up to the number of rows specified or the total count of the resource (whichever is less). - Throws:
IOException
- Propagates this exception if it occurs when making the call in theEthosClient
.
-
getRowsFromOffset
public List<EthosResponse> getRowsFromOffset(String resourceName, int offset, int numRows, Class classType) throws IOException
Gets some number of rows for the given resource from the given offset. The number of rows is returned in a list of pages altogether containing the number of rows. Uses the default page size of the response body content length and the default version of the resource. The response body is returned within each EthosResponse from the returned list as a list of objects of the given class type.- Parameters:
resourceName
- The name of the Ethos resource to get data for.offset
- The 0 based index from which to begin paging for the given resource.numRows
- The number of rows of the given resource to return.classType
- The class of the generic type object containing the response body to return within the EthosResponse.- Returns:
- A list of
EthosResponse
s where eachEthosResponse
in the list represents a page of data with the response content body length as the page size according to the default version of the resource, beginning at the given offset index and up to the number of rows specified or the total count of the resource (whichever is less). - Throws:
IOException
- Propagates this exception if it occurs when making the call in theEthosClient
.
-
getRowsFromOffset
public List<EthosResponse> getRowsFromOffset(String resourceName, int pageSize, int offset, int numRows, Class classType) throws IOException
Gets some number of rows for the given resource and page size from the given offset. The number of rows is returned in a list of pages altogether containing the number of rows. Uses the default version of the resource. The response body is returned within each EthosResponse from the returned list as a list of objects of the given class type.- Parameters:
resourceName
- The name of the Ethos resource to get data for.pageSize
- The number of rows to include in each page (EthosResponse) of the list returned.offset
- The 0 based index from which to begin paging for the given resource.numRows
- The number of rows of the given resource to return.classType
- The class of the generic type object containing the response body to return within the EthosResponse.- Returns:
- A list of
EthosResponse
s where eachEthosResponse
in the list represents a page of data with the given page size according to the default version of the resource, beginning at the given offset index and up to the number of rows specified or the total count of the resource (whichever is less). - Throws:
IOException
- Propagates this exception if it occurs when making the call in theEthosClient
.
-
getRowsFromOffsetAsStrings
public List<String> getRowsFromOffsetAsStrings(String resourceName, int offset, int numRows) throws IOException
Gets some number of rows for the given resource from the given offset. The number of rows is returned as a row-based list of Strings, the size of which is the number of rows requested. Uses the default page size of the response body content length during internal paging operations, and the default version of the resource.- Parameters:
resourceName
- The name of the Ethos resource to get data for.offset
- The 0 based index from which to begin paging for the given resource.numRows
- The number of rows of the given resource to return.- Returns:
- A list of JSON formatted
String
s where eachString
in the list represents a row (or individual instance) of a resource, where the length of the list returned is the number of rows requested or the total count of the resource (whichever is less). - Throws:
IOException
- Propagates this exception if it occurs when making the call in theEthosClient
.
-
getRowsFromOffsetAsStrings
public List<String> getRowsFromOffsetAsStrings(String resourceName, int pageSize, int offset, int numRows) throws IOException
Gets some number of rows for the given resource and page size, from the given offset. The number of rows is returned as a row-based list of Strings, the size of which is the number of rows requested. Uses the default version of the resource.- Parameters:
resourceName
- The name of the Ethos resource to get data for.pageSize
- The number of rows to include in each page during execution of paging operations. This value is used internally by the SDK during paging operations.offset
- The 0 based index from which to begin paging for the given resource.numRows
- The number of rows of the given resource to return.- Returns:
- A list of JSON formatted
String
s where eachString
in the list represents a row (or individual instance) of a resource, where the length of the list returned is the number of rows requested or the total count of the resource (whichever is less). - Throws:
IOException
- Propagates this exception if it occurs when making the call in theEthosClient
.
-
getRowsFromOffsetAsStrings
public List<String> getRowsFromOffsetAsStrings(String resourceName, String version, int offset, int numRows) throws IOException
Gets some number of rows for the given resource and version, from the given offset. The number of rows is returned as a row-based list of Strings, the size of which is the number of rows requested. Uses the default page size of the response body content length during internal paging operations.- Parameters:
resourceName
- The name of the Ethos resource to get data for.version
- The desired resource version header to use, as provided in the HTTP Accept Header of the request.offset
- The 0 based index from which to begin paging for the given resource.numRows
- The number of rows of the given resource to return.- Returns:
- A list of JSON formatted
String
s where eachString
in the list represents a row (or individual instance) of a resource, where the length of the list returned is the number of rows requested or the total count of the resource (whichever is less). - Throws:
IOException
- Propagates this exception if it occurs when making the call in theEthosClient
.
-
getRowsFromOffsetAsStrings
public List<String> getRowsFromOffsetAsStrings(String resourceName, String version, int pageSize, int offset, int numRows) throws IOException
Gets some number of rows for the given resource, version, and page size, from the given offset. The number of rows is returned as a row-based list of Strings, the size of which is the number of rows requested.- Parameters:
resourceName
- The name of the Ethos resource to get data for.version
- The desired resource version header to use, as provided in the HTTP Accept Header of the request.pageSize
- The number of rows to include in each page during execution of paging operations. This value is used internally by the SDK during paging operations.offset
- The 0 based index from which to begin paging for the given resource.numRows
- The number of rows of the given resource to return.- Returns:
- A list of JSON formatted
String
s where eachString
in the list represents a row (or individual instance) of a resource, where the length of the list returned is the number of rows requested or the total count of the resource (whichever is less). - Throws:
IOException
- Propagates this exception if it occurs when making the call in theEthosClient
.
-
getRowsFromOffsetAsJsonNodes
public List<com.fasterxml.jackson.databind.JsonNode> getRowsFromOffsetAsJsonNodes(String resourceName, int offset, int numRows) throws IOException
Gets some number of rows for the given resource from the given offset. The number of rows is returned as a row-based list of JsonNodes, the size of which is the number of rows requested. Uses the default page size of the response body content length during internal paging operations, and the default version of the resource.- Parameters:
resourceName
- The name of the Ethos resource to get data for.offset
- The 0 based index from which to begin paging for the given resource.numRows
- The number of rows of the given resource to return.- Returns:
- A list of
JsonNode
s where eachJsonNode
in the list represents a row (or individual instance) of a resource, where the length of the list returned is the number of rows requested or the total count of the resource (whichever is less). - Throws:
IOException
- Propagates this exception if it occurs when making the call in theEthosClient
.
-
getRowsFromOffsetAsJsonNodes
public List<com.fasterxml.jackson.databind.JsonNode> getRowsFromOffsetAsJsonNodes(String resourceName, int pageSize, int offset, int numRows) throws IOException
Gets some number of rows for the given resource and page size, from the given offset. The number of rows is returned as a row-based list of JsonNodes, the size of which is the number of rows requested. Uses the default version of the resource.- Parameters:
resourceName
- The name of the Ethos resource to get data for.pageSize
- The number of rows to include in each page during execution of paging operations. This value is used internally by the SDK during paging operations.offset
- The 0 based index from which to begin paging for the given resource.numRows
- The number of rows of the given resource to return.- Returns:
- A list of
JsonNode
s where eachJsonNode
in the list represents a row (or individual instance) of a resource, where the length of the list returned is the number of rows requested or the total count of the resource (whichever is less). - Throws:
IOException
- Propagates this exception if it occurs when making the call in theEthosClient
.
-
getRowsFromOffsetAsJsonNodes
public List<com.fasterxml.jackson.databind.JsonNode> getRowsFromOffsetAsJsonNodes(String resourceName, String version, int offset, int numRows) throws IOException
Gets some number of rows for the given resource and version, from the given offset. The number of rows is returned as a row-based list of JsonNodes, the size of which is the number of rows requested. Uses the default page size of the response body content length during internal paging operations.- Parameters:
resourceName
- The name of the Ethos resource to get data for.version
- The desired resource version header to use, as provided in the HTTP Accept Header of the request.offset
- The 0 based index from which to begin paging for the given resource.numRows
- The number of rows of the given resource to return.- Returns:
- A list of
JsonNode
s where eachJsonNode
in the list represents a row (or individual instance) of a resource, where the length of the list returned is the number of rows requested or the total count of the resource (whichever is less). - Throws:
IOException
- Propagates this exception if it occurs when making the call in theEthosClient
.
-
getRowsFromOffsetAsJsonNodes
public List<com.fasterxml.jackson.databind.JsonNode> getRowsFromOffsetAsJsonNodes(String resourceName, String version, int pageSize, int offset, int numRows) throws IOException
Gets some number of rows for the given resource, version, and page size, from the given offset. The number of rows is returned as a row-based list of JsonNodes, the size of which is the number of rows requested.- Parameters:
resourceName
- The name of the Ethos resource to get data for.version
- The desired resource version header to use, as provided in the HTTP Accept Header of the request.pageSize
- The number of rows to include in each page during execution of paging operations. This value is used internally by the SDK during paging operations.offset
- The 0 based index from which to begin paging for the given resource.numRows
- The number of rows of the given resource to return.- Returns:
- A list of
JsonNode
s where eachJsonNode
in the list represents a row (or individual instance) of a resource, where the length of the list returned is the number of rows requested or the total count of the resource (whichever is less). - Throws:
IOException
- Propagates this exception if it occurs when making the call in theEthosClient
.
-
getById
public EthosResponse getById(String resourceName, String id) throws IOException
Gets a resource by ID (GUID) for the given resource name. Uses the default version.- Parameters:
resourceName
- The name of the Ethos resource to get data for.id
- The unique ID (GUID) of the resource to get.- Returns:
- The data for a given resource in an
EthosResponse
according to the default version of the resource. TheEthosResponse
contains the content body of the resource data as well as headers and the Http status code. - Throws:
IOException
- Propagates this exception if it occurs when making the call in theEthosClient
.
-
getById
public EthosResponse getById(String resourceName, String id, String version) throws IOException
Gets a resource by ID (GUID) for the given resource name and version.- Parameters:
resourceName
- The name of the Ethos resource to get data for.id
- The unique ID (GUID) of the resource to get.version
- The desired resource version header to use, as provided in the HTTP Accept Header of the request.- Returns:
- The data for a given resource in an
EthosResponse
according to the requested version of the resource. TheEthosResponse
contains the content body of the resource data as well as headers and the Http status code. - Throws:
IOException
- Propagates this exception if it occurs when making the call in theEthosClient
.
-
getById
public EthosResponse getById(String resourceName, String id, Class classType) throws IOException
Gets a resource by ID (GUID) for the given resource name. Uses the default version. The response body is returned within the EthosResponse as an object of the given class type, if the classType is not null. If the classType is null, the returned EthosResponse will not contain a generic type object response body, but only a JSON formatted string response body.- Parameters:
resourceName
- The name of the Ethos resource to get data for.id
- The unique ID (GUID) of the resource to get.classType
- The class of the generic type object containing the response body to return within the EthosResponse.- Returns:
- The data for a given resource in an
EthosResponse
according to the default version of the resource. TheEthosResponse
contains the content body of the resource data as well as headers and the Http status code. - Throws:
IOException
- Propagates this exception if it occurs when making the call in theEthosClient
.
-
getById
public EthosResponse getById(String resourceName, String id, String version, Class classType) throws IOException
Gets a resource by ID (GUID) for the given resource name and version. The response body is returned within the EthosResponse as an object of the given class type, if the classType is not null. If the classType is null, the returned EthosResponse will not contain a generic type object response body, but only a JSON formatted string response body.- Parameters:
resourceName
- The name of the Ethos resource to get data for.id
- The unique ID (GUID) of the resource to get.version
- The desired resource version header to use, as provided in the HTTP Accept Header of the request.classType
- The class of the generic type object containing the response body to return within the EthosResponse.- Returns:
- The data for a given resource in an
EthosResponse
according to the requested version of the resource. TheEthosResponse
contains the content body of the resource data as well as headers and the Http status code. - Throws:
IOException
- Propagates this exception if it occurs when making the call in theEthosClient
.
-
getByIdAsString
public String getByIdAsString(String resourceName, String id) throws IOException
Gets a resource by ID (GUID) for the given resource name. Uses the default version.- Parameters:
resourceName
- The name of the Ethos resource to get data for.id
- The unique ID (GUID) of the resource to get.- Returns:
- The data for a given resource as a
String
according to the default version of the resource. Only returns the content body of theEthosResponse
. Does not return header information or the Http status code. - Throws:
IOException
- Propagates this exception if it occurs when making the call in theEthosClient
.
-
getByIdAsString
public String getByIdAsString(String resourceName, String id, String version) throws IOException
Gets a resource by ID (GUID) for the given resource name and version.- Parameters:
resourceName
- The name of the Ethos resource to get data for.id
- The unique ID (GUID) of the resource to get.version
- The desired resource version header to use, as provided in the HTTP Accept Header of the request.- Returns:
- The data for a given resource as a
String
according to the requested version of the resource. Only returns the content body of theEthosResponse
. Does not return header information or the Http status code. - Throws:
IOException
- Propagates this exception if it occurs when making the call in theEthosClient
.
-
getByIdAsJsonNode
public com.fasterxml.jackson.databind.JsonNode getByIdAsJsonNode(String resourceName, String id) throws IOException
Gets a resource by ID (GUID) for the given resource name. Uses the default version.- Parameters:
resourceName
- The name of the Ethos resource to get data for.id
- The unique ID (GUID) of the resource to get.- Returns:
- The data for a given resource as a
JsonNode
according to the default version of the resource. Only returns the content body of theEthosResponse
. Does not return header information or the Http status code. - Throws:
IOException
- Propagates this exception if it occurs when making the call in theEthosClient
.
-
getByIdAsJsonNode
public com.fasterxml.jackson.databind.JsonNode getByIdAsJsonNode(String resourceName, String id, String version) throws IOException
Gets a resource by ID (GUID) for the given resource name and version.- Parameters:
resourceName
- The name of the Ethos resource to get data for.id
- The unique ID (GUID) of the resource to get.version
- The desired resource version header to use, as provided in the HTTP Accept Header of the request.- Returns:
- The data for a given resource as a
JsonNode
according to the requested version of the resource. Only returns the content body of theEthosResponse
. Does not return header information or the Http status code. - Throws:
IOException
- Propagates this exception if it occurs when making the call in theEthosClient
.
-
buildHeadersMap
protected Map<String,String> buildHeadersMap(String version)
Intended to be used internally by the SDK.Builds a map of headers with the given version. If the version is null or empty, uses the default version.
- Parameters:
version
- the version to use for the Accept and Content-Type headers, as supplied in the returned map.- Returns:
- a
Map<String,String>
of header values including Accept and Content-Type (both set to the given version.
-
prepareForPaging
protected Pager prepareForPaging(Pager pager) throws IOException
Intended to be used internally within the SDK.
Uses the given pager object to prepare for paging operations. The pager object is used to contain various fields required for paging. If the given pager is null, returns the same pager. Sets default values for the version and offset within the pager as needed and makes an initial call for the pager resource to get metadata about the resource used for paging. Also sets the page size and the total count within the pager.- Parameters:
pager
- The Pager object used holding the required fields for paging.- Returns:
- The same pager object with the version and offset validated, and the page size and total count set.
- Throws:
IOException
- Propagates this exception if it occurs when making the call in theEthosClient
.
-
shouldDoPaging
protected Pager shouldDoPaging(Pager pager, boolean forNumRows)
Intended to be used internally within the SDK.
Determines whether paging should be done for the resource within the given pager. Supports normal paging (by total count) or paging for number of rows. If normal paging, then the need to page is determined by comparing the total count with the page size. If paging for number of rows, the need to page is determined by comparing the number of rows with the page size.- Parameters:
pager
- The Pager object containing the total count or numRows, and page size to determine the need to page.forNumRows
- If true, then paging is by numRows. If false, then paging is by total count.- Returns:
- the given pager object with the shouldDoPaging flag set to true when paging is needed, or false when not.
-
needToPage
protected boolean needToPage(String proxyApiResponseBody, int totalCount) throws com.fasterxml.jackson.core.JsonProcessingException
Intended to be used internally within the SDK.
Determines the need to page by comparing the proxyApiResponseBody as a JsonNode to the given total count.- Parameters:
proxyApiResponseBody
- A Json array of rows (as a single String) equivalent to a single page of some resource.totalCount
- the total count of rows for some resource.- Returns:
- true if paging is needed, false otherwise.
- Throws:
com.fasterxml.jackson.core.JsonProcessingException
- Thrown if the JacksonobjectMapper
cannot read the proxyApiResponseBody.
-
needToPage
protected boolean needToPage(com.fasterxml.jackson.databind.JsonNode jsonNode, int totalCount)
Intended to be used internally within the SDK.
Determines the need to page given a JsonNode and the total count of rows for some resource. The size of the JsonNode is compared to the given total count to determine if paging is needed.- Parameters:
jsonNode
- AJsonNode
containing a page of resource data.totalCount
- The total count of rows for some resource.- Returns:
- true if paging is needed, false otherwise.
-
needToPage
protected boolean needToPage(int pageSize, int totalCount)
Intended to be used internally within the SDK.
A simple comparison which is used by the other needToPage() methods, comparing the given page size to the total count. If the page size is less than the total count, then paging is needed. If not, paging is not needed.- Parameters:
pageSize
- The page size for some resource.totalCount
- The total count for some resource.- Returns:
- true if the given page size is less than the total count, false if not.
-
handlePaging
protected List<EthosResponse> handlePaging(Pager pager) throws IOException
Intended to be used internally within the SDK.
For some resource defined within the given pager, determines whether to page for data, or to use the data obtained during paging preparation.- Parameters:
pager
- A pager previously prepared for paging (seeprepareForPaging()
andshouldDoPaging()
.- Returns:
- a list of
EthosResponse
s where eachEthosResponse
in the list contains a page of data. - Throws:
IOException
- Propagates this exception if it occurs when making the call in theEthosClient
.
-
getDataFromPaging
protected List<EthosResponse> getDataFromPaging(Pager pager) throws IOException
Intended to be used internally within the SDK.
Determines how to page given the "howToPage" attribute of the pager. The howToPage attribute must be one of the defined PagingTypes.- Parameters:
pager
- A previously prepared pager with the howToPage attribute set appropriately.- Returns:
- a list of
EthosResponse
s where eachEthosResponse
in the list contains a page of data. - Throws:
IOException
- Propagates this exception if it occurs when making the call in theEthosClient
.
-
getDataFromInitialContent
protected List<EthosResponse> getDataFromInitialContent(Pager pager) throws com.fasterxml.jackson.core.JsonProcessingException
Intended to be used internally within the SDK.
Gets resource data from the initial content obtained when preparing for paging. This method does not page for data. Supports trimming the data content according to the given PagingType (howToPage attribute).- Parameters:
pager
- A pager previously prepared for paging.- Returns:
- A list of
EthosResponse
s containing a single page of data, which may be trimmed according to the howToPage PagingType specified in the pager. - Throws:
com.fasterxml.jackson.core.JsonProcessingException
- Propagated from the ethosResponseConverter if an error occurs when trimming the data.
-
doPagingForAll
protected List<EthosResponse> doPagingForAll(String resourceName, String version, int totalCount, int pageSize) throws IOException
Intended to be used internally within the SDK.
Used within the SDK to page for all pages for a given resource by using an offset of 0.- Parameters:
resourceName
- The name of the Ethos resource to get data for.version
- The desired resource version header to use, as provided in the HTTP Accept Header of the request.totalCount
- The total count of rows for the given resource.pageSize
- The number of rows to include in each page (EthosResponse) of the list returned.- Returns:
- A list of
EthosResponse
s where eachEthosResponse
in the list represents a page. - Throws:
IOException
- Propagates this exception if it occurs when making the call in theEthosClient
.
-
doPagingFromOffset
protected List<EthosResponse> doPagingFromOffset(String resourceName, String version, String filter, int totalCount, int pageSize, int offset) throws IOException
Intended to be used internally within the SDK.
- Parameters:
resourceName
- The name of the Ethos resource to get data for.version
- The desired resource version header to use, as provided in the HTTP Accept Header of the request.filter
- The string resource filter in JSON format contained in the URL, e.g:?criteria={"names":[{"firstName":"John"}]}
totalCount
- The total count of rows for the given resource.pageSize
- The number of rows to include in each page (EthosResponse) of the list returned.offset
- The 0 based index from which to begin paging for the given resource.- Returns:
- A list of
EthosResponse
s where eachEthosResponse
in the list represents a page, beginning from the given offset index. - Throws:
IOException
- Propagates this exception if it occurs when making the call in theEthosClient
.
-
doPagingForNumPages
protected List<EthosResponse> doPagingForNumPages(String resourceName, String version, int totalCount, int pageSize, int numPages) throws IOException
Intended to be used internally within the SDK.
Used within the SDK to page for some number of pages for a given resource by using an offset of 0.- Parameters:
resourceName
- The name of the Ethos resource to get data for.version
- The desired resource version header to use, as provided in the HTTP Accept Header of the request.totalCount
- The total count of rows for the given resource.pageSize
- The number of rows to include in each page (EthosResponse) of the list returned.numPages
- The number of pages to page for.- Returns:
- A list of
EthosResponse
s where eachEthosResponse
in the list represents a page, up to some number of pages. - Throws:
IOException
- Propagates this exception if it occurs when making the call in theEthosClient
.
-
doPagingFromOffsetForNumPages
protected List<EthosResponse> doPagingFromOffsetForNumPages(String resourceName, String version, int totalCount, int pageSize, int numPages, int offset) throws IOException
Intended to be used internally within the SDK.
Used within the SDK to page for some number of pages for a given resource from the given offset.- Parameters:
resourceName
- The name of the Ethos resource to get data for.version
- The desired resource version header to use, as provided in the HTTP Accept Header of the request.totalCount
- The total count of rows for the given resource.pageSize
- The number of rows to include in each page (EthosResponse) of the list returned.numPages
- The number of pages to page for.offset
- The 0 based index from which to begin paging for the given resource.- Returns:
- A list of
EthosResponse
s where eachEthosResponse
in the list represents a page, from the given offset (inclusive) and up to some number of pages (exclusive). - Throws:
IOException
- Propagates this exception if it occurs when making the call in theEthosClient
.
-
doPagingForNumRows
protected List<EthosResponse> doPagingForNumRows(String resourceName, String version, int totalCount, int pageSize, int numRows) throws IOException
Intended to be used internally within the SDK.
Used within the SDK to page for some number of rows for a given resource, using an offset of 0.- Parameters:
resourceName
- The name of the Ethos resource to get data for.version
- The desired resource version header to use, as provided in the HTTP Accept Header of the request.totalCount
- The total count of rows for the given resource.pageSize
- The number of rows to include in each page (EthosResponse) of the list returned.numRows
- The overall number of rows to page for.- Returns:
- A list of
EthosResponse
s where eachEthosResponse
in the list represents a page, up to the number of rows specified or the total count of the resource (whichever is less). - Throws:
IOException
- Propagates this exception if it occurs when making the call in theEthosClient
.
-
doPagingFromOffsetForNumRows
protected List<EthosResponse> doPagingFromOffsetForNumRows(String resourceName, String version, int totalCount, int pageSize, int offset, int numRows) throws IOException
Intended to be used internally within the SDK.
Used within the SDK to page for some number of rows for a given resource, using an offset of 0.- Parameters:
resourceName
- The name of the Ethos resource to get data for.version
- The desired resource version header to use, as provided in the HTTP Accept Header of the request.totalCount
- The total count of rows for the given resource.pageSize
- The number of rows to include in each page (EthosResponse) of the list returned.offset
- The 0 based index from which to begin paging for the given resource.numRows
- The overall number of rows to page for.- Returns:
- A list of
EthosResponse
s where eachEthosResponse
in the list represents a page, from the given offset (inclusive) and up to the number of rows specified (exclusive) or the total count of the resource (whichever is less). - Throws:
IOException
- Propagates this exception if it occurs when making the call in theEthosClient
.
-
getHeaderValue
protected String getHeaderValue(EthosResponse ethosResponse, String headerName)
Intended to be used internally within the SDK.
Returns the header value from the given ethosResponse.- Parameters:
ethosResponse
- TheEthosResponse
to get a header value from.headerName
- A header name following Ethos standards (such as "x-media-type").- Returns:
- The value of the given header. Returns null if the given ethosResponse is null or the header is not found.
-
getPageSize
public int getPageSize(String resourceName) throws IOException
Gets the page size for the given Ethos resource. Uses the default version of the resource.- Parameters:
resourceName
- The name of the Ethos resource to get the page size for.- Returns:
- The page size of the given resource.
- Throws:
IOException
- Propagates this exception if it occurs when making the call in theEthosClient
.
-
getPageSize
public int getPageSize(String resourceName, String version) throws IOException
Gets the page size for the given Ethos resource and version.- Parameters:
resourceName
- The name of the Ethos resource to get the page size for.version
- The desired resource version header to use, as provided in the HTTP Accept Header of the request.- Returns:
- The page size of the given resource.
- Throws:
IOException
- Propagates this exception if it occurs when making the call in theEthosClient
.
-
getMaxPageSize
public int getMaxPageSize(String resourceName) throws IOException
Gets the max page size for the given Ethos resource. Uses the default version of the resource.- Parameters:
resourceName
- The name of the Ethos resource to get the page size for.- Returns:
- The max page size for the resource as found using the x-max-page-size header.
- Throws:
IOException
- Propagates this exception if it occurs when making the call in theEthosClient
.
-
getMaxPageSize
public int getMaxPageSize(String resourceName, String version) throws IOException
Gets the max page size for the given Ethos resource and version.- Parameters:
resourceName
- The name of the Ethos resource to get the page size for.version
- The desired resource version header to use, as provided in the HTTP Accept Header of the request.- Returns:
- The max page size for the resource as found using the x-max-page-size header.
- Throws:
IOException
- Propagates this exception if it occurs when making the call in theEthosClient
.
-
getPageSize
protected int getPageSize(String resourceName, String version, EthosResponse ethosResponse) throws IOException
Intended to be used internally within the SDK.
Gets the page size for the given resourceName, version, and ethosResponse. If the ethosResponse is null, it will make a call to get the data for the given resource to then calculate the page size from the response body content.- Parameters:
resourceName
- The name of the Ethos resource to get the page size for.version
- The desired resource version header to use, as provided in the HTTP Accept Header of the request.ethosResponse
- AnEthosResponse
from which to calculate the page size using it's content body length, or null.- Returns:
- The page size for the given resource, or 0 if the resourceName is null or empty. Attempts to return the max page size for the given resource if the resource content body is null.
- Throws:
IOException
- Propagates this exception if it occurs when making the call in theEthosClient
.
-
getMaxPageSize
protected int getMaxPageSize(String resourceName, String version, EthosResponse ethosResponse) throws IOException
Intended to be used internally within the SDK.
Gets the max page size for the given resourceName, version, and ethosResponse. If the ethosResponse is null, it will make a call to get the data for the given resource to then calculate the page size from the response body content.- Parameters:
resourceName
- The name of the Ethos resource to get the page size for.version
- The desired resource version header to use, as provided in the HTTP Accept Header of the request.ethosResponse
- AnEthosResponse
from which to calculate the page size using it's content body length, or null.- Returns:
- The max page size for the given resource, or 0 if the resourceName is null or empty. Returns the default max page size of 500 for the given resource if the x-max-page-size header is not found.
- Throws:
IOException
- Propagates this exception if it occurs when making the call in theEthosClient
.
-
getTotalCount
public int getTotalCount(String resourceName) throws IOException
Gets the total count of rows for the given Ethos resource. Uses the default version of the resource.- Parameters:
resourceName
- The name of the Ethos resource to get the total count for.- Returns:
- The total count of rows for the resource as found using the x-total-count header.
- Throws:
IOException
- Propagates this exception if it occurs when making the call in theEthosClient
.
-
getTotalCount
public int getTotalCount(String resourceName, String version) throws IOException
Gets the total count of rows for the given Ethos resource and version.- Parameters:
resourceName
- The name of the Ethos resource to get the total count for.version
- The desired resource version header to use, as provided in the HTTP Accept Header of the request.- Returns:
- The total count of rows for the resource as found using the x-total-count header.
- Throws:
IOException
- Propagates this exception if it occurs when making the call in theEthosClient
.
-
getTotalCount
protected int getTotalCount(String resourceName, String version, EthosResponse ethosResponse) throws IOException
Intended to be used internally within the SDK.
Gets the total count of rows for the given Ethos resource, version, and ethosResponse. If the ethosResponse is null, a call will be made to get the resource data to then get the total count from the x-total-count header.- Parameters:
resourceName
- The name of the Ethos resource to get the page size for.version
- The desired resource version header to use, as provided in the HTTP Accept Header of the request.ethosResponse
- AnEthosResponse
from which to get the total count, or null.- Returns:
- The total count for the given resource, or 0 if the resourceName is null or empty.
- Throws:
IOException
- Propagates this exception if it occurs when making the call in theEthosClient
.
-
convertResponseContentToType
protected EthosResponse convertResponseContentToType(EthosResponse ethosResponse, Class classType) throws com.fasterxml.jackson.core.JsonProcessingException
Converts the response body content within the given EthosResponse to an object of the given class type. The response body is set within the returned EthosResponse.- Parameters:
ethosResponse
- The EthosResponse to convert the response body for.classType
- The class to use when converting the response body into an object.- Returns:
- The EthosResponse containing an object for the response body.
- Throws:
com.fasterxml.jackson.core.JsonProcessingException
- Propagated from the EthosResponseConverter if thrown.
-
convertResponseContentToTypedList
protected EthosResponse convertResponseContentToTypedList(EthosResponse ethosResponse, Class classType) throws com.fasterxml.jackson.core.JsonProcessingException
Converts the response body content within the given EthosResponse to a list of objects of the given class type. The response body list is set within the returned EthosResponse.- Parameters:
ethosResponse
- The EthosResponse to convert the response body for.classType
- The class to use when converting the response body into a list of objects.- Returns:
- The EthosResponse containing a list of objects for the response body.
- Throws:
com.fasterxml.jackson.core.JsonProcessingException
- Propagated from the EthosResponseConverter if thrown.
-
convertResponsesContentToTypedList
protected List<EthosResponse> convertResponsesContentToTypedList(List<EthosResponse> ethosResponseList, Class classType) throws com.fasterxml.jackson.core.JsonProcessingException
Converts the response body content of each EthosResponse within the given ethosResponseList to a list of objects of the given class type. The response body list is set within each EthosResponse in the ethosResponseList.- Parameters:
ethosResponseList
- The list of EthosResponses for which to convert the EthosResponse content into a list of objects of the given class type for each EthosResponse in the list.classType
- The class to use when converting the response body into a list of objects.- Returns:
- The EthosResponse containing a list of objects for the response body.
- Throws:
com.fasterxml.jackson.core.JsonProcessingException
- Propagated from the EthosResponseConverter if thrown.
-
-