public class Script extends Object implements ToXContent, Streamable
| 修飾子とタイプ | クラスと説明 |
|---|---|
static interface |
Script.ScriptField |
static class |
Script.ScriptParseException |
ToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.Params| 修飾子とタイプ | フィールドと説明 |
|---|---|
static ScriptService.ScriptType |
DEFAULT_TYPE |
EMPTY_PARAMS| 修飾子 | コンストラクタと説明 |
|---|---|
|
Script(String script)
Constructor for simple inline script.
|
|
Script(String script,
ScriptService.ScriptType type,
String lang,
Map<String,? extends Object> params)
Constructor for Script.
|
protected |
Script(String script,
String lang)
For sub-classes to use to override the default language
|
| 修飾子とタイプ | メソッドと説明 |
|---|---|
protected void |
doReadFrom(StreamInput in) |
protected void |
doWriteTo(StreamOutput out) |
boolean |
equals(Object obj) |
String |
getLang()
Method for getting language.
|
Map<String,Object> |
getParams()
Method for getting the parameters.
|
String |
getScript()
Method for getting the script.
|
ScriptService.ScriptType |
getType()
Method for getting the type.
|
int |
hashCode() |
static Script |
parse(Map<String,Object> config,
boolean removeMatchedEntries,
ParseFieldMatcher parseFieldMatcher) |
static Script |
parse(XContentParser parser,
ParseFieldMatcher parseFieldMatcher) |
void |
readFrom(StreamInput in) |
static Script |
readScript(StreamInput in) |
protected XContentBuilder |
scriptFieldToXContent(String script,
ScriptService.ScriptType type,
XContentBuilder builder,
ToXContent.Params builderParams) |
String |
toString() |
XContentBuilder |
toXContent(XContentBuilder builder,
ToXContent.Params builderParams) |
void |
writeTo(StreamOutput out) |
public static final ScriptService.ScriptType DEFAULT_TYPE
public Script(String script)
script - The inline script to execute.protected Script(String script, String lang)
public Script(String script, ScriptService.ScriptType type, @Nullable String lang, @Nullable Map<String,? extends Object> params)
script - The cache key of the script to be compiled/executed. For
inline scripts this is the actual script source code. For
indexed scripts this is the id used in the request. For on
file scripts this is the file name.type - The type of script -- dynamic, indexed, or file.lang - The language of the script to be compiled/executed.params - The map of parameters the script will be executed with.public String getScript()
public ScriptService.ScriptType getType()
public String getLang()
public Map<String,Object> getParams()
public final void readFrom(StreamInput in) throws IOException
readFrom インタフェース内 StreamableIOExceptionprotected void doReadFrom(StreamInput in) throws IOException
IOExceptionpublic final void writeTo(StreamOutput out) throws IOException
writeTo インタフェース内 StreamableIOExceptionprotected void doWriteTo(StreamOutput out) throws IOException
IOExceptionpublic final XContentBuilder toXContent(XContentBuilder builder, ToXContent.Params builderParams) throws IOException
toXContent インタフェース内 ToXContentIOExceptionprotected XContentBuilder scriptFieldToXContent(String script, ScriptService.ScriptType type, XContentBuilder builder, ToXContent.Params builderParams) throws IOException
IOExceptionpublic static Script readScript(StreamInput in) throws IOException
IOExceptionpublic static Script parse(Map<String,Object> config, boolean removeMatchedEntries, ParseFieldMatcher parseFieldMatcher)
public static Script parse(XContentParser parser, ParseFieldMatcher parseFieldMatcher) throws IOException
IOExceptionCopyright © 2009–2016. All rights reserved.