Annotation Interface ThingworxServiceDefinition
@Target(METHOD)
@Retention(RUNTIME)
@ThingworxExtensionApiAnnotation(since={6,6})
public @interface ThingworxServiceDefinition
Specifies that the indicated method is a service and part of the extension’s API. The
ThingworxServiceParameter
and
ThingworxServiceResult
annotations do not have any effect unless used on a method that has
this annotation applied.-
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 field definition.
Optional parameter: a category that conceptually groups together related services.
Optional parameter: : a short description for the service.boolean
Optional parameter: specifies if the service should be overridable by other thing templates or things.boolean
Optional parameter: specifies that the service definition is only intended to describe the service and should fail if invoked.boolean
Optional parameter: specifies whether the service should be reflected in metadata when external-only metadata is requested.boolean
Deprecated.boolean
Optional parameter: indicates whether the service is intended for use by end users and other extensions, or if it is only intended for use within this extension.
-
Element Details
-
name
String name
Required parameter: the name of the service. It is standard convention for service names to start with a capital letter. The name of the service must be identical to the name of the method. -
description
String description
Optional parameter: : a short description for the service. The description should provide information on functionality of the service and any other pertinent information for users.- Default:
""
-
category
String category
Optional parameter: a category that conceptually groups together related services.- Default:
""
-
isPrivate
boolean isPrivate
Optional parameter: indicates whether the service is intended for use by end users and other extensions, or if it is only intended for use within this extension. This is not currently enforced by the Platform.- Default:
false
-
isLocalOnly
boolean isLocalOnly
Optional parameter: specifies whether the service should be reflected in metadata when external-only metadata is requested. Typically this should be set to true if the service should not be exposed across federated servers.- Default:
false
-
isDefinitionOnly
boolean isDefinitionOnly
Optional parameter: specifies that the service definition is only intended to describe the service and should fail if invoked. Set this to true if you are applying it to an abstract method that other thing templates should override.- Default:
false
-
isAllowOverride
boolean isAllowOverride
Optional parameter: specifies if the service should be overridable by other thing templates or things. When set to true, ThingWorx will check to see if a service definition has been specified on the effective thing that overrides this service. Note that if this is set to true and isDefinitionOnly is set to false, then the service cannot be assigned any behavior.- Default:
false
-
isOpen
Deprecated.
Annotation has been deprecated since 8.4. Beware that the use of isOpen could expose your extensions to security holes and should be used with extreme prejudice. Optional parameter: indicates that this service should always execute regardless of whether the user has permission to invoke it. The service will still fail to execute if the user does not have permission to access the thing or subsystem itself.- Default:
false
-
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 field definition.- See Also:
- Default:
{}
-