Class AbstractFunctionFactory

java.lang.Object
com.inductiveautomation.ignition.common.expressions.AbstractFunctionFactory
All Implemented Interfaces:
FunctionFactory
Direct Known Subclasses:
BasicFunctionFactory, ClientFunctionFactory, DefaultFunctionFactory, FSQLFunctionFactory, PropertyBasedFunctionFactory, TagFunctionFactory

public class AbstractFunctionFactory extends Object implements FunctionFactory
  • Field Details

  • Constructor Details

    • AbstractFunctionFactory

      public AbstractFunctionFactory(FunctionFactory parent)
  • Method Details

    • addFunction

      public void addFunction(String name, String category, Function f) throws IllegalArgumentException
      Throws:
      IllegalArgumentException
    • addFunction

      protected void addFunction(String name, String category, Function f, boolean visible) throws IllegalArgumentException
      Throws:
      IllegalArgumentException
    • getFunction

      public Function getFunction(String name)
      Retrieves the function with the given name. Returns a copy of that function, so that each FunctionExpression can have its own version of the function. NB - some functions may opt to not create a true copy, it depends on the serialization requirements of the function.
      Specified by:
      getFunction in interface FunctionFactory
      Parameters:
      name - the name of the function to look up
      Returns:
      the Function, or null if no function with the given name exists
    • getCategories

      public Set<String> getCategories()
      Description copied from interface: FunctionFactory
      Return a sequence of categories to organize functions. Used to generate the popup menu in the designer. Will automatically organize into submenus based on forward-slash in path.
      Specified by:
      getCategories in interface FunctionFactory
      Returns:
      a Set of function categories
    • getFunctionsInCategory

      public Set<String> getFunctionsInCategory(String name)
      Returns a Set of function names for all of the functions in the given category. If there are no functions in the given category, or the category doesn't exist, an empty set is returned.
      Specified by:
      getFunctionsInCategory in interface FunctionFactory
      Parameters:
      name - the category name
      Returns:
      a Set of function names in the given category
    • getFunctionNames

      public Set<String> getFunctionNames()
      Returns a set of all function names.
      Specified by:
      getFunctionNames in interface FunctionFactory
      Returns:
      a Set of all registered function names