public class ConfigsRequestExecutor extends PaginatedRequestExecutor<Configs>
ConfigsApi. Use this class if you want to obtain
configs through fluent API in chained fashion. Here is an example of how to use this executor:
IKontaktCloud kontaktCloud = KontaktCloud.newInstance();
Configs configs = kontaktCloud.configs().fetch()
.type(DeviceType.BEACON)
.profile(DeviceProfile.EDDYSTONE)
.maxResult(15)
.execute();
Keep in mind that device type must be specified so invocation of type method is mandatory.
Otherwise an exception will be thrown.eTag, maxResult, order, orderBy, query, startIndex| Constructor and Description |
|---|
ConfigsRequestExecutor(ConfigsService configsService)
Constructs request executor initialized with corresponding service class.
|
| Modifier and Type | Method and Description |
|---|---|
ConfigsRequestExecutor |
eTag(java.lang.String eTag)
Specifies HTTP entity tag purposed for caching REST API calls.
|
Configs |
execute()
Executes created request synchronously.
|
void |
execute(CloudCallback<Configs> callback)
Executes created request asynchronously and invokes callback with the result.
|
ConfigsRequestExecutor |
filter(java.lang.String query)
Specifies the filter for requested data.
|
ConfigsRequestExecutor |
maxResult(int maxResult)
Specifies the maximum size of response data collection.
|
ConfigsRequestExecutor |
orderBy(OrderBy orderBy,
Order order)
Specifies the ordering of response data elements.
|
protected java.util.Map<java.lang.String,java.lang.String> |
params()
Composes the request's query parameters in map.
|
protected retrofit2.Call<Configs> |
prepareCall()
Prepares a request to execute.
|
ConfigsRequestExecutor |
profile(DeviceProfile profile)
Specifies device profile.
|
ConfigsRequestExecutor |
startIndex(int startIndex)
Specifies the start index of requested data.
|
ConfigsRequestExecutor |
type(DeviceType type)
Specifies device type.
|
ConfigsRequestExecutor |
withIds(java.util.List<java.lang.String> uniqueIds)
Specifies config unique identifiers.
|
ConfigsRequestExecutor |
withIds(java.lang.String... uniqueIds)
Specifies config unique identifiers.
|
public ConfigsRequestExecutor(ConfigsService configsService)
configsService - the configs API service.public ConfigsRequestExecutor type(DeviceType type)
type - the device type.public ConfigsRequestExecutor profile(DeviceProfile profile)
profile - the device profile.public ConfigsRequestExecutor withIds(java.lang.String... uniqueIds)
uniqueIds - config unique identifiers.public ConfigsRequestExecutor withIds(java.util.List<java.lang.String> uniqueIds)
uniqueIds - config unique identifiers.public ConfigsRequestExecutor startIndex(int startIndex)
startIndex in class PaginatedRequestExecutor<Configs>startIndex - the start index.public ConfigsRequestExecutor maxResult(int maxResult)
maxResult in class PaginatedRequestExecutor<Configs>maxResult - the maximum response size value.public ConfigsRequestExecutor filter(java.lang.String query)
filter in class PaginatedRequestExecutor<Configs>query - the query filter.public ConfigsRequestExecutor orderBy(OrderBy orderBy, Order order)
orderBy in class PaginatedRequestExecutor<Configs>orderBy - the field type that specifies the order by column.order - ascending or descending.public ConfigsRequestExecutor eTag(java.lang.String eTag)
eTag in class PaginatedRequestExecutor<Configs>eTag - the entity tag value.public Configs execute() throws java.io.IOException, KontaktCloudException
execute in class RequestExecutor<Configs>java.io.IOException - exceptionKontaktCloudException - exceptionpublic void execute(CloudCallback<Configs> callback)
execute in class RequestExecutor<Configs>callback - the callback object.protected retrofit2.Call<Configs> prepareCall()
prepareCall in class RequestExecutor<Configs>protected java.util.Map<java.lang.String,java.lang.String> params()
params in class PaginatedRequestExecutor<Configs>