Class ContextDelegateFunctionFactory
- java.lang.Object
-
- com.inductiveautomation.ignition.common.expressions.ContextDelegateFunctionFactory
-
- All Implemented Interfaces:
FunctionFactory
public class ContextDelegateFunctionFactory extends java.lang.Object implements FunctionFactory
Many custom function factories get cached, but when delegating to the factory provided by the context, that shouldn't happen. This class can be used as the parent of those other factories, and will look up the context factory fresh each time.
-
-
Constructor Summary
Constructors Constructor Description ContextDelegateFunctionFactory(CommonContext context)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected FunctionFactory
f()
java.util.Set<java.lang.String>
getCategories()
Return a sequence of categories to organize functions.Function
getFunction(java.lang.String name)
Look up the function with the given name.java.util.Set<java.lang.String>
getFunctionNames()
Returns a set of all the registered function names.java.util.Set<java.lang.String>
getFunctionsInCategory(java.lang.String name)
-
-
-
Constructor Detail
-
ContextDelegateFunctionFactory
public ContextDelegateFunctionFactory(CommonContext context)
-
-
Method Detail
-
f
protected FunctionFactory f()
-
getFunction
public Function getFunction(java.lang.String name)
Description copied from interface:FunctionFactory
Look up the function with the given name. This function will be in a state that is ready to use in an expression, meaning that it may be a cloned copy for functions that keep state.- Specified by:
getFunction
in interfaceFunctionFactory
- Returns:
- The function, or null
-
getFunctionNames
public java.util.Set<java.lang.String> getFunctionNames()
Description copied from interface:FunctionFactory
Returns a set of all the registered function names. Used for syntax highlighting in the designer.- Specified by:
getFunctionNames
in interfaceFunctionFactory
-
getCategories
public java.util.Set<java.lang.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 interfaceFunctionFactory
-
getFunctionsInCategory
public java.util.Set<java.lang.String> getFunctionsInCategory(java.lang.String name)
- Specified by:
getFunctionsInCategory
in interfaceFunctionFactory
-
-