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


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

      Optional Elements 
      Modifier and Type Optional Element Description
      java.lang.String deleteService


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


      Optional parameter: A description of the characteristic being mapped.
      java.lang.String listService


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


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

      • name

        java.lang.String name


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

        java.lang.String description


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

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

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

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