Annotation Interface ThingworxServiceMapping


@Target(ANNOTATION_TYPE) @Retention(RUNTIME) @ThingworxExtensionApiAnnotation(since={6,6}) public @interface ThingworxServiceMapping
An annotation mapping various services to a characteristic. These services are then invoked via the REST API against a thing entity; which service is invoked depends on the HTTP method used. GET requests that do not specify a characteristic ID default to the list service. DELETE requests are routed to the delete service. The query service is invoked when an ID is provided in the query string.
  • Required Element Summary

    Required Elements
    Modifier and Type
    Required Element
    Description


    Required parameter: The name of the characteristic to bind the service mappings to.
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description


    Optional parameter: The name of the service on this class that will handle delete requests.


    Optional parameter: A description of the characteristic being mapped.


    Optional parameter: The name of the service on this class that will handle list requests.


    Optional parameter: The name of the service on this class that will handle query requests.
  • Element Details

    • name

      String name


      Required parameter: The name of the characteristic to bind the service mappings to.
    • description

      String description


      Optional parameter: A description of the characteristic being mapped.
      Default:
      ""
    • queryService

      String queryService


      Optional parameter: The name of the service on this class that will handle query requests.

      The service should have, at minimum, one STRING parameter for receiving the ID of the characteristic entry to query. If multiple parameters exist, the first STRING parameter will be used. If the service includes a maxItems parameter (case-sensitive), the maxItems value included in the request (if any) will be passed to the parameter.

      Default:
      ""
    • deleteService

      String deleteService


      Optional parameter: The name of the service on this class that will handle delete requests.

      The service should have, at minimum, one STRING parameter for receiving the ID of the characteristic entry to delete. If multiple parameters exist on the service, the last one will receive the ID.

      Default:
      ""
    • listService

      String listService


      Optional parameter: The name of the service on this class that will handle list requests.

      If the service includes a maxItems parameter (case-sensitive), the service will be invoked with the maxItems value included in the request, if any.

      Default:
      ""