Class SeverityMapping
- java.lang.Object
-
- com.floragunn.signals.watch.severity.SeverityMapping
-
- All Implemented Interfaces:
org.elasticsearch.xcontent.ToXContent,org.elasticsearch.xcontent.ToXContentObject
public class SeverityMapping extends Object implements org.elasticsearch.xcontent.ToXContentObject
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classSeverityMapping.Elementstatic classSeverityMapping.EvaluationResultstatic classSeverityMapping.Orderstatic classSeverityMapping.SeverityValueScript
-
Field Summary
Fields Modifier and Type Field Description static SeverityMappingDUMMY_MAPPING
-
Constructor Summary
Constructors Constructor Description SeverityMapping(String value, String lang, SeverityMapping.Order order, List<SeverityMapping.Element> mapping)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcompileScripts(WatchInitializationService watchInitService)static SeverityMappingcreate(WatchInitializationService watchInitService, com.fasterxml.jackson.databind.JsonNode jsonNode)SeverityMapping.EvaluationResultexecute(WatchExecutionContext ctx)SeverityMapping.ElementfindMatchingMappingElement(BigDecimal value)Set<SeverityLevel>getDefinedLevels()BigDecimalgetFirstThreshold()List<SeverityMapping.Element>getMapping()org.elasticsearch.xcontent.XContentBuildertoXContent(org.elasticsearch.xcontent.XContentBuilder builder, org.elasticsearch.xcontent.ToXContent.Params params)
-
-
-
Field Detail
-
DUMMY_MAPPING
public static final SeverityMapping DUMMY_MAPPING
-
-
Constructor Detail
-
SeverityMapping
public SeverityMapping(String value, String lang, SeverityMapping.Order order, List<SeverityMapping.Element> mapping)
-
-
Method Detail
-
execute
public SeverityMapping.EvaluationResult execute(WatchExecutionContext ctx) throws WatchOperationExecutionException
- Throws:
WatchOperationExecutionException
-
getFirstThreshold
public BigDecimal getFirstThreshold()
-
findMatchingMappingElement
public SeverityMapping.Element findMatchingMappingElement(BigDecimal value)
-
compileScripts
public void compileScripts(WatchInitializationService watchInitService) throws com.floragunn.searchsupport.config.validation.ConfigValidationException
- Throws:
com.floragunn.searchsupport.config.validation.ConfigValidationException
-
getDefinedLevels
public Set<SeverityLevel> getDefinedLevels()
-
toXContent
public org.elasticsearch.xcontent.XContentBuilder toXContent(org.elasticsearch.xcontent.XContentBuilder builder, org.elasticsearch.xcontent.ToXContent.Params params) throws IOException- Specified by:
toXContentin interfaceorg.elasticsearch.xcontent.ToXContent- Throws:
IOException
-
create
public static SeverityMapping create(WatchInitializationService watchInitService, com.fasterxml.jackson.databind.JsonNode jsonNode) throws com.floragunn.searchsupport.config.validation.ConfigValidationException
- Throws:
com.floragunn.searchsupport.config.validation.ConfigValidationException
-
getMapping
public List<SeverityMapping.Element> getMapping()
-
-