Annotation Interface ThingworxServiceResult


@Target(METHOD) @Retention(RUNTIME) @ThingworxExtensionApiAnnotation(since={6,6}) public @interface ThingworxServiceResult
Defines the result returned by the service. If omitted, the Platform will assume a result with a base type of NOTHING.
  • Required Element Summary

    Required Elements
    Modifier and Type
    Required Element
    Description


    Required parameter: the base type for the result.
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description


    Optional parameter: an array of key-value pairs associated with colons (e.g., "aspect1:value1", "aspect2:value2", …) describing aspects applicable to the field definition.


    Optional parameter: a short description of the service result.
    Deprecated.
    This parameter is not examined by the Platform.


  • Element Details

    • name

      String name


      Optional parameter: the name of the result as it should be referenced by other services when invoked via the REST API or via the processServiceRequest methods. If the base type of the service is InfoTable, then the name is effectively ignored. Otherwise, the result of the service is an InfoTable with one column whose key is equal to the name parameter.

      Note that omitting the name parameter for any result base type aside from NOTHING or INFOTABLE will prevent the results from being accessible to JavaScript services and is considered invalid.

      Default:
      ""
    • description

      String description


      Optional parameter: a short description of the service result.
      Default:
      ""
    • baseType

      String baseType


      Required parameter: the base type for the result. When defining the base type for the result, it is important that the matching Java type is used for the method's result.
      See Also:
    • aspects

      String[] aspects


      Optional parameter: an array of key-value pairs associated with colons (e.g., "aspect1:value1", "aspect2:value2", …) describing aspects applicable to the field definition.
      See Also:
      Default:
      {}
    • localDataShape

      Deprecated.
      This parameter is not examined by the Platform.


      Default:
      @com.thingworx.metadata.annotations.ThingworxDataShapeDefinition