Creating the Signature Class

After you set 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 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.

Prerequisites

You must have set up the 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 one method: getMetadata().
    This is the only method within this class. Complete the parameters with details about your operator as follows:
    • name: The name of the operator.
    • category: The category the operator is displayed in within the 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 your 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 folder and supply the name of the file without the extension (for example, if your icon is test.png, enter test).

    The code should read as follows:

    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.")
     )
    }