ToXContent, ToXContentFragmentpublic class Stash extends java.lang.Object implements ToXContentFragment
ToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.Params| Modifier and Type | Field | Description |
|---|---|---|
static Stash |
EMPTY |
EMPTY_PARAMS| Constructor | Description |
|---|---|
Stash() |
| Modifier and Type | Method | Description |
|---|---|---|
void |
clear() |
Clears the previously stashed values
|
boolean |
containsStashedValue(java.lang.Object key) |
Tells whether a particular key needs to be looked up in the stash based on its name.
|
java.lang.Object |
getValue(java.lang.String key) |
Retrieves a value from the current stash.
|
java.util.Map<java.lang.String,java.lang.Object> |
replaceStashedValues(java.util.Map<java.lang.String,java.lang.Object> map) |
Goes recursively against each map entry and replaces any string value starting with "$" with its
corresponding value retrieved from the stash
|
void |
stashValue(java.lang.String key,
java.lang.Object value) |
Allows to saved a specific field in the stash as key-value pair
|
XContentBuilder |
toXContent(XContentBuilder builder,
ToXContent.Params params) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitisFragmentpublic static final Stash EMPTY
public void stashValue(java.lang.String key,
java.lang.Object value)
public void clear()
public boolean containsStashedValue(java.lang.Object key)
public java.lang.Object getValue(java.lang.String key)
throws java.io.IOException
java.io.IOExceptionpublic java.util.Map<java.lang.String,java.lang.Object> replaceStashedValues(java.util.Map<java.lang.String,java.lang.Object> map)
throws java.io.IOException
java.io.IOExceptionpublic XContentBuilder toXContent(XContentBuilder builder, ToXContent.Params params) throws java.io.IOException
toXContent in interface ToXContentjava.io.IOException