public class SingleEventResource
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
protected OrchestrateClient |
client
The Orchestrate client to make requests with.
|
protected JacksonMapper |
jacksonMapper |
protected com.fasterxml.jackson.databind.ObjectMapper |
mapper
The object mapper used to deserialize JSON responses.
|
| Modifier and Type | Method and Description |
|---|---|
<T> OrchestrateRequest<Event<T>> |
get(java.lang.Class<T> clazz)
Fetch the single Event instance.
|
SingleEventResource |
ifMatch(java.lang.String ref)
Sets a conditional If-Match header.
|
OrchestrateRequest<EventMetadata> |
merge(java.lang.String jsonString)
Merge patch the Event (Merge the json value with the specified json value).
|
protected <T> OrchestrateRequest<T> |
parseLink(java.lang.String name,
com.fasterxml.jackson.databind.JsonNode jsonNode,
io.orchestrate.client.ResponseConverter<T> clazz) |
OrchestrateRequest<EventMetadata> |
patch(JsonPatch patchOps)
Patch (Partial Update) the Event.
|
OrchestrateRequest<java.lang.Boolean> |
purge()
Delete the Event instance.
|
protected byte[] |
toJsonBytes(java.lang.Object value) |
protected com.fasterxml.jackson.databind.JsonNode |
toJsonNode(org.glassfish.grizzly.http.HttpContent response) |
protected com.fasterxml.jackson.databind.JsonNode |
toJsonNodeOrNull(org.glassfish.grizzly.http.HttpContent response) |
protected <T> KvObject<T> |
toKvObject(org.glassfish.grizzly.http.HttpContent response,
java.lang.String collection,
java.lang.String key,
java.lang.Class<T> clazz) |
protected <T> KvObject<T> |
toKvObject(com.fasterxml.jackson.databind.JsonNode result,
java.lang.Class<T> clazz) |
OrchestrateRequest<EventMetadata> |
update(java.lang.Object value)
Update the Event instance to have an entirely new value.
|
protected final OrchestrateClient client
protected final com.fasterxml.jackson.databind.ObjectMapper mapper
protected final JacksonMapper jacksonMapper
public SingleEventResource ifMatch(java.lang.String ref)
ref - the expected refpublic <T> OrchestrateRequest<Event<T>> get(java.lang.Class<T> clazz)
T - The type for the Event value.clazz - The Class to serialize the Event's value as.public OrchestrateRequest<java.lang.Boolean> purge()
public OrchestrateRequest<EventMetadata> update(@NonNull java.lang.Object value)
value - the updated value for the Event instance.public OrchestrateRequest<EventMetadata> patch(JsonPatch patchOps)
patchOps - The list of operations to perform in the patch.public OrchestrateRequest<EventMetadata> merge(java.lang.String jsonString)
jsonString - the json string to merge into the Event value.protected byte[] toJsonBytes(java.lang.Object value)
protected com.fasterxml.jackson.databind.JsonNode toJsonNodeOrNull(org.glassfish.grizzly.http.HttpContent response)
throws java.io.IOException
java.io.IOExceptionprotected com.fasterxml.jackson.databind.JsonNode toJsonNode(org.glassfish.grizzly.http.HttpContent response)
throws java.io.IOException
java.io.IOExceptionprotected <T> KvObject<T> toKvObject(com.fasterxml.jackson.databind.JsonNode result, java.lang.Class<T> clazz) throws java.io.IOException
java.io.IOExceptionprotected <T> KvObject<T> toKvObject(org.glassfish.grizzly.http.HttpContent response, java.lang.String collection, java.lang.String key, java.lang.Class<T> clazz) throws java.io.IOException
java.io.IOExceptionprotected <T> OrchestrateRequest<T> parseLink(java.lang.String name, com.fasterxml.jackson.databind.JsonNode jsonNode, io.orchestrate.client.ResponseConverter<T> clazz)