Package org.elasticsearch.ingest
Class ConfigurationUtils
java.lang.Object
org.elasticsearch.ingest.ConfigurationUtils
public final class ConfigurationUtils
extends java.lang.Object
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringDESCRIPTION_KEYstatic java.lang.StringTAG_KEYstatic java.lang.String[]VALID_MEDIA_TYPES -
Method Summary
Modifier and Type Method Description static TemplateScript.FactorycompileTemplate(java.lang.String processorType, java.lang.String processorTag, java.lang.String propertyName, java.lang.String propertyValue, ScriptService scriptService)static ElasticsearchExceptionnewConfigurationException(java.lang.String processorType, java.lang.String processorTag, java.lang.String propertyName, java.lang.Exception cause)static ElasticsearchExceptionnewConfigurationException(java.lang.String processorType, java.lang.String processorTag, java.lang.String propertyName, java.lang.String reason)static java.lang.BooleanreadBooleanProperty(java.lang.String processorType, java.lang.String processorTag, java.util.Map<java.lang.String,java.lang.Object> configuration, java.lang.String propertyName, boolean defaultValue)static java.lang.DoublereadDoubleProperty(java.lang.String processorType, java.lang.String processorTag, java.util.Map<java.lang.String,java.lang.Object> configuration, java.lang.String propertyName)Returns and removes the specified property from the specified configuration map.static java.lang.IntegerreadIntProperty(java.lang.String processorType, java.lang.String processorTag, java.util.Map<java.lang.String,java.lang.Object> configuration, java.lang.String propertyName, java.lang.Integer defaultValue)Returns and removes the specified property from the specified configuration map.static <T> java.util.List<T>readList(java.lang.String processorType, java.lang.String processorTag, java.util.Map<java.lang.String,java.lang.Object> configuration, java.lang.String propertyName)Returns and removes the specified property of type list from the specified configuration map.static <T> java.util.Map<java.lang.String,T>readMap(java.lang.String processorType, java.lang.String processorTag, java.util.Map<java.lang.String,java.lang.Object> configuration, java.lang.String propertyName)Returns and removes the specified property of type map from the specified configuration map.static java.lang.StringreadMediaTypeProperty(java.lang.String processorType, java.lang.String processorTag, java.util.Map<java.lang.String,java.lang.Object> configuration, java.lang.String propertyName, java.lang.String defaultValue)static java.lang.ObjectreadObject(java.lang.String processorType, java.lang.String processorTag, java.util.Map<java.lang.String,java.lang.Object> configuration, java.lang.String propertyName)Returns and removes the specified property as anObjectfrom the specified configuration map.static <T> java.util.List<T>readOptionalList(java.lang.String processorType, java.lang.String processorTag, java.util.Map<java.lang.String,java.lang.Object> configuration, java.lang.String propertyName)Returns and removes the specified property of type list from the specified configuration map.static <T> java.util.Map<java.lang.String,T>readOptionalMap(java.lang.String processorType, java.lang.String processorTag, java.util.Map<java.lang.String,java.lang.Object> configuration, java.lang.String propertyName)Returns and removes the specified property of type map from the specified configuration map.static java.lang.StringreadOptionalStringOrIntProperty(java.lang.String processorType, java.lang.String processorTag, java.util.Map<java.lang.String,java.lang.Object> configuration, java.lang.String propertyName)Returns and removes the specified property from the specified configuration map.static java.lang.StringreadOptionalStringOrLongProperty(java.lang.String processorType, java.lang.String processorTag, java.util.Map<java.lang.String,java.lang.Object> configuration, java.lang.String propertyName)Returns and removes the specified property from the specified configuration map.static java.lang.StringreadOptionalStringProperty(java.lang.String processorType, java.lang.String processorTag, java.util.Map<java.lang.String,java.lang.Object> configuration, java.lang.String propertyName)Returns and removes the specified optional property from the specified configuration map.static ProcessorreadProcessor(java.util.Map<java.lang.String,Processor.Factory> processorFactories, ScriptService scriptService, java.lang.String type, java.lang.Object config)static ProcessorreadProcessor(java.util.Map<java.lang.String,Processor.Factory> processorFactories, ScriptService scriptService, java.lang.String type, java.util.Map<java.lang.String,java.lang.Object> config)static java.util.List<Processor>readProcessorConfigs(java.util.List<java.util.Map<java.lang.String,java.lang.Object>> processorConfigs, ScriptService scriptService, java.util.Map<java.lang.String,Processor.Factory> processorFactories)static java.lang.StringreadStringOrIntProperty(java.lang.String processorType, java.lang.String processorTag, java.util.Map<java.lang.String,java.lang.Object> configuration, java.lang.String propertyName, java.lang.String defaultValue)Returns and removes the specified property from the specified configuration map.static java.lang.StringreadStringProperty(java.lang.String processorType, java.lang.String processorTag, java.util.Map<java.lang.String,java.lang.Object> configuration, java.lang.String propertyName)Returns and removes the specified property from the specified configuration map.static java.lang.StringreadStringProperty(java.lang.String processorType, java.lang.String processorTag, java.util.Map<java.lang.String,java.lang.Object> configuration, java.lang.String propertyName, java.lang.String defaultValue)Returns and removes the specified property from the specified configuration map.static TemplateScript.FactoryreadTemplateProperty(java.lang.String processorType, java.lang.String processorTag, java.util.Map<java.lang.String,java.lang.Object> configuration, java.lang.String propertyName, ScriptService scriptService)Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Field Details
-
TAG_KEY
public static final java.lang.String TAG_KEY- See Also:
- Constant Field Values
-
DESCRIPTION_KEY
public static final java.lang.String DESCRIPTION_KEY- See Also:
- Constant Field Values
-
VALID_MEDIA_TYPES
public static final java.lang.String[] VALID_MEDIA_TYPES
-
-
Method Details
-
readOptionalStringProperty
public static java.lang.String readOptionalStringProperty(java.lang.String processorType, java.lang.String processorTag, java.util.Map<java.lang.String,java.lang.Object> configuration, java.lang.String propertyName)Returns and removes the specified optional property from the specified configuration map. If the property value isn't of type string aElasticsearchParseExceptionis thrown. -
readStringProperty
public static java.lang.String readStringProperty(java.lang.String processorType, java.lang.String processorTag, java.util.Map<java.lang.String,java.lang.Object> configuration, java.lang.String propertyName)Returns and removes the specified property from the specified configuration map. If the property value isn't of type string anElasticsearchParseExceptionis thrown. If the property is missing anElasticsearchParseExceptionis thrown -
readStringProperty
public static java.lang.String readStringProperty(java.lang.String processorType, java.lang.String processorTag, java.util.Map<java.lang.String,java.lang.Object> configuration, java.lang.String propertyName, java.lang.String defaultValue)Returns and removes the specified property from the specified configuration map. If the property value isn't of type string aElasticsearchParseExceptionis thrown. If the property is missing and no default value has been specified aElasticsearchParseExceptionis thrown -
readStringOrIntProperty
public static java.lang.String readStringOrIntProperty(java.lang.String processorType, java.lang.String processorTag, java.util.Map<java.lang.String,java.lang.Object> configuration, java.lang.String propertyName, java.lang.String defaultValue)Returns and removes the specified property from the specified configuration map. If the property value isn't of type string or int aElasticsearchParseExceptionis thrown. If the property is missing and no default value has been specified aElasticsearchParseExceptionis thrown -
readOptionalStringOrIntProperty
public static java.lang.String readOptionalStringOrIntProperty(java.lang.String processorType, java.lang.String processorTag, java.util.Map<java.lang.String,java.lang.Object> configuration, java.lang.String propertyName)Returns and removes the specified property from the specified configuration map. If the property value isn't of type string or int aElasticsearchParseExceptionis thrown. -
readOptionalStringOrLongProperty
public static java.lang.String readOptionalStringOrLongProperty(java.lang.String processorType, java.lang.String processorTag, java.util.Map<java.lang.String,java.lang.Object> configuration, java.lang.String propertyName)Returns and removes the specified property from the specified configuration map. If the property value isn't of type string or long aElasticsearchParseExceptionis thrown. -
readBooleanProperty
public static java.lang.Boolean readBooleanProperty(java.lang.String processorType, java.lang.String processorTag, java.util.Map<java.lang.String,java.lang.Object> configuration, java.lang.String propertyName, boolean defaultValue) -
readIntProperty
public static java.lang.Integer readIntProperty(java.lang.String processorType, java.lang.String processorTag, java.util.Map<java.lang.String,java.lang.Object> configuration, java.lang.String propertyName, java.lang.Integer defaultValue)Returns and removes the specified property from the specified configuration map. If the property value isn't of type int aElasticsearchParseExceptionis thrown. If the property is missing anElasticsearchParseExceptionis thrown -
readDoubleProperty
public static java.lang.Double readDoubleProperty(java.lang.String processorType, java.lang.String processorTag, java.util.Map<java.lang.String,java.lang.Object> configuration, java.lang.String propertyName)Returns and removes the specified property from the specified configuration map. If the property value isn't of type int aElasticsearchParseExceptionis thrown. If the property is missing anElasticsearchParseExceptionis thrown -
readOptionalList
public static <T> java.util.List<T> readOptionalList(java.lang.String processorType, java.lang.String processorTag, java.util.Map<java.lang.String,java.lang.Object> configuration, java.lang.String propertyName)Returns and removes the specified property of type list from the specified configuration map. If the property value isn't of type list anElasticsearchParseExceptionis thrown. -
readList
public static <T> java.util.List<T> readList(java.lang.String processorType, java.lang.String processorTag, java.util.Map<java.lang.String,java.lang.Object> configuration, java.lang.String propertyName)Returns and removes the specified property of type list from the specified configuration map. If the property value isn't of type list anElasticsearchParseExceptionis thrown. If the property is missing anElasticsearchParseExceptionis thrown -
readMap
public static <T> java.util.Map<java.lang.String,T> readMap(java.lang.String processorType, java.lang.String processorTag, java.util.Map<java.lang.String,java.lang.Object> configuration, java.lang.String propertyName)Returns and removes the specified property of type map from the specified configuration map. If the property value isn't of type map anElasticsearchParseExceptionis thrown. If the property is missing anElasticsearchParseExceptionis thrown -
readOptionalMap
public static <T> java.util.Map<java.lang.String,T> readOptionalMap(java.lang.String processorType, java.lang.String processorTag, java.util.Map<java.lang.String,java.lang.Object> configuration, java.lang.String propertyName)Returns and removes the specified property of type map from the specified configuration map. If the property value isn't of type map anElasticsearchParseExceptionis thrown. -
readObject
public static java.lang.Object readObject(java.lang.String processorType, java.lang.String processorTag, java.util.Map<java.lang.String,java.lang.Object> configuration, java.lang.String propertyName)Returns and removes the specified property as anObjectfrom the specified configuration map. -
readMediaTypeProperty
public static java.lang.String readMediaTypeProperty(java.lang.String processorType, java.lang.String processorTag, java.util.Map<java.lang.String,java.lang.Object> configuration, java.lang.String propertyName, java.lang.String defaultValue) -
newConfigurationException
public static ElasticsearchException newConfigurationException(java.lang.String processorType, java.lang.String processorTag, java.lang.String propertyName, java.lang.String reason) -
newConfigurationException
public static ElasticsearchException newConfigurationException(java.lang.String processorType, java.lang.String processorTag, java.lang.String propertyName, java.lang.Exception cause) -
readProcessorConfigs
public static java.util.List<Processor> readProcessorConfigs(java.util.List<java.util.Map<java.lang.String,java.lang.Object>> processorConfigs, ScriptService scriptService, java.util.Map<java.lang.String,Processor.Factory> processorFactories) throws java.lang.Exception- Throws:
java.lang.Exception
-
readTemplateProperty
public static TemplateScript.Factory readTemplateProperty(java.lang.String processorType, java.lang.String processorTag, java.util.Map<java.lang.String,java.lang.Object> configuration, java.lang.String propertyName, ScriptService scriptService) -
compileTemplate
public static TemplateScript.Factory compileTemplate(java.lang.String processorType, java.lang.String processorTag, java.lang.String propertyName, java.lang.String propertyValue, ScriptService scriptService) -
readProcessor
public static Processor readProcessor(java.util.Map<java.lang.String,Processor.Factory> processorFactories, ScriptService scriptService, java.lang.String type, java.lang.Object config) throws java.lang.Exception- Throws:
java.lang.Exception
-
readProcessor
public static Processor readProcessor(java.util.Map<java.lang.String,Processor.Factory> processorFactories, ScriptService scriptService, java.lang.String type, java.util.Map<java.lang.String,java.lang.Object> config) throws java.lang.Exception- Throws:
java.lang.Exception
-