Class AbstractFunctionFactory
java.lang.Object
com.inductiveautomation.ignition.common.expressions.AbstractFunctionFactory
- All Implemented Interfaces:
FunctionFactory
- Direct Known Subclasses:
BasicFunctionFactory,ClientFunctionFactory,DefaultFunctionFactory,FSQLFunctionFactory,PropertyBasedFunctionFactory,TagFunctionFactory
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddFunction(String name, String category, Function f) protected voidaddFunction(String name, String category, Function f, boolean visible) Return a sequence of categories to organize functions.getFunction(String name) Retrieves the function with the given name.Returns a set of all function names.getFunctionsInCategory(String name) Returns a Set of function names for all of the functions in the given category.
-
Field Details
-
parent
-
functions
-
categories
-
-
Constructor Details
-
AbstractFunctionFactory
-
-
Method Details
-
addFunction
- Throws:
IllegalArgumentException
-
addFunction
protected void addFunction(String name, String category, Function f, boolean visible) throws IllegalArgumentException - Throws:
IllegalArgumentException
-
getFunction
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:
getFunctionin interfaceFunctionFactory- Parameters:
name- the name of the function to look up- Returns:
- the
Function, ornullif no function with the given name exists
-
getCategories
Description copied from interface:FunctionFactoryReturn 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:
getCategoriesin interfaceFunctionFactory- Returns:
- a
Setof function categories
-
getFunctionsInCategory
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:
getFunctionsInCategoryin interfaceFunctionFactory- Parameters:
name- the category name- Returns:
- a
Setof function names in the given category
-
getFunctionNames
Returns a set of all function names.- Specified by:
getFunctionNamesin interfaceFunctionFactory- Returns:
- a
Setof all registered function names
-