Class ClientFunctionFactory.DynamicDispatchCreatorManager
java.lang.Object
com.inductiveautomation.ignition.client.expressions.ClientFunctionFactory.DynamicDispatchCreatorManager
- All Implemented Interfaces:
ExpressionFunctionManager,FunctionFactory
- Enclosing class:
- ClientFunctionFactory
protected class ClientFunctionFactory.DynamicDispatchCreatorManager
extends Object
implements ExpressionFunctionManager
We only want to wrap up functions provided by modules, so we create this separate manager that
will be used by them. It will wrap the functions up and then pass them to the client factory.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddFunction(String name, String category, Function f) Adds the given function to the expression system.voidaddFunction(String name, String category, Function f, boolean visible) Adds the given function, optionally making it invisible to the various configuration helpers.Return a sequence of categories to organize functions.getFunction(String name) Look up the function with the given name.Returns a set of all the registered function names.getFunctionsInCategory(String name) Returns a set of function names that belong to the given category.booleanReturns whether the specified function has already been defined.
-
Constructor Details
-
DynamicDispatchCreatorManager
protected DynamicDispatchCreatorManager()
-
-
Method Details
-
getFunction
Description copied from interface:FunctionFactoryLook 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:
getFunctionin interfaceFunctionFactory- Parameters:
name- the name of the function to look up- Returns:
- the
Function, ornullif no function with the given name exists
-
getFunctionNames
Description copied from interface:FunctionFactoryReturns a set of all the registered function names. Used for syntax highlighting in the designer.- Specified by:
getFunctionNamesin interfaceFunctionFactory- Returns:
- a
Setof all registered function names
-
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
Description copied from interface:FunctionFactoryReturns a set of function names that belong to the given category.- Specified by:
getFunctionsInCategoryin interfaceFunctionFactory- Parameters:
name- the category name- Returns:
- a
Setof function names in the given category
-
addFunction
Description copied from interface:ExpressionFunctionManagerAdds the given function to the expression system.- Specified by:
addFunctionin interfaceExpressionFunctionManager- Throws:
IllegalArgumentException- if the provided function name already exists.
-
addFunction
public void addFunction(String name, String category, Function f, boolean visible) throws IllegalArgumentException Description copied from interface:ExpressionFunctionManagerAdds the given function, optionally making it invisible to the various configuration helpers. This is useful for supporting backwards compatibility of "legacy" expression functions.- Specified by:
addFunctionin interfaceExpressionFunctionManager- Throws:
IllegalArgumentException
-
isDefined
Description copied from interface:ExpressionFunctionManagerReturns whether the specified function has already been defined.- Specified by:
isDefinedin interfaceExpressionFunctionManager
-