Annotation Type 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
      java.lang.String baseType


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

      Optional Elements 
      Modifier and Type Optional Element Description
      java.lang.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.
      java.lang.String description


      Optional parameter: a short description of the service result.
      ThingworxDataShapeDefinition localDataShape
      Deprecated.
      This parameter is not examined by the Platform.
      java.lang.String name


    • Element Detail

      • baseType

        java.lang.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:
        BaseTypes
      • name

        java.lang.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

        java.lang.String description


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

        java.lang.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:
        Aspects
        Default:
        {}
      • localDataShape

        @Deprecated
        ThingworxDataShapeDefinition localDataShape
        Deprecated.
        This parameter is not examined by the Platform.


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