Creating the Signature Class

After setting up the development environment, write the code for the operator. A custom operator must implement three classes: the signature, the GUI node, and the runtime. Each class defines behavior and information that the TIBCO Data Science - Team Studio workflow engine uses to execute the operator.

Perform this task in the IntelliJ IDEA configured for the project.

The first class to implement is the Signature class.

Before you begin Set up your environment for the custom operator project.
    Procedure
  1. Edit the line that reads:
    class MyColumnFilter {

    to read:

    class MyColumnFilterSignature extends OperatorSignature [MyColumnFilterGUINode, MyColumnFilterRuntime] {
  2. Add the corresponding import statement for OperatorSignature.
    import com.alpine.plugin.core._
  3. Review the code.
    • The new class extends OperatorSignature, which is the superclass that implements the core functionality of the operator signature.
    • Pass MyColumnFilterGUINode and MyColumnFilterRuntime as type parameters. These are the other two pieces to be implemented next.
  4. Within the Signature, override the methodgetMetadata().
    This is the only method within this class. Complete the parameters with operator details, as follows:
    • name: The name of the operator.
    • category: The category in which the operator is shown within the TIBCO Data Science - Team Studio application.
    • author: The author of this operator.
    • version: The current version of this operator.
    • helpURL: If you have a link to a page with more information about the operator, place it here.
    • iconNamePrefix: This is blank by default. Use it to provide a custom icon for your operator. Place the icon images in the resources directory and supply the name of the file without the extension (for example, if your icon is test.png, enter test).

    The code should read similar to the following.

    def getMetadata(): OperatorMetadata = {
     new OperatorMetadata(
      name = "My Column Filter",
      category = "Samples",
      author = Some("Jane Doe"),
      version = 1,
      helpURL = None,
      icon = None,
      toolTipText = Some("An operator that filters columns based on user selection.")
     )
    }