Annotation Interface Node.Metadata

Enclosing interface:
Node

@Supported @Retention(RUNTIME) @Target(TYPE) public static @interface Node.Metadata
Annotation that describes the metadata of the node.
  • Required Element Summary

    Required Elements
    Modifier and Type
    Required Element
    Description
    An interface describing the configuration of the node.
    A provider for the possible outcomes of the node.
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    A validator for the entire service configuration.
    A class that will be serialised to JSON that a node can specify to return additional "metadata" to the client for presenting the node.
    The name of the i18n bundle file relative to the root package.
    The name of the node.
    A list of tags, which can be categories, keywords or synonyms.
  • Element Details

    • outcomeProvider

      @Supported Class<? extends OutcomeProvider> outcomeProvider
      A provider for the possible outcomes of the node.
      Returns:
      the outcome provider.
    • configClass

      @Supported Class<?> configClass
      An interface describing the configuration of the node. The interface should contain methods annotated with Attribute.
      Returns:
      The config class.
    • name

      The name of the node. If not provided, the simple name of the annotated interface is used.
      Returns:
      the name.
      Default:
      ""
    • i18nFile

      @Supported String i18nFile
      The name of the i18n bundle file relative to the root package.

      If not provided, this will default to the node class name.

      Returns:
      the i18n file name.
      Default:
      ""
    • configValidator

      @Supported Class<?> configValidator
      A validator for the entire service configuration.
      Returns:
      The config validator class.
      Default:
      java.lang.Void.class
    • tags

      A list of tags, which can be categories, keywords or synonyms.
      Returns:
      The list of tags.
      Default:
      {}
    • extensions

      @Supported Class<?> extensions
      A class that will be serialised to JSON that a node can specify to return additional "metadata" to the client for presenting the node.

      For example "provider" metadata attribute for a set of nodes written by the same external provider.

      Jackson is used to serialise the class instance to JSON.

      Returns:
      The extensions.
      Default:
      java.lang.Void.class