public class ManagersRequestExecutor extends PaginatedRequestExecutor<Managers>
ManagersApi
. Use this class if you want to fetch
managers through fluent API in chained fashion, for example:
IKontaktCloud kontaktCloud = KontaktCloud.newInstance();
Managers managers = kontaktCloud.managers().fetch()
.subordinatesOf(supervisorID)
.execute();
eTag, maxResult, order, orderBy, query, startIndex
Constructor and Description |
---|
ManagersRequestExecutor(ManagersService managersService)
Constructs request executor initialized with corresponding service class.
|
Modifier and Type | Method and Description |
---|---|
ManagersRequestExecutor |
eTag(java.lang.String eTag)
Specifies HTTP entity tag purposed for caching REST API calls.
|
ManagersRequestExecutor |
filter(java.lang.String query)
Specifies the filter for requested data.
|
ManagersRequestExecutor |
maxResult(int maxResult)
Specifies the maximum size of response data collection.
|
ManagersRequestExecutor |
orderBy(OrderBy orderBy,
Order order)
Specifies the ordering of response data elements.
|
protected retrofit2.Call<Managers> |
prepareCall()
Prepares a request to execute.
|
ManagersRequestExecutor |
startIndex(int startIndex)
Specifies the start index of requested data.
|
ManagersRequestExecutor |
subordinatesOf(java.util.UUID managerId)
We can use this method if we want to fetch all subordinate managers for the given manager.
|
params
execute, execute
public ManagersRequestExecutor(ManagersService managersService)
managersService
- the managers API service.public ManagersRequestExecutor subordinatesOf(java.util.UUID managerId)
managerId
- the manager's unique identifier.public ManagersRequestExecutor startIndex(int startIndex)
startIndex
in class PaginatedRequestExecutor<Managers>
startIndex
- the start index.public ManagersRequestExecutor maxResult(int maxResult)
maxResult
in class PaginatedRequestExecutor<Managers>
maxResult
- the maximum response size value.public ManagersRequestExecutor filter(java.lang.String query)
filter
in class PaginatedRequestExecutor<Managers>
query
- the query filter.public ManagersRequestExecutor orderBy(OrderBy orderBy, Order order)
orderBy
in class PaginatedRequestExecutor<Managers>
orderBy
- the field type that specifies the order by column.order
- ascending or descending.public ManagersRequestExecutor eTag(java.lang.String eTag)
eTag
in class PaginatedRequestExecutor<Managers>
eTag
- the entity tag value.protected retrofit2.Call<Managers> prepareCall()
prepareCall
in class RequestExecutor<Managers>