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