Class InlineMustacheTemplate<ResultType>
- java.lang.Object
-
- com.floragunn.searchsupport.jobs.config.elements.InlineMustacheTemplate<ResultType>
-
- All Implemented Interfaces:
org.elasticsearch.common.xcontent.ToXContent
public class InlineMustacheTemplate<ResultType> extends Object implements org.elasticsearch.common.xcontent.ToXContent
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classInlineMustacheTemplate.Parser<ResultType>
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static <ResultType>
InlineMustacheTemplate<ResultType>constant(ResultType value)ResultTypeget(Map<String,Object> params)ResultTypeget(Map<String,Object> params, String attribute, ValidationErrors validationErrors)ResultTypegetConstant()org.elasticsearch.script.TemplateScript.FactorygetFactory()booleanisConstant()static InlineMustacheTemplate<String>parse(org.elasticsearch.script.ScriptService scriptService, String value)static <ResultType>
InlineMustacheTemplate<ResultType>parse(org.elasticsearch.script.ScriptService scriptService, String value, ValidatingFunction<String,ResultType> conversionFunction)static <ResultType>
InlineMustacheTemplate<ResultType>parse(org.elasticsearch.script.ScriptService scriptService, String value, ValidatingFunction<String,ResultType> conversionFunction, Object expectedValue)static <ResultType>
InlineMustacheTemplate<ResultType>parse(org.elasticsearch.script.ScriptService scriptService, String value, Function<String,ResultType> conversionFunction)static <ResultType>
InlineMustacheTemplate<ResultType>parse(org.elasticsearch.script.ScriptService scriptService, String value, Function<String,ResultType> conversionFunction, Object expectedValue)Stringrender(Map<String,Object> params)org.elasticsearch.common.xcontent.XContentBuildertoXContent(org.elasticsearch.common.xcontent.XContentBuilder builder, org.elasticsearch.common.xcontent.ToXContent.Params params)
-
-
-
Method Detail
-
toXContent
public org.elasticsearch.common.xcontent.XContentBuilder toXContent(org.elasticsearch.common.xcontent.XContentBuilder builder, org.elasticsearch.common.xcontent.ToXContent.Params params) throws IOException- Specified by:
toXContentin interfaceorg.elasticsearch.common.xcontent.ToXContent- Throws:
IOException
-
getFactory
public org.elasticsearch.script.TemplateScript.Factory getFactory()
-
render
public String render(Map<String,Object> params) throws org.elasticsearch.script.ScriptException
- Throws:
org.elasticsearch.script.ScriptException
-
get
public ResultType get(Map<String,Object> params) throws ConfigValidationException
- Throws:
ConfigValidationException
-
get
public ResultType get(Map<String,Object> params, String attribute, ValidationErrors validationErrors)
-
isConstant
public boolean isConstant()
-
getConstant
public ResultType getConstant()
-
parse
public static <ResultType> InlineMustacheTemplate<ResultType> parse(org.elasticsearch.script.ScriptService scriptService, String value, Function<String,ResultType> conversionFunction) throws ConfigValidationException
- Throws:
ConfigValidationException
-
parse
public static <ResultType> InlineMustacheTemplate<ResultType> parse(org.elasticsearch.script.ScriptService scriptService, String value, Function<String,ResultType> conversionFunction, Object expectedValue) throws ConfigValidationException
- Throws:
ConfigValidationException
-
parse
public static <ResultType> InlineMustacheTemplate<ResultType> parse(org.elasticsearch.script.ScriptService scriptService, String value, ValidatingFunction<String,ResultType> conversionFunction) throws ConfigValidationException
- Throws:
ConfigValidationException
-
parse
public static <ResultType> InlineMustacheTemplate<ResultType> parse(org.elasticsearch.script.ScriptService scriptService, String value, ValidatingFunction<String,ResultType> conversionFunction, Object expectedValue) throws ConfigValidationException
- Throws:
ConfigValidationException
-
parse
public static InlineMustacheTemplate<String> parse(org.elasticsearch.script.ScriptService scriptService, String value) throws ConfigValidationException
- Throws:
ConfigValidationException
-
constant
public static <ResultType> InlineMustacheTemplate<ResultType> constant(ResultType value)
-
-