public class ClientRequest extends Object
| Modifier and Type | Field and Description |
|---|---|
private LowLevelClient |
lowLevelClient
Low level client abstraction for invoking commands on the API
|
private TagRequest |
tagRequest
Request object holding all properties of the tag
|
| Constructor and Description |
|---|
ClientRequest(String accessToken) |
ClientRequest(String accessToken,
String urlOverride) |
| Modifier and Type | Method and Description |
|---|---|
void |
apply() |
TagBulkResponse |
fetch() |
private <T> void |
handleErrorCondition(com.mashape.unirest.http.HttpResponse<T> response) |
private TagBulkResponse |
handleOperationFetch() |
private void |
handleOperationTag() |
private void |
handleOperationUntag() |
void |
remove() |
ClientRequest |
withKey(String tagKey)
Fluent command for specifying the key of the tag
|
ClientRequest |
withObjectValue(Object value) |
ClientRequest |
withResource(String resourceUri)
Fluent command for specifying the resource the tag should refer to
|
ClientRequest |
withStringValue(String value)
Optionally it is possible to attach opaque metadata to the tag.
|
private final TagRequest tagRequest
private LowLevelClient lowLevelClient
ClientRequest(String accessToken)
public ClientRequest withResource(String resourceUri)
resourceUri - Resource url the tag should be attached to.public ClientRequest withKey(String tagKey)
tagKey - Key of the tag is a user provided URN that describes the tag. The fact that that the key is a URN,
gives freedom for the user to model hierarchy and other aspects of their tagpublic ClientRequest withStringValue(String value)
value - public ClientRequest withObjectValue(Object value) throws com.fasterxml.jackson.core.JsonProcessingException
com.fasterxml.jackson.core.JsonProcessingExceptionprivate <T> void handleErrorCondition(com.mashape.unirest.http.HttpResponse<T> response)
throws UnauthorizedException,
ForbiddenException
public TagBulkResponse fetch() throws Exception
Exceptionprivate TagBulkResponse handleOperationFetch() throws ExecutionException, InterruptedException
private void handleOperationUntag()
throws InterruptedException,
ExecutionException,
UnauthorizedException,
ForbiddenException
Copyright © 2018. All rights reserved.