Package org.apache.unomi.api.utils
Class ParserHelper
- java.lang.Object
-
- org.apache.unomi.api.utils.ParserHelper
-
public class ParserHelper extends Object
Helper class to resolve condition, action and values types when loading definitions from JSON files
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
ParserHelper.ConditionVisitor
static class
ParserHelper.EventTypeConditionVisitor
static interface
ParserHelper.ValueExtractor
-
Field Summary
Fields Modifier and Type Field Description static Map<String,ParserHelper.ValueExtractor>
DEFAULT_VALUE_EXTRACTORS
-
Constructor Summary
Constructors Constructor Description ParserHelper()
-
Method Summary
-
-
-
Field Detail
-
DEFAULT_VALUE_EXTRACTORS
public static final Map<String,ParserHelper.ValueExtractor> DEFAULT_VALUE_EXTRACTORS
-
-
Method Detail
-
resolveConditionType
public static boolean resolveConditionType(DefinitionsService definitionsService, Condition rootCondition, String contextObjectName)
-
visitConditions
public static void visitConditions(Condition rootCondition, ParserHelper.ConditionVisitor visitor)
-
resolveActionTypes
public static boolean resolveActionTypes(DefinitionsService definitionsService, Rule rule, boolean ignoreErrors)
-
resolveActionType
public static boolean resolveActionType(DefinitionsService definitionsService, Action action)
-
resolveValueType
public static void resolveValueType(DefinitionsService definitionsService, PropertyType propertyType)
-
resolveConditionEventTypes
public static Set<String> resolveConditionEventTypes(Condition rootCondition)
-
parseMap
public static Map<String,Object> parseMap(Event event, Map<String,Object> map, Map<String,ParserHelper.ValueExtractor> valueExtractors)
-
extractValue
public static Object extractValue(String s, Event event, Map<String,ParserHelper.ValueExtractor> valueExtractors) throws IllegalAccessException, NoSuchMethodException, InvocationTargetException
-
-