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 java.lang.Object implements FunctionFactory 
- 
- 
Field SummaryFields Modifier and Type Field Description protected java.util.Map<java.lang.String,java.util.Map<java.lang.String,Function>>categoriesprotected java.util.Map<java.lang.String,Function>functionsprotected FunctionFactoryparent
 - 
Constructor SummaryConstructors Constructor Description AbstractFunctionFactory(FunctionFactory parent)
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddFunction(java.lang.String name, java.lang.String category, Function f)protected voidaddFunction(java.lang.String name, java.lang.String category, Function f, boolean visible)java.util.Set<java.lang.String>getCategories()Return a sequence of categories to organize functions.FunctiongetFunction(java.lang.String name)Retrieves the function with the given name.java.util.Set<java.lang.String>getFunctionNames()Returns a set of all function names.java.util.Set<java.lang.String>getFunctionsInCategory(java.lang.String name)Returns a Set of function names for all of the functions in the given category.
 
- 
- 
- 
Field Detail- 
parentprotected FunctionFactory parent 
 - 
functionsprotected java.util.Map<java.lang.String,Function> functions 
 - 
categoriesprotected java.util.Map<java.lang.String,java.util.Map<java.lang.String,Function>> categories 
 
- 
 - 
Constructor Detail- 
AbstractFunctionFactorypublic AbstractFunctionFactory(FunctionFactory parent) 
 
- 
 - 
Method Detail- 
addFunctionpublic void addFunction(java.lang.String name, java.lang.String category, Function f) throws java.lang.IllegalArgumentException- Throws:
- java.lang.IllegalArgumentException
 
 - 
addFunctionprotected void addFunction(java.lang.String name, java.lang.String category, Function f, boolean visible) throws java.lang.IllegalArgumentException- Throws:
- java.lang.IllegalArgumentException
 
 - 
getFunctionpublic Function getFunction(java.lang.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:
- getFunctionin interface- FunctionFactory
- Returns:
- The function, or null
 
 - 
getCategoriespublic java.util.Set<java.lang.String> 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 interface- FunctionFactory
 
 - 
getFunctionsInCategorypublic java.util.Set<java.lang.String> getFunctionsInCategory(java.lang.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:
- getFunctionsInCategoryin interface- FunctionFactory
 
 - 
getFunctionNamespublic java.util.Set<java.lang.String> getFunctionNames() Returns a set of all function names.- Specified by:
- getFunctionNamesin interface- FunctionFactory
 
 
- 
 
-