Class ExtensionFunctionDescriptor
- java.lang.Object
-
- com.inductiveautomation.vision.api.designer.beans.ExtensionFunctionDescriptor
-
public class ExtensionFunctionDescriptor extends java.lang.Object
Describes 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
ExtensibleComponent
interface. - 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 class
ExtensionFunctionDescriptor.Argument
An argument for an extension function.static class
ExtensionFunctionDescriptor.Builder
-
Field Summary
Fields Modifier and Type Field Description static 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.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.List<ExtensionFunctionDescriptor.Argument>
getArgs()
java.lang.String
getDefaultScript()
Generates the default script for this extension function, including a python style docstringjava.lang.String
getDescription()
java.lang.String
getImplementation()
java.lang.String
getMethodName()
java.lang.Class<?>
getReturnType()
static ExtensionFunctionDescriptor.Builder
newFunction(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
-
-