Annotation Type ThingworxEventDefinition


  • @Target(ANNOTATION_TYPE)
    @Retention(RUNTIME)
    @ThingworxExtensionApiAnnotation(since={6,6})
    public @interface ThingworxEventDefinition
    Defines an event type that may be fired by instances of this entity. Events defined using this annotation can be subscribed to by users, extensions, and Edge devices.
    See Also:
    ThingworxEvent
    • Required Element Summary

      Required Elements 
      Modifier and Type Required Element Description
      java.lang.String dataShape


      Required parameter: a name referencing a data shape entity that describes the data payload tied to this event.
      java.lang.String name


      Required parameter: the name of the event.
    • 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 event definition.
      java.lang.String category


      Optional parameter: a category that conceptually groups together related events.
      java.lang.String description


      Optional parameter: a short description for the event.
      boolean isInvocable


      Optional parameter: determines whether the event can be invoked via the REST API.
      boolean isLocalOnly


      Optional parameter: specifies whether the event definition should be reflected in metadata when external-only metadata is requested.
      boolean isPropertyEvent


      Optional parameter: specifies whether the event is tied to a specific property belonging to the entity that fired the event.
      ThingworxDataShapeDefinition localDataShape
      Deprecated.
      This parameter is not examined by the Platform.
    • Element Detail

      • name

        java.lang.String name


        Required parameter: the name of the event. Event names should follow ThingWorx entity naming conventions. Subscriptions must refer to the event name in order be notified properly whenever the event is fired.
      • dataShape

        java.lang.String dataShape


        Required parameter: a name referencing a data shape entity that describes the data payload tied to this event. The data shape must exist prior to the underlying entity being instantiated.
      • description

        java.lang.String description


        Optional parameter: a short description for the event. The description should provide information on when the event is triggered and any other pertinent information for users.
        Default:
        ""
      • category

        java.lang.String category


        Optional parameter: a category that conceptually groups together related events.
        Default:
        ""
      • isInvocable

        boolean isInvocable


        Optional parameter: determines whether the event can be invoked via the REST API. This does not impact the ability to invoke the event via Java APIs.
        Default:
        true
      • isPropertyEvent

        boolean isPropertyEvent


        Optional parameter: specifies whether the event is tied to a specific property belonging to the entity that fired the event.
        Default:
        false
      • isLocalOnly

        boolean isLocalOnly


        Optional parameter: specifies whether the event definition should be reflected in metadata when external-only metadata is requested. Typically this should be set to true if the event should not be subscribed across federated servers.
        Default:
        false
      • localDataShape

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


        Default:
        @com.thingworx.metadata.annotations.ThingworxDataShapeDefinition
      • 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 event definition.
        See Also:
        Aspects
        Default:
        {}