Annotation Interface 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:
-
Required Element Summary
-
Optional Element Summary
Modifier and TypeOptional ElementDescriptionString[]
Optional parameter: an array of key-value pairs associated with colons (e.g., "aspect1:value1", "aspect2:value2", …) describing aspects applicable to the event definition.
Optional parameter: a category that conceptually groups together related events.
Optional parameter: a short description for the event.boolean
Optional parameter: determines whether the event can be invoked via the REST API.boolean
Optional parameter: specifies whether the event definition should be reflected in metadata when external-only metadata is requested.boolean
Optional parameter: specifies whether the event is tied to a specific property belonging to the entity that fired the event.Deprecated.This parameter is not examined by the Platform.
-
Element Details
-
name
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. -
description
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
String category
Optional parameter: a category that conceptually groups together related events.- Default:
""
-
dataShape
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. -
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.This parameter is not examined by the Platform.- Default:
@com.thingworx.metadata.annotations.ThingworxDataShapeDefinition
-
aspects
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:
- Default:
{}
-