Class ExpressionEvaluatorFactory


  • public class ExpressionEvaluatorFactory
    extends java.lang.Object
    Factory to obtain specific expression evaluator based on context. It works like a delegate that hides part of context so it will be possible to distribute the factory and then obtain the specific expression evaluator instance only when all the information are available
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      static ExpressionEvaluatorFactory create​(java.lang.ClassLoader classLoader, org.drools.scenariosimulation.api.model.ScenarioSimulationModel.Type type)  
      ExpressionEvaluator getOrCreate​(org.drools.scenariosimulation.api.model.FactMappingValue factMappingValue)
      Based on factMappingValue information it returns an instance of the specific expression evaluator required.
      protected boolean isAnMVELExpression​(java.lang.String rawValue)
      A rawValue is an MVEL expression if: - NOT COLLECTIONS CASE: It's a String which starts with MVEL_ESCAPE_SYMBOL ('#') - COLLECTION CASE: It's a JSON String node, which is used only when an expression is set (in other cases it's a JSON Object (Map) or a JSON Array (List)) and it's value starts with MVEL_ESCAPE_SYMBOL ('#')
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • create

        public static ExpressionEvaluatorFactory create​(java.lang.ClassLoader classLoader,
                                                        org.drools.scenariosimulation.api.model.ScenarioSimulationModel.Type type)
      • getOrCreate

        public ExpressionEvaluator getOrCreate​(org.drools.scenariosimulation.api.model.FactMappingValue factMappingValue)
        Based on factMappingValue information it returns an instance of the specific expression evaluator required.
        Parameters:
        factMappingValue -
        Returns:
      • isAnMVELExpression

        protected boolean isAnMVELExpression​(java.lang.String rawValue)
        A rawValue is an MVEL expression if: - NOT COLLECTIONS CASE: It's a String which starts with MVEL_ESCAPE_SYMBOL ('#') - COLLECTION CASE: It's a JSON String node, which is used only when an expression is set (in other cases it's a JSON Object (Map) or a JSON Array (List)) and it's value starts with MVEL_ESCAPE_SYMBOL ('#')
        Parameters:
        rawValue -
        Returns: