Class QueryUsers
- java.lang.Object
-
- com.sodius.oslc.client.requests.AbstractResourceRequest<Collection<User>>
-
- com.sodius.oslc.app.jazz.lqe.requests.QueryUsers
-
- All Implemented Interfaces:
ResourceRequest<Collection<User>>,Callable<Collection<User>>
public class QueryUsers extends AbstractResourceRequest<Collection<User>>
Searches users based on a pattern.- Since:
- 1.11.0
-
-
Constructor Summary
Constructors Constructor 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.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected ClientResponsecall(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.-
Methods inherited from class com.sodius.oslc.client.requests.AbstractResourceRequest
call, createErrorResponse, createResourceResponse, getClient, getUri
-
-
-
-
Constructor Detail
-
QueryUsers
public QueryUsers(OslcClient client, URI uri, String pattern)
Creates a request to search for users based on a pattern.- Parameters:
client- the OSLC client to connect to the application.uri- the URL for querying users, as defined byLqeRootServices.getUsersQuery()pattern- the pattern to identify users, e.g."*".- See Also:
LqeRootServices.getUsersQuery()
-
QueryUsers
public 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.- Parameters:
client- the OSLC client to connect to the application.uri- the URL for querying users, as defined byLqeRootServices.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.- See Also:
LqeRootServices.getUsersQuery()
-
-
Method Detail
-
call
protected ClientResponse call(OslcResource resource)
Description copied from class:AbstractResourceRequestExecutes the request on the specified resource. Subclasses may add extra information (such as headers) on the resource before executing the request.- Specified by:
callin classAbstractResourceRequest<Collection<User>>- Parameters:
resource- the resource on which to execute a request.- Returns:
- the response of the request execution.
-
createResponse
protected Collection<User> createResponse(OslcResource resource, ClientResponse response)
Description copied from class:AbstractResourceRequestProcesses the response obtained when executing a request on the specified resource. Due to the contract of theResourceRequestinterface, this method is called only when the HTTP response status is20x.- Specified by:
createResponsein classAbstractResourceRequest<Collection<User>>- Parameters:
resource- the resource on which a request is executed.response- the response obtained.- Returns:
- the extraction of the response content into the expected format.
-
-