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 java.lang.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 Modifier Constructor Description protected
DynamicDispatchCreatorManager()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addFunction(java.lang.String name, java.lang.String category, Function f)
Adds the given function to the expression system.void
addFunction(java.lang.String name, java.lang.String category, Function f, boolean visible)
Adds the given function, optionally making it invisible to the various configuration helpers.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)
boolean
isDefined(java.lang.String functionName)
Returns whether the specified function has already been defined.
-
-
-
Method Detail
-
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
-
addFunction
public void addFunction(java.lang.String name, java.lang.String category, Function f) throws java.lang.IllegalArgumentException
Description copied from interface:ExpressionFunctionManager
Adds the given function to the expression system.- Specified by:
addFunction
in interfaceExpressionFunctionManager
- Throws:
java.lang.IllegalArgumentException
- if the provided function name already exists.
-
addFunction
public void addFunction(java.lang.String name, java.lang.String category, Function f, boolean visible) throws java.lang.IllegalArgumentException
Description copied from interface:ExpressionFunctionManager
Adds 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:
addFunction
in interfaceExpressionFunctionManager
- Throws:
java.lang.IllegalArgumentException
-
isDefined
public boolean isDefined(java.lang.String functionName)
Description copied from interface:ExpressionFunctionManager
Returns whether the specified function has already been defined.- Specified by:
isDefined
in interfaceExpressionFunctionManager
-
-