public class QueryUsers extends AbstractResourceRequest<Collection<User>>
Constructor and Description |
---|
QueryUsers(OslcClient client,
URI uri,
String pattern)
Creates a request to search for users based on a pattern.
|
QueryUsers(OslcClient client,
URI uri,
String pattern,
Optional<Integer> maxResults,
Optional<Integer> timeout)
Creates a request to search for users based on a pattern and limits.
|
Modifier and Type | Method and Description |
---|---|
protected ClientResponse |
call(OslcResource resource)
Executes the request on the specified resource.
|
protected Collection<User> |
createResponse(OslcResource resource,
ClientResponse response)
Processes the response obtained when executing a request on the specified resource.
|
call, createErrorResponse, createResourceResponse, getClient, getUri
public QueryUsers(OslcClient client, URI uri, String pattern)
client
- the OSLC client to connect to the application.uri
- the URL for querying users, as defined by LqeRootServices.getUsersQuery()
pattern
- the pattern to identify users, e.g. "*"
.LqeRootServices.getUsersQuery()
public QueryUsers(OslcClient client, URI uri, String pattern, Optional<Integer> maxResults, Optional<Integer> timeout)
client
- the OSLC client to connect to the application.uri
- the URL for querying users, as defined by LqeRootServices.getUsersQuery()
pattern
- the pattern to identify users, e.g. "*"
.maxResults
- the maximum number of users returned by the query.timeout
- the number of seconds after which the request is aborted.LqeRootServices.getUsersQuery()
protected ClientResponse call(OslcResource resource)
AbstractResourceRequest
call
in class AbstractResourceRequest<Collection<User>>
resource
- the resource on which to execute a request.protected Collection<User> createResponse(OslcResource resource, ClientResponse response)
AbstractResourceRequest
ResourceRequest
interface, this method is called only when the HTTP response status is 20x
.createResponse
in class AbstractResourceRequest<Collection<User>>
resource
- the resource on which a request is executed.response
- the response obtained.