Skip navigation links
Thingworx Platform API
8.5.0
com.thingworx.metadata.annotations

Annotation Type ThingworxServiceMapping



  • @Target(value=ANNOTATION_TYPE)
     @Retention(value=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 and 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 and 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

        public abstract java.lang.String name


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

        public abstract java.lang.String description


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

        public abstract 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

        public abstract 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

        public abstract 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:
        ""