Developing Apama Applications > Building Dashboards > Using Dashboard Functions > Creating custom functions > Developing a custom-function library > Implementing getFunctionDescriptors
Implementing getFunctionDescriptors
To create a function descriptor, use the factory class com.apama.dashboard.function.FunctionDescritporFactory. Call createFunctionDescriptor, passing arguments that specify the following:
*The function name that will be used by the Dashboard Builder and by the implementation of evaluateFunction
*The argument names that will be used by the Dashboard Builder
*The argument names that will be used by the implementation of evaluateFunction
*The return type of the function (String, Double, Integer, or com.apama.dashboard.data.ITabularData)
*The names of the returned columns, for functions that return table data
*A text description of the function
Note: When you create a dashboard custom function you must specify prefixes for parameters according to the parameter type. A prefix must be s_arg for a String parameter, t_arg for a Table parameter or i_arg for an Integer parameter, for example, s_arg1, s_arg2. You can see sample code that shows this in the getFunctionDescriptors() definition near the beginning of Sample IFunctionLibrary implementation.
Copyright © Software AG, Darmstadt, Germany and/or Software AG USA Inc., Reston, VA, USA, and/or its Subsidiaries and or/its Affiliates and/or their licensors.
Use, reproduction, transfer, publication or disclosure is prohibited except as specifically provided for in your License Agreement with Software AG.