Class ScalaFeelEngineFactory

java.lang.Object
org.operaton.bpm.dmn.feel.impl.scala.ScalaFeelEngineFactory
All Implemented Interfaces:
FeelEngineFactory

public class ScalaFeelEngineFactory extends Object implements FeelEngineFactory
Factory class to create instances of FeelEngine, specifically ScalaFeelEngine. Allows configuration of custom function providers for extending the functionality of the FEEL engine.
  • Field Details

    • customFunctionProviders

      protected List<FeelCustomFunctionProvider> customFunctionProviders
      A protected field that stores a list of custom function providers for the FEEL engine. Custom function providers are instances of FeelCustomFunctionProvider that define additional custom functions to be made available in FEEL expressions.
  • Constructor Details

    • ScalaFeelEngineFactory

      public ScalaFeelEngineFactory()
      Default constructor for the ScalaFeelEngineFactory. Initializes the factory with default settings and no custom function providers.
    • ScalaFeelEngineFactory

      public ScalaFeelEngineFactory(List<FeelCustomFunctionProvider> customFunctionProviders)
      Constructs a new instance of ScalaFeelEngineFactory with the given list of custom function providers. The custom function providers allow extending the FEEL engine by adding custom functions to FEEL expressions.
      Parameters:
      customFunctionProviders - a list of FeelCustomFunctionProvider that supply additional custom functions to be available in the FEEL engine.
  • Method Details

    • createInstance

      public FeelEngine createInstance()
      Creates a new instance of ScalaFeelEngine configured with the optional custom function providers. The instance provides an implementation of the FeelEngine interface for evaluating FEEL expressions.
      Specified by:
      createInstance in interface FeelEngineFactory
      Returns:
      a new instance of ScalaFeelEngine, which implements FeelEngine.
    • setCustomFunctionProviders

      public void setCustomFunctionProviders(List<FeelCustomFunctionProvider> customFunctionProviders)
      Sets the custom function providers for the engine factory. Custom function providers allow extending the FEEL engine with additional custom functions that can be used in FEEL expressions.
      Parameters:
      customFunctionProviders - a list of FeelCustomFunctionProvider instances, each defining custom functions for the FEEL engine.
    • getCustomFunctionProviders

      public List<FeelCustomFunctionProvider> getCustomFunctionProviders()
      Retrieves the list of custom function providers that have been configured for the factory. Custom function providers supply additional custom functions that can be used in FEEL expressions.
      Returns:
      a list of FeelCustomFunctionProvider instances, which define custom functions to extend the functionality of the FEEL engine.