Class ExtensionFunctionDescriptor
- java.lang.Object
-
- com.inductiveautomation.vision.api.designer.beans.ExtensionFunctionDescriptor
-
public class ExtensionFunctionDescriptor extends java.lang.ObjectDescribes an extension function that a component may call during it's lifecycle. To add support for extension functions on your component, do the following:- Have your component implement the
ExtensibleComponentinterface. - Add a List of these descriptors to your bean descriptor. In your bean info's initDesc() method, add a list of
these descriptors as an additional value under the key
EXTENSION_FUNCTIONS
- Have your component implement the
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classExtensionFunctionDescriptor.ArgumentAn argument for an extension function.static classExtensionFunctionDescriptor.Builder
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringEXTENSION_FUNCTIONSThe key for a bean descriptor property that defines a component's list of extension functions that may be implemented.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.List<ExtensionFunctionDescriptor.Argument>getArgs()java.lang.StringgetDefaultScript()Generates the default script for this extension function, including a python style docstringjava.lang.StringgetDescription()java.lang.StringgetImplementation()java.lang.StringgetMethodName()java.lang.Class<?>getReturnType()static ExtensionFunctionDescriptor.BuildernewFunction(java.lang.String methodName)
-
-
-
Field Detail
-
EXTENSION_FUNCTIONS
public static final java.lang.String EXTENSION_FUNCTIONS
The key for a bean descriptor property that defines a component's list of extension functions that may be implemented.- See Also:
- Constant Field Values
-
-
Method Detail
-
newFunction
public static ExtensionFunctionDescriptor.Builder newFunction(java.lang.String methodName)
-
getMethodName
public java.lang.String getMethodName()
-
getReturnType
public java.lang.Class<?> getReturnType()
-
getDescription
public java.lang.String getDescription()
-
getImplementation
public java.lang.String getImplementation()
-
getArgs
public java.util.List<ExtensionFunctionDescriptor.Argument> getArgs()
-
getDefaultScript
public java.lang.String getDefaultScript()
Generates the default script for this extension function, including a python style docstring
-
-