public class Template extends Script
Script.ScriptField, Script.ScriptParseExceptionToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.ParamsDEFAULT_TYPEEMPTY_PARAMS| コンストラクタと説明 |
|---|
Template() |
Template(String template)
Constructor for simple inline template.
|
Template(String template,
ScriptService.ScriptType type,
String lang,
XContentType xContentType,
Map<String,Object> params)
Constructor for Template.
|
getLang, getParams, getScript, getType, readFrom, readScript, toString, toXContent, writeTopublic Template()
public Template(String template)
template - The inline template.public Template(String template, ScriptService.ScriptType type, @Nullable String lang, @Nullable XContentType xContentType, @Nullable Map<String,Object> params)
template - The cache key of the template to be compiled/executed. For
inline templates this is the actual templates source code. For
indexed templates this is the id used in the request. For on
file templates this is the file name.type - The type of template -- dynamic, indexed, or file.lang - The language of the template to be compiled/executed.xContentType - The XContentType of the template.params - The map of parameters the template will be executed with.public XContentType getContentType()
XContentType of the template.XContentType of the template.protected void doReadFrom(StreamInput in) throws IOException
doReadFrom クラス内 ScriptIOExceptionprotected void doWriteTo(StreamOutput out) throws IOException
doWriteTo クラス内 ScriptIOExceptionprotected XContentBuilder scriptFieldToXContent(String template, ScriptService.ScriptType type, XContentBuilder builder, ToXContent.Params builderParams) throws IOException
scriptFieldToXContent クラス内 ScriptIOExceptionpublic static Template readTemplate(StreamInput in) throws IOException
IOExceptionpublic static Script parse(Map<String,Object> config, boolean removeMatchedEntries, ParseFieldMatcher parseFieldMatcher)
public static Template parse(XContentParser parser, ParseFieldMatcher parseFieldMatcher) throws IOException
IOException@Deprecated public static Template parse(XContentParser parser, Map<String,ScriptService.ScriptType> additionalTemplateFieldNames, ParseFieldMatcher parseFieldMatcher) throws IOException
IOException@Deprecated public static Template parse(XContentParser parser, Map<String,ScriptService.ScriptType> additionalTemplateFieldNames, String defaultLang, ParseFieldMatcher parseFieldMatcher) throws IOException
IOExceptionCopyright © 2009–2016. All rights reserved.