@ThingworxExtensionApiClass(since={6,6}, canExtendOrImplement=true) public class Thing extends RootEntity implements IServiceProvider, IPropertyProvider, IEventProvider, IEventMetadataProvider, IServiceMetadataProvider, IShapeProvider, IAlertProvider, IEventProcessor, IHierarchicalEntity
An entity containing services, properties, events, and subscriptions representing an instance of a thing based on a specified template.
Thing entities are one of the fundamental entity types in Thingworx. They are used to represent an instance of an object that is
actionable (services), declarative (properties), reactive (events), and observable (subscriptions). Things must define a single
ThingTemplate
to inherit shared functionality, as well as any number of
ThingShape
s that add additional functionality that is independent of the
ThingTemplate
hierarchy. The consolidation of all inherited functionality must not have any name collisions within the same
behavioral type (i.e., a property and service can share the same name, but two services cannot).
All Things have the following lifecycle:
ThingState |
OFF | → | ON | → | OFF | → | N/A |
Events | Inactive → Preinitializing (Entity) → Validating → Initializing (Entity) → Initializing (Thing) → Starting | → | Notifying → Active → Stopping | → | Cleaning Up → Deactivated | → | Disposing |
These lifecycle events correspond to the following methods:
State | Method | Description |
---|---|---|
Preinitialize (Entity) 1 | RootEntity#preInitializeEntity() |
Occurs only during the entity import process. |
Validate1 | Thing#validateConfiguration(ImportedEntityCollection) |
Occurs only during the entity import process. Validates all requirements of the entity. |
Initialize (Entity) | Thing#initializeEntity() |
Initializes the entity. Should be used to initialize anything needed by thing initialization. |
Initialize (Thing) | Thing#initializeThing() |
Initializes the thing. Should be used to construct the initial state of the thing. |
Initialize (Thing) with patch operation | Thing#initializeThing(PatchType) |
Initializes the thing. Should be used to construct the initial state of the thing. |
Start | Thing#startThing() |
Brings the thing into an active state. Initialization should finish at this step. |
Start | Thing#startThing(PatchType) |
Brings the thing into an active state. Initialization should finish at this step. |
Notify | Thing#processStartNotification() |
Thing has entered active state and is about to run. Any final processing must occur here. |
Notify | Thing#processStartNotification(PatchType) |
Thing has entered active state and is about to run. Any final processing must occur here. |
Stop | Thing#stopThing() |
Thing has received a stop request. Any back-end processing should be torn down. |
Cleanup | Thing#cleanupThing(PatchType) |
Thing has stopped and needs to clean up its resources. Any managed resources should be cleaned up. |
Dispose | Thing#dispose() |
Removes any remaining references of this entity (e.g., networks). |
When developing extensions, you must extend from the Thing
class for any classes that are assigned to a
com.thingworx.thingpackages.ThingPackage entity. If the package is assigned to a thing in the extension, then the code will execute in
the context of that entity. If the package is assigned to a thing template, then the code will execute in the context of the things that
have been created with the thing template in its hierarchy.
Thing
is not thread-safe nor is it designed to be mutated by multiple threads simultaneously.
ThingTemplate
,
ThingShape
,
Serialized FormModifier and Type | Field and Description |
---|---|
static org.slf4j.Logger |
_logger |
static java.lang.String |
DATASHAPE_INCOMING_LOCAL_PROPERTY_BINDING |
static java.lang.String |
DEFAULT_SETTINGS_TABLE |
static java.lang.String |
ENTITYLIST_SHAPE |
static java.lang.String |
GENERIC_THING_TEMPLATE |
static java.lang.String |
TYPE_THING |
BASIC_PROPERTIES
NAME_COMPARATOR
Constructor and Description |
---|
Thing() |
Modifier and Type | Method and Description |
---|---|
void |
AcknowledgeAlert(java.lang.String property,
java.lang.String message)
Service Category: Alerts
Service Description: Acknowledge an active alert.
|
void |
acknowledgeAlertByProperty(java.lang.String propertyName,
java.lang.String message) |
void |
acknowledgeAlertByPropertyAndName(java.lang.String propertyName,
java.lang.String alertName,
java.lang.String message) |
void |
acknowledgeAllAlerts(java.lang.String message) |
void |
AcknowledgeAllAlerts(java.lang.String message)
Service Category: Alerts
Service Description: Acknowledge all active alerts.
|
void |
AddBooleanValueStreamEntry(org.joda.time.DateTime timestamp,
java.lang.String propertyName,
java.lang.Boolean value)
Service Category: StreamEntries
Service Description: Add a new stream entry.
|
void |
AddDateTimeValueStreamEntry(org.joda.time.DateTime timestamp,
java.lang.String propertyName,
org.joda.time.DateTime value)
Service Category: StreamEntries
Service Description: Add a new stream entry.
|
void |
AddDynamicSubscription(java.lang.String thingName,
java.lang.String eventName,
java.lang.String propertyName,
java.lang.String serviceName)
Service Category: Subscriptions
Service Description: Add a dynamic subscription.
|
void |
AddEventDefinition(java.lang.String name,
java.lang.String description,
java.lang.String category,
java.lang.String dataShape,
java.lang.Boolean remote,
java.lang.String remoteEventName)
Service Category: Metadata
Service Description: Add or update an event definition.
|
void |
AddImageValueStreamEntry(org.joda.time.DateTime timestamp,
java.lang.String propertyName,
byte[] value)
Service Category: StreamEntries
Service Description: Add a new stream entry.
|
void |
AddInfoTableValueStreamEntry(org.joda.time.DateTime timestamp,
java.lang.String propertyName,
InfoTable value)
Service Category: StreamEntries
Service Description: Add a new stream entry.
|
void |
AddIntegerValueStreamEntry(org.joda.time.DateTime timestamp,
java.lang.String propertyName,
java.lang.Integer value)
Service Category: StreamEntries
Service Description: Add a new stream entry.
|
void |
AddLocationValueStreamEntry(org.joda.time.DateTime timestamp,
java.lang.String propertyName,
Location value)
Service Category: StreamEntries
Service Description: Add a new stream entry.
|
void |
AddLongValueStreamEntry(org.joda.time.DateTime timestamp,
java.lang.String propertyName,
java.lang.Long value)
Service Category: StreamEntries
Service Description: Add a new stream entry.
|
void |
AddNumberValueStreamEntry(org.joda.time.DateTime timestamp,
java.lang.String propertyName,
java.lang.Double value)
Service Category: StreamEntries
Service Description: Add a new stream entry.
|
void |
AddOrUpdateAlert(java.lang.String property,
java.lang.String alertType,
java.lang.String alertName,
java.lang.String description,
java.lang.Boolean enabled,
java.lang.Integer priority,
InfoTable attributes,
java.lang.Boolean persistent)
Service Category: Alerts
Service Description: Add or update an alert for a property.
|
ThingProperty |
addProperty(PropertyDefinition propertyDefinition)
|
void |
AddPropertyDefinition(java.lang.String name,
java.lang.String description,
java.lang.String type,
java.lang.String category,
java.lang.String dataShape,
java.lang.Boolean readOnly,
java.lang.Boolean persistent,
java.lang.Boolean logged,
java.lang.String dataChangeType,
java.lang.Double dataChangeThreshold,
java.lang.Boolean remote,
java.lang.String remotePropertyName,
java.lang.Integer timeout,
java.lang.String pushType,
java.lang.Double pushThreshold,
java.lang.String defaultValue)
Deprecated.
As of release 8.0, replaced by AddPropertyDefinition(String, String, String, String, String, Boolean, Boolean, Boolean,
String, Double, Boolean, String, Integer, String, Double, String, JSONObject)
|
void |
AddPropertyDefinition(java.lang.String name,
java.lang.String description,
java.lang.String type,
java.lang.String category,
java.lang.String dataShape,
java.lang.Boolean readOnly,
java.lang.Boolean persistent,
java.lang.Boolean logged,
java.lang.String dataChangeType,
java.lang.Double dataChangeThreshold,
java.lang.Boolean remote,
java.lang.String remotePropertyName,
java.lang.Integer timeout,
java.lang.String pushType,
java.lang.Double pushThreshold,
java.lang.String defaultValue,
org.json.JSONObject remoteBindingAspects)
Service Category: Metadata
Service Description: Add a property definition.
|
InfoTable |
AddPropertyDefinitions(InfoTable values,
java.lang.Boolean ignoreInvalidDefinitions)
Service Category: Metadata
Service Description: Add multiple property definitions at once.
|
void |
AddPropertyTransformDefinition(java.lang.String name,
java.lang.String description,
java.lang.String category,
java.lang.Boolean persistent,
java.lang.Boolean logged,
java.lang.Integer timeout,
InfoTable propertyTransformConfig)
Service Category: Metadata
Service Description: Add a property transform definition.
|
void |
AddServiceDefinition(java.lang.String name,
java.lang.String description,
java.lang.String category,
InfoTable parameters,
InfoTable resultType,
java.lang.Boolean remote,
java.lang.String remoteServiceName,
java.lang.Integer timeout)
Service Category: Metadata
Service Description: Add or update a service definition.
|
void |
AddStringValueStreamEntry(org.joda.time.DateTime timestamp,
java.lang.String propertyName,
java.lang.String value)
Service Category: StreamEntries
Service Description: Add a new stream entry.
|
void |
AddTags(TagCollection tags)
Service Category: Metadata
Service Description: Append additional tags to an entity.
|
void |
AddThingCodeValueStreamEntry(org.joda.time.DateTime timestamp,
java.lang.String propertyName,
ThingCode value)
Service Category: StreamEntries
Service Description: Add a new stream entry.
|
void |
AddVec2ValueStreamEntry(org.joda.time.DateTime timestamp,
java.lang.String propertyName,
Vec2 value)
Service Category: StreamEntries
Service Description: Add a new stream entry.
|
void |
AddVec3ValueStreamEntry(org.joda.time.DateTime timestamp,
java.lang.String propertyName,
Vec3 value)
Service Category: StreamEntries
Service Description: Add a new stream entry.
|
void |
AddVec4ValueStreamEntry(org.joda.time.DateTime timestamp,
java.lang.String propertyName,
Vec4 value)
Service Category: StreamEntries
Service Description: Add a new stream entry.
|
void |
checkDemandRead(ThingProperty property)
|
protected void |
checkPropertyName(java.lang.String propertyName) |
protected void |
checkValueStream() |
protected void |
cleanupThing()
|
protected void |
cleanupThing(PatchType patchType)
|
void |
DisableAlertsForProperty(java.lang.String property,
java.lang.String alertName,
java.lang.Boolean persistent)
Service Category: Alerts
Service Description: Disable alert(s) for a property.
|
void |
DisableAllAlerts(java.lang.Boolean persistent)
Service Category: Alerts
Service Description: Disable all alerts for a thing.
|
void |
DisableSubscription(java.lang.String thingName,
java.lang.String eventName,
java.lang.String propertyName)
Service Category: Subscriptions
Service Description: Disable Subscription.
|
void |
DisableThing()
Service Category: Lifecycle
Service Description: Disable this thing.
|
void |
dispatchBackgroundEvent(ThingworxEvent event) |
void |
dispatchEvent(ThingworxEvent event) |
void |
dispose()
|
void |
EnableAlertsForProperty(java.lang.String property,
java.lang.String alertName,
java.lang.Boolean persistent)
Service Category: Alerts
Service Description: Enable alert(s) for a property.
|
void |
EnableAllAlerts(java.lang.Boolean persistent)
Service Category: Alerts
Service Description: Enable all alerts for a thing.
|
void |
EnableSubscription(java.lang.String thingName,
java.lang.String eventName,
java.lang.String propertyName)
Service Category: Subscriptions
Service Description: Enable Subscription.
|
void |
EnableThing()
Service Category: Lifecycle
Service Description: Enable this thing.
|
void |
fireEvent(EventDefinition eventDefinition,
org.joda.time.DateTime timestamp,
ValueCollection eventData) |
AlertConfigurationCollection |
getAlertConfigurations()
|
InfoTable |
GetAlertDefinition(java.lang.String property,
java.lang.String alertName)
Service Category: Alerts
Service Description: Get alert definition for a property.
|
InfoTable |
GetAlertDefinitions(java.lang.String property)
Service Category: Alerts
Service Description: Get effective alert definitions for a property.
|
AlertCollection |
getAlerts()
|
AlertList |
getAlertsForProperty(java.lang.String propertyName)
Returns Effective Alerts including local and inherited from ancestors. |
java.lang.String |
GetAlertStatus(java.lang.String property,
java.lang.String alertName)
Service Category: Alerts
Service Description: Get the Status of the given Alert.
|
InfoTable |
GetAlertStatuses()
Service Category: Alerts
Service Description: Get the Statuses of the given Alerts.
|
InfoTable |
GetAlertStatusesForProperty(java.lang.String property)
Service Category: Alerts
Service Description: Get the Statuses of the given Alerts.
|
InfoTable |
GetAlertSummary(java.lang.Boolean onlyAcknowledged,
java.lang.Boolean onlyUnacknowledged,
java.lang.Double maxItems)
Service Category: Alerts
Service Description: Get alert summary status.
|
InfoTable |
GetAlertSummaryForProperty(java.lang.String property,
java.lang.Boolean onlyAcknowledged,
java.lang.Boolean onlyUnacknowledged,
java.lang.Double maxItems)
Service Category: Alerts
Service Description: Get alert summary for a property.
|
InfoTable |
GetAllAnomalyAlertTrainingStatistics()
Service Category: Alerts
Service Description: Get All AnomalyAlert Training Statistics on this Thing.
|
EntityReferenceCollection |
getAllImplementedThingShapes()
|
EntityReferenceCollection |
getAllImplementedThingTemplates()
|
InfoTable |
GetAnomalyAlertTrainingStatisticsForAlert(java.lang.String property,
java.lang.String alertName)
Service Category: Alerts
Service Description: Get Training Statistics for given Alert.
|
InfoTable |
GetAnomalyAlertTrainingStatisticsForProperty(java.lang.String property)
Service Category: Alerts
Service Description: Get AnomalyAlert Training Statistics for given Property.
|
ImagePrimitive |
GetAvatar()
Service Category: Metadata
Service Description: Get avatar image.
|
java.lang.Boolean |
GetBooleanAlertParameter(java.lang.String property,
java.lang.String alertName,
java.lang.String parameterName)
Service Category: Alerts
Service Description: Get a boolean alert parameter.
|
java.lang.Boolean |
GetBooleanPropertyValue(java.lang.String propertyName)
Service Category: Properties
Service Description: Get the current property value.
|
org.joda.time.DateTime |
GetDateTimeAlertParameter(java.lang.String property,
java.lang.String alertName,
java.lang.String parameterName)
Service Category: Alerts
Service Description: Get a date alert parameter.
|
org.joda.time.DateTime |
GetDateTimePropertyValue(java.lang.String propertyName)
Service Category: Properties
Service Description: Get the current property value.
|
EntityReferenceTypeMap |
getDependencies()
|
AlertConfigurationCollection |
getEffectiveAlertConfiguration()
|
AlertDefinition |
getEffectiveAlertDefinition(java.lang.String property,
java.lang.String alertName) |
EventDefinition |
getEffectiveEventDefinition(java.lang.String name)
|
java.lang.String |
getEffectiveIdentifier() |
InfoTable |
GetEffectiveLocalPropertyBinding(java.lang.String propertyName)
Service Category: Bindings
Service Description: Get the effective local property binding for a property.
Get the effective (inherited and local) property binding for a property |
LocalPropertyBindingCollection |
getEffectiveLocalPropertyBindings() |
InfoTable |
GetEffectiveLocalPropertyBindings()
Service Category: Bindings
Service Description: Get the effective local property bindings.
Get all effective (inherited and local) property bindings for this thing |
PropertyDefinition |
getEffectivePropertyDefinition(java.lang.String name)
|
java.lang.Boolean |
GetEffectivePropertyLogging(java.lang.String propertyName)
Service Category: DataLogging
Service Description: Get the logging status of a specific property from the effective Thing shape.
|
RemoteEventBindingCollection |
getEffectiveRemoteEventBindings() |
RemotePropertyBindingCollection |
getEffectiveRemotePropertyBindings() |
RemoteServiceBindingCollection |
getEffectiveRemoteServiceBindings() |
ServiceDefinition |
getEffectiveServiceDefinition(java.lang.String serviceName)
|
java.lang.String |
getEffectiveValueStreamName()
|
RelationshipTypes.ThingworxRelationshipTypes |
getEntityType()
|
java.lang.String |
GetHomeMashup()
Service Category: Mashups
Service Description: Get home mashup.
|
java.lang.String |
getIdentifier() |
java.lang.String |
GetIdentifier()
Service Category: Identifier
Service Description: Get the identifier for a thing.
|
byte[] |
GetImagePropertyValue(java.lang.String propertyName)
Service Category: Properties
Service Description: Get the current property value.
|
InfoTable |
GetImplementedShapes()
Service Category: Metadata
Service Description: Get the implemented thing shapes for this thing.
|
java.util.HashSet<java.lang.String> |
getImplementedThingTemplates()
|
InfoTable |
GetIncomingLocalPropertyBinding(java.lang.String propertyName)
Service Category: Bindings
Service Description: Get incoming local bindings to this thing for the given property.
Get incoming local bindings to this thing for the given property |
InfoTable |
GetIncomingLocalPropertyBindings()
Service Category: Bindings
Service Description: Get all things and their properties that have local bindings on this thing.
Get all things and their properties that have local bindings on this thing |
EventDefinition |
getInstanceEventDefinition(java.lang.String name)
|
EventDefinitionCollection |
getInstanceEventDefinitions()
|
PropertyDefinition |
getInstancePropertyDefinition(java.lang.String name)
|
PropertyDefinitionCollection |
getInstancePropertyDefinitions()
|
ServiceDefinitionCollection |
getInstancePublicServiceDefinitions()
|
ServiceDefinition |
getInstanceServiceDefinition(java.lang.String name)
|
ServiceDefinitionCollection |
getInstanceServiceDefinitions()
|
ThingShapeInstance |
getInstanceShape()
|
SubscriptionCollection |
getInstanceSubscriptions()
|
java.lang.Integer |
GetIntegerAlertParameter(java.lang.String property,
java.lang.String alertName,
java.lang.String parameterName)
Service Category: Alerts
Service Description: Get a numeric alert parameter.
|
java.lang.Integer |
GetIntegerPropertyValue(java.lang.String propertyName)
Service Category: Properties
Service Description: Get the current property value.
|
InfoTable |
GetLocalAlertDefinitions(java.lang.String property)
Service Category: Alerts
Service Description: Get local alert definitions for a property.
|
InfoTable |
GetLocallyImplementedShapes()
Service Category: Metadata
Service Description: Get the locally implemented thing shapes for this thing.
|
InfoTable |
GetLocalPropertyBinding(java.lang.String propertyName)
Service Category: Bindings
Service Description: Get the property binding for a property.
|
Location |
GetLocationAlertParameter(java.lang.String property,
java.lang.String alertName,
java.lang.String parameterName)
Service Category: Alerts
Service Description: Get a location alert parameter.
|
Location |
GetLocationPropertyValue(java.lang.String propertyName)
Service Category: Properties
Service Description: Get the current property value.
|
InfoTable |
GetLoggedProperties(java.lang.String type)
Service Category: Metadata
Service Description: Get a list of logged properties for this thing.
|
java.lang.Long |
GetLongAlertParameter(java.lang.String property,
java.lang.String alertName,
java.lang.String parameterName)
Service Category: Alerts
Service Description: Get a long alert parameter.
|
java.lang.Long |
GetLongPropertyValue(java.lang.String propertyName)
Service Category: Properties
Service Description: Get the current property value.
|
InfoTable |
GetMashups()
Service Category: Mashups
Service Description: Get the mashups related to this thing.
|
InfoTable |
GetNamedProperties(org.json.JSONObject propertyNames)
Service Category: Properties
Service Description: Get a subset of the current property values for this thing.
|
InfoTable |
GetNamedPropertyValues(InfoTable propertyNames)
Service Category: Properties
Service Description: Get a subset of the current property values for this thing.
|
InfoTable |
GetNamedPropertyValuesVTQ(InfoTable propertyNames)
Service Category: Properties
Service Description: Get the current property values for this thing as VTQ.
|
InfoTable |
GetNamedPropertyValuesVTQA(InfoTable propertyNames)
Service Category: Properties
Service Description: Get a subset of the current property values (VTQ) and the highest alert for this thing.
|
InfoTable |
GetNetworks()
Service Category: Networks
Service Description: Get the networks associated with a thing.
|
java.lang.Double |
GetNumberAlertParameter(java.lang.String property,
java.lang.String alertName,
java.lang.String parameterName)
Service Category: Alerts
Service Description: Get a numeric alert parameter.
|
java.lang.Double |
GetNumberPropertyValue(java.lang.String propertyName)
Service Category: Properties
Service Description: Get the current property value.
|
InfoTable |
GetNumericLoggedProperties()
Service Category: Metadata
Service Description: Get a list of logged properties for this thing that are of a numeric data type.
|
ThingPropertyCollection |
getProperties()
|
ThingProperty |
getProperty(java.lang.String propertyName)
|
boolean |
getPropertyAckStatus(java.lang.String property) |
boolean |
getPropertyAlertStatus(java.lang.String property) |
java.lang.Boolean |
GetPropertyLogging(java.lang.String propertyName)
Service Category: DataLogging
Service Description: Get property logging status for a specific property.
|
QualityStatus |
getPropertyQuality(java.lang.String propertyName)
|
java.lang.String |
GetPropertyQuality(java.lang.String propertyName)
Service Category: Properties
Service Description: Get the quality for a specific property.
|
org.joda.time.DateTime |
getPropertyTime(java.lang.String propertyName)
|
org.joda.time.DateTime |
GetPropertyTime(java.lang.String propertyName)
Service Category: Properties
Service Description: Get the timestamp for a specific property.
|
BaseTypes |
getPropertyType(java.lang.String propertyName)
Returns the base type defined in the specified property's definition. |
IPrimitiveType |
getPropertyValue(java.lang.String propertyName)
|
IPrimitiveType |
getPropertyValue(ThingProperty property)
|
ValueCollection |
getPropertyValues()
|
InfoTable |
GetPropertyValues()
Service Category: Properties
Service Description: Get the current property values for this thing.
|
InfoTable |
getPropertyValuesAsInfoTable()
Returns an InfoTable containing a list of the properties belonging to this instance and their
values. |
InfoTable |
GetPropertyValuesAsMultiRowTable()
Service Category: Properties
Service Description: Get the current property values for this thing.
|
InfoTable |
GetPropertyValuesVTQ()
Service Category: Properties
Service Description: Get the current property values for this thing as VTQ.
|
InfoTable |
GetPropertyValuesVTQA()
Service Category: Properties
Service Description: Get the current property values (VTQ) and the highest alert for this thing.
|
java.lang.Boolean |
GetPublished()
Service Category: Federation
Service Description: Get published thing for federation.
|
InfoTable |
GetRemoteEventBinding(java.lang.String eventName)
Service Category: Bindings
Service Description: Get the remote event binding for a event.
|
InfoTable |
GetRemotePropertyBinding(java.lang.String propertyName)
Service Category: Bindings
Service Description: Get the remote property binding for a property.
|
InfoTable |
GetRemoteServiceBinding(java.lang.String serviceName)
Service Category: Bindings
Service Description: Get the remote service binding for a service.
|
ThingState |
getState()
|
java.lang.String |
GetStringAlertParameter(java.lang.String property,
java.lang.String alertName,
java.lang.String parameterName)
Service Category: Alerts
Service Description: Get a string alert parameter.
|
java.lang.String |
GetStringPropertyValue(java.lang.String propertyName)
Service Category: Properties
Service Description: Get the current property value.
|
ThingCode |
GetThingCodePropertyValue(java.lang.String propertyName)
Service Category: Properties
Service Description: Get the current property value.
|
InfoTable |
GetThingRelationships(java.lang.Integer maxDepth)
Service Category: Relationships
Service Description: Return a list of all the things referenced by this thing.
|
InfoTable |
GetThingSummaryInformation()
Service Category: Metadata
Service Description: Get thing summary information.
|
ThingTemplate |
getThingTemplate()
|
InfoTable |
GetThingTemplate()
Service Category: Metadata
Service Description: Get the thing template for this thing.
|
java.lang.String |
getThingTemplateName() |
java.lang.String |
GetValueStream()
Service Category: DataLogging
Service Description: Get the identifier for a thing.
|
java.lang.String |
getValueStreamName()
|
Vec2 |
GetVec2PropertyValue(java.lang.String propertyName)
Service Category: Properties
Service Description: Get the current property value.
|
Vec3 |
GetVec3PropertyValue(java.lang.String propertyName)
Service Category: Properties
Service Description: Get the current property value.
|
Vec4 |
GetVec4PropertyValue(java.lang.String propertyName)
Service Category: Properties
Service Description: Get the current property value.
|
java.lang.Boolean |
HasAlert(java.lang.String property,
java.lang.String alertName)
Service Category: Alerts
Service Description: Check to see if an alert is defined for a property.
|
boolean |
hasEventDefinition(java.lang.String name) |
boolean |
hasLocalEventDefinition(java.lang.String name) |
boolean |
hasLocalPropertyDefinition(java.lang.String name) |
boolean |
hasLocalServiceDefinition(java.lang.String name) |
boolean |
hasProperty(java.lang.String propertyName)
Returns true if there exists a property with the specified name. |
boolean |
hasPropertyDefinition(java.lang.String name) |
boolean |
hasServiceDefinition(java.lang.String name) |
java.lang.Boolean |
HavePropertiesChangedSince(org.joda.time.DateTime timestamp)
Service Category: Properties
Service Description: Has any property changed since a given time.
|
boolean |
implementsShape(java.lang.String thingShape)
|
java.lang.Boolean |
ImplementsShape(java.lang.String thingShapeName)
Service Category: Metadata
Service Description: Check to see if a thing implements a particular thing shape.
|
boolean |
implementsTemplate(java.lang.String thingTemplate)
|
void |
initializeEntity()
|
void |
initializeProperty(java.lang.String propertyName,
IPrimitiveType value)
|
protected void |
initializeThing()
|
protected void |
initializeThing(PatchType patchType) |
static boolean |
isAlwaysAvailableService(java.lang.String name)
|
static boolean |
isBuiltInEvent(java.lang.String name) |
static boolean |
isBuiltInProperty(java.lang.String name) |
java.lang.Boolean |
IsDerivedFromTemplate(java.lang.String thingTemplateName)
Service Category: Metadata
Service Description: Check to see if a thing is derived from a particular thing template.
|
boolean |
IsDynamicSubscriptionCreated(java.lang.String thingName,
java.lang.String eventName,
java.lang.String propertyName,
java.lang.String serviceName)
Service Category: Subscriptions
Service Description: Returns true if given dynamic subscription is present.
|
boolean |
isEnabled()
|
boolean |
IsEnabled()
Service Category: Lifecycle
Service Description: Get Enabled Status.
|
boolean |
isEventRemote(EventDefinition eventDefinition)
|
boolean |
isExternallySubscribed(java.lang.String eventName)
Deprecated.
Use
isSubscribed(String) instead. |
java.lang.Boolean |
IsInNetwork(java.lang.String network)
Service Category: Networks
Service Description: Check to see if a thing is in a specific network.
|
boolean |
isLocallySubscribed(java.lang.String eventName)
Deprecated.
Use
isSubscribed(String) instead. |
boolean |
isLocalProperty(java.lang.String property)
|
boolean |
isPropertyEvent(java.lang.String eventName)
|
boolean |
isPropertyRemote(PropertyDefinition propertyDefinition)
|
boolean |
isPublished() |
boolean |
isRunning()
|
boolean |
isServiceRemote(ServiceDefinition serviceDefinition)
|
boolean |
isSubscribed(java.lang.String eventName)
|
protected void |
preprocessSetPropertyVTQ(ThingProperty property,
VTQ newValue,
boolean withUpdate)
|
InfoTable |
processAPIServiceRequest(java.lang.String serviceName,
ValueCollection params)
|
InfoTable |
processServiceRequest(java.lang.String serviceName,
ValueCollection params)
|
protected void |
processStartNotification()
|
protected void |
processStartNotification(PatchType patchType) |
void |
PurgeAllPropertyHistory(org.joda.time.DateTime startDate,
org.joda.time.DateTime endDate)
Service Category: Maintenance
Service Description: Purge all value stream entries for a specified date range.
|
void |
PurgePropertyHistory(java.lang.String propertyName,
org.joda.time.DateTime startDate,
org.joda.time.DateTime endDate,
java.lang.Boolean immediate)
Service Category: Maintenance
Service Description: Purge stream entries for a specified date range.
|
void |
PurgeSelectedPropertyHistory(org.joda.time.DateTime startDate,
org.joda.time.DateTime endDate,
InfoTable propertiesToPurge)
Service Category: Maintenance
Service Description: Purge all value stream entries for a specified date range for a given list of properties.
|
InfoTable |
QueryAlertHistory(org.joda.time.DateTime startDate,
org.joda.time.DateTime endDate,
java.lang.Boolean oldestFirst,
org.json.JSONObject query,
java.lang.Double maxItems)
Service Category: Alerts
Service Description: Query the alert history.
|
InfoTable |
QueryAlertSummary(org.json.JSONObject query,
java.lang.Boolean onlyAcknowledged,
java.lang.Boolean onlyUnacknowledged,
java.lang.Double maxItems)
Service Category: Alerts
Service Description: Query the alert summary.
|
InfoTable |
QueryBooleanPropertyHistory(java.lang.Double maxItems,
java.lang.String propertyName,
org.joda.time.DateTime startDate,
org.joda.time.DateTime endDate,
java.lang.Boolean oldestFirst,
org.json.JSONObject query)
Service Category: Queries
Service Description: Query stream entries, along with filter and sort criteria.
|
InfoTable |
QueryDateTimePropertyHistory(java.lang.Double maxItems,
java.lang.String propertyName,
org.joda.time.DateTime startDate,
org.joda.time.DateTime endDate,
java.lang.Boolean oldestFirst,
org.json.JSONObject query)
Service Category: Queries
Service Description: Query stream entries, along with filter and sort criteria.
|
InfoTable |
QueryImagePropertyHistory(java.lang.Double maxItems,
java.lang.String propertyName,
org.joda.time.DateTime startDate,
org.joda.time.DateTime endDate,
java.lang.Boolean oldestFirst,
org.json.JSONObject query)
Service Category: Queries
Service Description: Query stream entries, along with filter and sort criteria.
|
InfoTable |
QueryInfoTablePropertyHistory(java.lang.Double maxItems,
java.lang.String propertyName,
org.joda.time.DateTime startDate,
org.joda.time.DateTime endDate,
java.lang.Boolean oldestFirst,
org.json.JSONObject query,
java.lang.Boolean flatten)
Service Category: Queries
Service Description: Query stream entries, along with filter and sort criteria.
|
InfoTable |
QueryIntegerPropertyHistory(java.lang.Double maxItems,
java.lang.String propertyName,
org.joda.time.DateTime startDate,
org.joda.time.DateTime endDate,
java.lang.Boolean oldestFirst,
org.json.JSONObject query)
Service Category: Queries
Service Description: Query stream entries, along with filter and sort criteria.
|
InfoTable |
QueryLocationPropertyHistory(java.lang.Double maxItems,
java.lang.String propertyName,
org.joda.time.DateTime startDate,
org.joda.time.DateTime endDate,
java.lang.Boolean oldestFirst,
org.json.JSONObject query)
Service Category: Queries
Service Description: Query stream entries, along with filter and sort criteria.
|
InfoTable |
QueryLongPropertyHistory(java.lang.Double maxItems,
java.lang.String propertyName,
org.joda.time.DateTime startDate,
org.joda.time.DateTime endDate,
java.lang.Boolean oldestFirst,
org.json.JSONObject query)
Service Category: Queries
Service Description: Query stream entries, along with filter and sort criteria.
|
InfoTable |
QueryNamedPropertyHistory(InfoTable propertyNames,
java.lang.Double maxItems,
org.joda.time.DateTime startDate,
org.joda.time.DateTime endDate,
java.lang.Boolean oldestFirst,
org.json.JSONObject query)
Service Category: Queries
Service Description: Query stream entries (without data), along with filter and sort criteria.
|
InfoTable |
QueryNumberPropertyHistory(java.lang.Double maxItems,
java.lang.String propertyName,
org.joda.time.DateTime startDate,
org.joda.time.DateTime endDate,
java.lang.Boolean oldestFirst,
org.json.JSONObject query)
Service Category: Queries
Service Description: Query stream entries, along with filter and sort criteria.
|
InfoTable |
QueryPropertyHistory(java.lang.Double maxItems,
org.joda.time.DateTime startDate,
org.joda.time.DateTime endDate,
java.lang.Boolean oldestFirst,
org.json.JSONObject query)
Service Category: Queries
Service Description: Query stream entries (without data), along with filter and sort criteria.
|
InfoTable |
QueryStringPropertyHistory(java.lang.Double maxItems,
java.lang.String propertyName,
org.joda.time.DateTime startDate,
org.joda.time.DateTime endDate,
java.lang.Boolean oldestFirst,
org.json.JSONObject query)
Service Category: Queries
Service Description: Query stream entries, along with filter and sort criteria.
|
InfoTable |
QueryThingCodePropertyHistory(java.lang.Double maxItems,
java.lang.String propertyName,
org.joda.time.DateTime startDate,
org.joda.time.DateTime endDate,
java.lang.Boolean oldestFirst,
org.json.JSONObject query)
Service Category: Queries
Service Description: Query stream entries, along with filter and sort criteria.
|
InfoTable |
QueryVec2PropertyHistory(java.lang.Double maxItems,
java.lang.String propertyName,
org.joda.time.DateTime startDate,
org.joda.time.DateTime endDate,
java.lang.Boolean oldestFirst,
org.json.JSONObject query)
Service Category: Queries
Service Description: Query stream entries, along with filter and sort criteria.
|
InfoTable |
QueryVec3PropertyHistory(java.lang.Double maxItems,
java.lang.String propertyName,
org.joda.time.DateTime startDate,
org.joda.time.DateTime endDate,
java.lang.Boolean oldestFirst,
org.json.JSONObject query)
Service Category: Queries
Service Description: Query stream entries, along with filter and sort criteria.
|
InfoTable |
QueryVec4PropertyHistory(java.lang.Double maxItems,
java.lang.String propertyName,
org.joda.time.DateTime startDate,
org.joda.time.DateTime endDate,
java.lang.Boolean oldestFirst,
org.json.JSONObject query)
Service Category: Queries
Service Description: Query stream entries, along with filter and sort criteria.
|
void |
RemoveAlert(java.lang.String property,
java.lang.String alertName,
java.lang.Boolean persistent)
Service Category: Alerts
Service Description: Remove an alert for a property.
|
void |
RemoveDynamicSubscription(java.lang.String thingName,
java.lang.String eventName,
java.lang.String propertyName,
java.lang.String serviceName)
Service Category: Subscriptions
Service Description: Remove a dynamic subscription.
|
void |
RemoveEventDefinition(java.lang.String name)
Service Category: Metadata
Service Description: Remove a event definition.
|
void |
RemoveLocalPropertyBinding(java.lang.String propertyName)
Service Category: Bindings
Service Description: Remove the local property binding for a property.
|
void |
RemovePropertyDefinition(java.lang.String name)
Service Category: Metadata
Service Description: Remove a property definition.
|
void |
RemoveRemoteEventBinding(java.lang.String eventName)
Service Category: Bindings
Service Description: Remove the remote event binding for a event.
|
void |
RemoveRemotePropertyBinding(java.lang.String propertyName)
Service Category: Bindings
Service Description: Remove the remote property binding for a property.
|
void |
RemoveRemoteServiceBinding(java.lang.String serviceName)
Service Category: Bindings
Service Description: Remove the remote service binding for a service.
|
void |
RemoveServiceDefinition(java.lang.String name)
Service Category: Metadata
Service Description: Remove a service definition.
|
void |
RestartThing()
Service Category: Lifecycle
Service Description: Restart this thing.
|
void |
SetBooleanAlertParameter(java.lang.String property,
java.lang.String alertName,
java.lang.String parameterName,
java.lang.Boolean value,
java.lang.Boolean persistent)
Service Category: Alerts
Service Description: Set a boolean alert parameter.
|
void |
SetDateTimeAlertParameter(java.lang.String property,
java.lang.String alertName,
java.lang.String parameterName,
org.joda.time.DateTime value,
java.lang.Boolean persistent)
Service Category: Alerts
Service Description: Set a date alert parameter.
|
void |
SetDescription(java.lang.String description)
Service Category: Metadata
Service Description: Overwrite/set the description for an entity.
|
void |
SetIdentifier(java.lang.String identifier)
Service Category: Identifier
Service Description: Set the identifier for a thing.
|
void |
SetIntegerAlertParameter(java.lang.String property,
java.lang.String alertName,
java.lang.String parameterName,
java.lang.Integer value,
java.lang.Boolean persistent)
Service Category: Alerts
Service Description: Set a numeric alert parameter.
|
void |
SetLocalPropertyBinding(java.lang.String propertyName,
java.lang.String sourceThingName,
java.lang.String sourcePropertyName)
Deprecated.
As of release 8.1.0, replaced by
SetLocalPropertyBinding(String, String, String, JSONObject) |
void |
SetLocalPropertyBinding(java.lang.String propertyName,
java.lang.String sourceThingName,
java.lang.String sourcePropertyName,
org.json.JSONObject aspects)
Service Category: Bindings
Service Description: Set the property binding for a property.
|
void |
SetLocationAlertParameter(java.lang.String property,
java.lang.String alertName,
java.lang.String parameterName,
Location value,
java.lang.Boolean persistent)
Service Category: Alerts
Service Description: Set a location alert parameter.
|
void |
SetNumberAlertParameter(java.lang.String property,
java.lang.String alertName,
java.lang.String parameterName,
java.lang.Double value,
java.lang.Boolean persistent)
Service Category: Alerts
Service Description: Set a numeric alert parameter.
|
void |
SetPropertyLogging(java.lang.String propertyName,
java.lang.Boolean enabled)
Service Category: DataLogging
Service Description: Set property logging status for a specific property.
|
void |
setPropertyValue(java.lang.String propertyName,
IPrimitiveType newValue) |
void |
SetPropertyValues(InfoTable values)
Service Category: Properties
Service Description: Get a subset of the current property values for this thing.
|
QueuedEvent |
setPropertyVTQ(java.lang.String propertyName,
VTQ newValue,
boolean withUpdate) |
QueuedEvent |
setPropertyVTQ(java.lang.String propertyName,
VTQ newValue,
boolean deferNotifications,
boolean bypassReadOnly,
boolean bypassHooksAndBindings) |
void |
SetPublished(java.lang.Boolean publish)
Service Category: Federation
Service Description: Set this as a published thing for federation.
|
void |
SetRemoteEventBinding(java.lang.String eventName,
java.lang.String sourceEventName)
Service Category: Bindings
Service Description: Set the remote event binding for a event.
|
void |
SetRemotePropertyBinding(java.lang.String propertyName,
java.lang.String sourcePropertyName,
java.lang.Integer timeout,
java.lang.String pushType,
java.lang.Double pushThreshold)
Deprecated.
As of release 8.0.0, replaced by
SetRemotePropertyBinding(String, String, Integer, String, Double, JSONObject, Integer, String) |
void |
SetRemotePropertyBinding(java.lang.String propertyName,
java.lang.String sourcePropertyName,
java.lang.Integer timeout,
java.lang.String pushType,
java.lang.Double pushThreshold,
org.json.JSONObject aspects,
java.lang.Integer cacheTime,
java.lang.String foldType)
Service Category: Bindings
Service Description: Set the remote property binding for a property.
|
void |
SetRemoteServiceBinding(java.lang.String serviceName,
java.lang.String sourceServiceName,
java.lang.Integer timeout)
Service Category: Bindings
Service Description: Set the remote service binding for a service.
|
void |
SetStringAlertParameter(java.lang.String property,
java.lang.String alertName,
java.lang.String parameterName,
java.lang.String value,
java.lang.Boolean persistent)
Service Category: Alerts
Service Description: Set a string alert parameter.
|
void |
SetTags(TagCollection tags)
Service Category: Metadata
Service Description: Overwrite/set the tags for an entity.
|
void |
setThingTemplateName(java.lang.String value) |
void |
SetUnitsForNumericPropertyDefinition(java.lang.String propertyName,
java.lang.String units)
Service Category: Metadata
Service Description: Set the additional information for units for a specific Long, Integer, or Number property.
|
void |
SetValueStream(java.lang.String name)
Service Category: DataLogging
Service Description: Set the value stream for a thing.
|
protected void |
startThing()
|
protected void |
startThing(PatchType patchType) |
protected void |
stopThing()
|
void |
UpdatePropertyValues(InfoTable values)
Service Category: Properties
Service Description: Write property values for a thing.
|
void |
validateConfiguration(ImportedEntityCollection importedEntities)
|
void |
WritePropertiesToStream(java.lang.String name,
TagCollection tags)
Service Category: Data
Service Description: Store properties of this thing to a stream.
|
AddConfigurationTableDefinition, addDesignTimePermission, AddDesignTimePermission, addRunTimePermission, AddRunTimePermission, addVisibilityPermission, AddVisibilityPermission, CheckDesignTimePermission, CheckDesignTimePermissionForGroup, CheckDesignTimePermissionForUser, CheckPermission, CheckPermissionForGroup, CheckPermissionForUser, cleanupEntity, cleanupEntity, DeleteAllConfigurationTableRows, DeleteConfigurationTable, DeleteConfigurationTableRows, deleteDesignTimePermission, DeleteDesignTimePermission, deleteRunTimePermission, DeleteRunTimePermission, deleteVisibilityPermission, DeleteVisibilityPermission, getAspects, getAvatarContent, GetAvatarURL, GetConfigurationChangeHistory, getConfigurationSetting, getConfigurationTable, GetConfigurationTable, GetConfigurationTableDefinition, GetConfigurationTableRow, GetConfigurationTables, GetDescription, getDesignTimePermissions, GetDesignTimePermissions, GetDesignTimePermissionsAsJSON, getDocumentationContent, getEntityTypeAsString, GetEventDefinition, GetEventDefinitions, GetIncomingDependencies, GetIncomingDependenciesAsNetwork, GetInstanceMetadataAsJSON, GetInstanceMetadataWithPermissionsAsJSON, GetLastModifiedDate, GetMetadata, GetMetadataAsJSON, GetMetadataWithPermissionsAsJSON, GetOutgoingDependencies, GetOutgoingDependenciesAsNetwork, getOwner, GetPermissionsForCurrentUser, GetPermissionsForGroup, GetPermissionsForUser, GetProjectName, GetPropertyDefinition, GetPropertyDefinitions, getRunTimePermissions, GetRunTimePermissions, GetRunTimePermissionsAsJSON, GetServiceDefinition, GetServiceDefinitions, getStringConfigurationSetting, getStringConfigurationSettingWithDefault, GetSummaryInformation, getTags, GetTags, GetTagsAsInfoTable, getVisibilityPermissions, GetVisibilityPermissions, GetVisibilityPermissionsAsJSON, HasIncomingDependencies, HasOutgoingDependencies, isEditable, isEditableExtensionObject, isEditableSystemObject, isExtensionObject, IsMultiRowTable, isOwner, isSystemObject, isThemeObject, isVisible, isVisible, persistDesignTimePermissions, persistRunTimePermissions, persistVisibilityPermissions, preInitializeEntity, RemoveTags, SaveConfigurationTables, SetAvatar, setConfigurationSetting, SetConfigurationTable, SetConfigurationTableRows, setDesignTimePermissions, SetDesignTimePermissionsAsJSON, setDocumentationContent, setExtensionObject, SetHomeMashup, setLastModifiedDate, SetMultiRowConfigurationTable, setOwner, SetOwner, SetProjectName, setRunTimePermissions, SetRunTimePermissionsAsJSON, setStringConfigurationSetting, setVisibilityPermissions, SetVisibilityPermissionsAsJSON, toJSON, toJSONDefinition
getID, hasID, isTransient
getDescription, getName, setDescription, setName, toValueCollection
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getName
getID, hasID
getDescription
getID, getName
public static final java.lang.String DATASHAPE_INCOMING_LOCAL_PROPERTY_BINDING
public static final java.lang.String ENTITYLIST_SHAPE
public static final java.lang.String GENERIC_THING_TEMPLATE
public static final java.lang.String TYPE_THING
public static final java.lang.String DEFAULT_SETTINGS_TABLE
public static org.slf4j.Logger _logger
@ThingworxExtensionApiMethod(since={6,6}) public Thing()
@ThingworxExtensionApiMethod(since={6,6}) public RelationshipTypes.ThingworxRelationshipTypes getEntityType()
RootEntity
Returns the type of this entity.
getEntityType
in interface IShapeProvider
getEntityType
in class RootEntity
@ThingworxExtensionApiMethod(since={6,6}, canOverride=true, requiresSuper=true) public void initializeEntity() throws java.lang.Exception
RootEntity
Initializes the internal state of the entity. This method may be called more than once on the same entity during initialization.
All metadata, including aspects and configuration tables, are available at this point in the lifecycle.
initializeEntity
in class RootEntity
java.lang.Exception
- If an error occurs@ThingworxExtensionApiMethod(since={6,6}, canOverride=true, requiresSuper=true) public EntityReferenceTypeMap getDependencies()
Returns a map containing references to all entities that the Thing is dependent on.
@ThingworxExtensionApiMethod(since={6,6}) public boolean isRunning()
Returns true
when the thing has completed starting up and has not yet been cleaned up.
true
if the thing is active and has not yet been stopped@ThingworxExtensionApiMethod(since={6,6}) public ThingState getState()
Returns the current state of the thing.
@ThingworxExtensionApiMethod(since={6,6}, canOverride=true, requiresSuper=true) public void dispose() throws java.lang.Exception
RootEntity
Removes any remaining references of this entity and disposes any resources that were not cleaned up earlier in the lifecycle. This method is only invoked when the entity is in the process of deletion.
dispose
in class RootEntity
java.lang.Exception
- If an error occurs
@ThingworxExtensionApiMethod(since={6,6}, canOverride=true) protected void startThing() throws java.lang.Exception
A startup hook for subclasses of Thing
.
java.lang.Exception
- if an error occurs during thing startup@ThingworxExtensionApiMethod(since={9,0}, canOverride=true) protected void startThing(PatchType patchType) throws java.lang.Exception
java.lang.Exception
- If an error occurs@ThingworxExtensionApiMethod(since={6,6}, canOverride=true) protected void stopThing() throws java.lang.Exception
A shutdown hook for subclasses of Thing
.
java.lang.Exception
- if an error occurs during thing shutdown@ThingworxExtensionApiMethod(since={6,6}, canOverride=true) protected void initializeThing() throws java.lang.Exception
An initialization hook for subclasses of Thing
. Some resources of Thing
may not be available at this point in the
lifecycle.
java.lang.Exception
- if an error occurs during thing initialization@ThingworxExtensionApiMethod(since={9,0}, canOverride=true) protected void initializeThing(PatchType patchType) throws java.lang.Exception
java.lang.Exception
- If an error occurs@ThingworxExtensionApiMethod(since={6,6}, canOverride=true, deprecatedSince={9,0}) protected void cleanupThing() throws java.lang.Exception
A teardown hook for subclasses of Thing
. This method will be called whenever the thing is deactivated.
This method is not invoked if the thing has been disabled.
java.lang.Exception
- if an error occurs during thing teardown@ThingworxExtensionApiMethod(since={9,0}, canOverride=true) protected void cleanupThing(PatchType patchType) throws java.lang.Exception
A teardown hook with model synchronization patch operation for subclasses of Thing
. This method will be called whenever the
thing is deactivated.
This method is not invoked if the thing has been disabled.
patchType
- model synchronization patch operationjava.lang.Exception
- if an error occurs during thing teardown@ThingworxExtensionApiMethod(since={6,6}, canOverride=true) protected void preprocessSetPropertyVTQ(ThingProperty property, VTQ newValue, boolean withUpdate) throws java.lang.Exception
A property validation hook for subclasses of Thing
. This method will execute whenever the value of a property is modified.
property
- the property being modifiednewValue
- the new value being assigned to the propertywithUpdate
- has no current functionjava.lang.Exception
- if property validation fails against the new value@ThingworxExtensionApiMethod(since={6,6}, canOverride=true) protected void processStartNotification()
A post-startup hook for subclasses of Thing
. This method executes when the thing has fully activated and all resources made
available.
@ThingworxExtensionApiMethod(since={9,0}, canOverride=true) protected void processStartNotification(PatchType patchType)
@ThingworxExtensionApiMethod(since={6,6}) public ThingShapeInstance getInstanceShape()
Returns the thing shape describing the current thing. The thing shape instance contains only the resources that belong exclusively to this thing (i.e., not inherited from a thing template or shape).
The thing shape instance is not fully initialized until the "start" step of the lifecycle.
getInstanceShape
in interface IShapeProvider
@ThingworxExtensionApiMethod(since={6,6}) public java.lang.String getThingTemplateName()
@ThingworxExtensionApiMethod(since={6,6}) public void setThingTemplateName(java.lang.String value)
@ThingworxExtensionApiMethod(since={6,6}) public boolean isPublished()
@ThingworxExtensionApiMethod(since={6,6}) public EntityReferenceCollection getAllImplementedThingShapes()
Returns all thing shapes implemented by this thing. This includes thing shapes applied via inheritance.
This method may be used at the "initialize thing" step of the lifecycle or later.
@ThingworxExtensionApiMethod(since={6,6}) public boolean implementsShape(java.lang.String thingShape)
Returns true
if the specified thing shape is implemented by this thing. This includes thing shapes applied via inheritance.
This method may be used at the "initialize thing" step of the lifecycle or later.
thingShape
- the name of the thing shape to test fortrue
if the thing implements the specified shape@ThingworxExtensionApiMethod(since={6,6}) public EntityReferenceCollection getAllImplementedThingTemplates()
Returns all thing templates inherited by this thing.
This method may be used at the "initialize thing" step of the lifecycle or later.
@ThingworxExtensionApiMethod(since={6,6}) public boolean implementsTemplate(java.lang.String thingTemplate)
Returns true
if the specified thing template is a member of of the thing's inheritance chain.
This method may be used at the "initialize thing" step of the lifecycle or later.
thingTemplate
- the name of the thing template to test fortrue
if the thing inherits the specified template@ThingworxExtensionApiMethod(since={6,6}) public java.util.HashSet<java.lang.String> getImplementedThingTemplates()
Returns a set containing the names of all thing templates the thing inherits from.
@ThingworxExtensionApiMethod(since={6,6}) public boolean isSubscribed(java.lang.String eventName)
Returns true
if the specified event has been subscribed to.
This method may be used at the "notification" step of the lifecycle or later.
eventName
- the name of the eventtrue
if any subscriptions exist@Deprecated @ThingworxExtensionApiMethod(since={6,6}, deprecatedSince={7,4}) public boolean isLocallySubscribed(java.lang.String eventName)
isSubscribed(String)
instead.
Returns true
if the specified event has been subscribed to within the thing.
This method may be used at the "notification" step of the lifecycle or later.
eventName
- the name of the eventtrue
if any subscriptions exist within this thing@Deprecated @ThingworxExtensionApiMethod(since={6,6}, deprecatedSince={7,4}) public boolean isExternallySubscribed(java.lang.String eventName)
isSubscribed(String)
instead.
Returns true
if the specified event has been subscribed to by an external entity.
This method may be used at the "notification" step of the lifecycle or later.
eventName
- the name of the eventtrue
if any subscriptions exist on an external entity@ThingworxExtensionApiMethod(since={6,6}) public java.lang.String getEffectiveIdentifier()
@ThingworxExtensionApiMethod(since={6,6}) public java.lang.String getIdentifier()
@ThingworxExtensionApiMethod(since={6,6}) public java.lang.String getValueStreamName()
Returns the name of the value stream assigned to this thing, if any.
It is recommended to use the method getEffectiveValueStreamName()
instead, as it will account for value streams attached to
inherited thing templates.
@ThingworxExtensionApiMethod(since={6,6}) public static boolean isBuiltInProperty(java.lang.String name)
@ThingworxExtensionApiMethod(since={6,6}) public static boolean isBuiltInEvent(java.lang.String name)
@ThingworxExtensionApiMethod(since={6,6}) public boolean isPropertyEvent(java.lang.String eventName)
Returns true
if the named event exists and binds to a property.
eventName
- The name of the eventtrue
if the event binds to a property@ThingworxExtensionApiMethod(since={6,6}) public boolean hasPropertyDefinition(java.lang.String name)
@ThingworxExtensionApiMethod(since={6,6}) public boolean hasServiceDefinition(java.lang.String name)
@ThingworxExtensionApiMethod(since={6,6}) public boolean hasEventDefinition(java.lang.String name)
@ThingworxExtensionApiMethod(since={6,6}) public boolean hasLocalPropertyDefinition(java.lang.String name)
@ThingworxExtensionApiMethod(since={6,6}) public boolean hasLocalServiceDefinition(java.lang.String name)
@ThingworxExtensionApiMethod(since={6,6}) public boolean hasLocalEventDefinition(java.lang.String name)
@ThingworxExtensionApiMethod(since={6,6}) public PropertyDefinition getEffectivePropertyDefinition(java.lang.String name)
Returns the named property definition belonging to the current thing.
This method may be used at the "thing initialization" step of the lifecycle or later.
getEffectivePropertyDefinition
in interface IAlertProvider
name
- The name of the property definition.null
@ThingworxExtensionApiMethod(since={6,6}) public PropertyDefinition getInstancePropertyDefinition(java.lang.String name)
Returns the named property definition. The property definition may belong to the thing itself or from an inherited template or implemented shape.
This method may be used at the "thing initialization" step of the lifecycle or later.
getInstancePropertyDefinition
in interface IPropertyProvider
name
- The name of the property definition.null
@ThingworxExtensionApiMethod(since={6,6}) public PropertyDefinitionCollection getInstancePropertyDefinitions()
Returns a collection containing property definitions for all properties that are applicable to this thing.
getInstancePropertyDefinitions
in interface IPropertyProvider
PropertyDefinition
@ThingworxExtensionApiMethod(since={6,6}) public ServiceDefinition getInstanceServiceDefinition(java.lang.String name)
Returns the named service definition. The service definition may belong to the thing itself or from an inherited template or implemented shape.
This method may be used at the "thing initialization" step of the lifecycle or later.
getInstanceServiceDefinition
in interface IServiceProvider
name
- The name of the service definition.null
@ThingworxExtensionApiMethod(since={6,6}) public ServiceDefinition getEffectiveServiceDefinition(java.lang.String serviceName)
Returns the named service definition belonging to the current thing.
This method may be used at the "thing initialization" step of the lifecycle or later.
getEffectiveServiceDefinition
in interface IServiceMetadataProvider
serviceName
- The name of the service definition.null
@ThingworxExtensionApiMethod(since={6,6}) public EventDefinition getEffectiveEventDefinition(java.lang.String name)
Returns the named event definition belonging to the current thing.
This method may be used at the "thing initialization" step of the lifecycle or later.
getEffectiveEventDefinition
in interface IEventMetadataProvider
name
- The name of the event definition.null
@ThingworxExtensionApiMethod(since={6,6}) public EventDefinition getInstanceEventDefinition(java.lang.String name)
Returns the named event definition. The event definition may belong to the thing itself or from an inherited template or implemented shape.
This method may be used at the "thing initialization" step of the lifecycle or later.
getInstanceEventDefinition
in interface IEventProvider
name
- The name of the property definition.null
@ThingworxExtensionApiMethod(since={6,6}) public ServiceDefinitionCollection getInstanceServiceDefinitions()
Returns a collection containing service definitions for all services that are applicable to this thing.
getInstanceServiceDefinitions
in interface IServiceProvider
ServiceDefinition
@ThingworxExtensionApiMethod(since={6,6}) public ServiceDefinitionCollection getInstancePublicServiceDefinitions()
Returns a collection containing service definitions for all services that are applicable to this thing and are publicly exposed.
getInstancePublicServiceDefinitions
in interface IServiceProvider
ServiceDefinition
@ThingworxExtensionApiMethod(since={6,6}) public EventDefinitionCollection getInstanceEventDefinitions()
Returns a collection containing event definitions for all events that are applicable to this thing.
getInstanceEventDefinitions
in interface IEventProvider
EventDefinition
@ThingworxExtensionApiMethod(since={6,6}) public SubscriptionCollection getInstanceSubscriptions()
Returns a collection containing all subscriptions that are applicable to this thing including it's inherited subscriptions.
This method may be used at the "start" step of the lifecycle or later.
Subscription
@ThingworxExtensionApiMethod(since={6,6}) public boolean isPropertyRemote(PropertyDefinition propertyDefinition)
Returns true
if the property definition provided defines a remote property, or if the property is registered as remote
according to the current thing.
This method may be used at the "start" step of the lifecycle or later.
propertyDefinition
- the definition of the property to test againsttrue
if the definition provided defines a remote property or if the property is remote according to the current thing@ThingworxExtensionApiMethod(since={6,6}) public boolean isServiceRemote(ServiceDefinition serviceDefinition)
Returns true
if the service definition provided defines a remote service, or if the service is registered as remote according
to the current thing.
This method may be used at the "start" step of the lifecycle or later.
serviceDefinition
- the definition of the service to test againsttrue
if the definition provided defines a remote service or if the service is remote according to the current thing@ThingworxExtensionApiMethod(since={6,6}) public boolean isEventRemote(EventDefinition eventDefinition)
Returns true
if the event definition provided defines a remote event, or if the event is registered as remote according to
the current thing.
This method may be used at the "start" step of the lifecycle or later.
eventDefinition
- the definition of the event to test againsttrue
if the definition provided defines a remote event or if the event is remote according to the current thing@ThingworxExtensionApiMethod(since={6,6}) public LocalPropertyBindingCollection getEffectiveLocalPropertyBindings()
@ThingworxExtensionApiMethod(since={6,6}) public RemotePropertyBindingCollection getEffectiveRemotePropertyBindings()
@ThingworxExtensionApiMethod(since={6,6}) public RemoteEventBindingCollection getEffectiveRemoteEventBindings()
@ThingworxExtensionApiMethod(since={6,6}) public RemoteServiceBindingCollection getEffectiveRemoteServiceBindings()
@ThingworxExtensionApiMethod(since={6,6}) public java.lang.String getEffectiveValueStreamName()
Returns the name of the value stream effectively assigned to this thing, taking into account the thing template hierarchy.
@ThingworxExtensionApiMethod(since={6,6}, canOverride=true, requiresSuper=true) public void validateConfiguration(ImportedEntityCollection importedEntities) throws java.lang.Exception
Validates the configuration of the thing during the import process. This method is called whenever a thing is created or modified via
the REST APIs. During the validation step, there may be other associated entities (including thing shapes and templates) that are
being imported. These can be accessed via the importedEntities
collection if needed.
Note that some resources belonging to the thing or other associated entities may not be available during this step in the lifecycle.
It is required for all subclasses of Thing
to call super.validateConfiguration(importedEntities)
if they override
this method.
validateConfiguration
in class RootEntity
importedEntities
- - a typed collection of entities currently being importedjava.lang.Exception
- if the thing is invalid@ThingworxExtensionApiMethod(since={6,6}) public ThingTemplate getThingTemplate()
Returns the base thing template assigned to this thing.
@ThingworxExtensionApiMethod(since={6,6}) public boolean isEnabled()
Returns true
if the current thing is enabled. An enabled thing can be started and federated.
true
if the current thing is enabled@ThingworxExtensionApiMethod(since={6,6}) public ThingPropertyCollection getProperties()
Returns a collection containing the property instances belonging to this thing.
This method may be used at the "thing initialization" step of the lifecycle or later.
ThingProperty
@ThingworxExtensionApiMethod(since={6,6}) public ThingProperty addProperty(PropertyDefinition propertyDefinition) throws java.lang.Exception
Adds the provided property definition to this thing. An instance of the property will automatically be generated and assigned the default value.
This method may be used at the "thing initialization" step of the lifecycle or later.
propertyDefinition
- the property definition to apply to this thingjava.lang.Exception
- if an error occurs@ThingworxExtensionApiMethod(since={6,6}) public boolean isLocalProperty(java.lang.String property)
Returns true
if the specified property is defined by this thing.
property
- the name of the propertytrue
if the named property is a local member of this thing@ThingworxExtensionApiMethod(since={6,6}) public ThingProperty getProperty(java.lang.String propertyName) throws java.lang.Exception
Returns the named property instance. This method performs a run-time authorization check against the current security context.
This method may be used at the "thing initialization" step of the lifecycle or later.
propertyName
- the name of the property to retrievejava.lang.Exception
- if an error occurs or authorization is denied@ThingworxExtensionApiMethod(since={6,6}) public IPrimitiveType getPropertyValue(java.lang.String propertyName) throws java.lang.Exception
Returns the current value assigned to the named property. This method performs a run-time authorization check against the current security context.
This method may be used at the "thing initialization" step of the lifecycle or later.
getPropertyValue
in interface IPropertyProvider
propertyName
- the name of the propertyjava.lang.Exception
- if an error occurs or authorization is denied@ThingworxExtensionApiMethod(since={6,6}) public IPrimitiveType getPropertyValue(ThingProperty property) throws java.lang.Exception
Returns the current value assigned to the provided property instance. This method performs a run-time authorization check against the current security context.
This method may be used at the "thing initialization" step of the lifecycle or later.
property
- the propertyjava.lang.Exception
- if an error occurs or authorization is denied@ThingworxExtensionApiMethod(since={6,6}) public org.joda.time.DateTime getPropertyTime(java.lang.String propertyName)
Returns the modified time assigned to the named property. This method performs a run-time authorization check against the current security context.
This method may be used at the "thing initialization" step of the lifecycle or later.
propertyName
- the name of the property@ThingworxExtensionApiMethod(since={6,6}) public QualityStatus getPropertyQuality(java.lang.String propertyName)
Returns the current quality status assigned to the provided property instance. This method performs a run-time authorization check against the current security context.
This method may be used at the "thing initialization" step of the lifecycle or later.
propertyName
- the name of the propertyQualityStatus#UNKNOWN
if an error occurred@ThingworxExtensionApiMethod(since={6,6}) public boolean hasProperty(java.lang.String propertyName)
IPropertyProvider
true
if there exists a property with the specified name. Property names are case-sensitive.hasProperty
in interface IPropertyProvider
propertyName
- the property name to checktrue
if the specified property exists@ThingworxExtensionApiMethod(since={6,6}) public BaseTypes getPropertyType(java.lang.String propertyName)
IPropertyProvider
getPropertyType
in interface IPropertyProvider
propertyName
- the name of the propertyBaseTypes
entry corresponding to the property type@ThingworxExtensionApiMethod(since={6,6}, canOverride=true) public void checkDemandRead(ThingProperty property) throws java.lang.Exception
A property read hook for subclasses of Thing
. This method may be used to update the property on read if it uses a backing
cache or otherwise transform the property prior to read.
property
- the property that is being readjava.lang.Exception
- if the property cannot be read, or if an issue occurs@ThingworxExtensionApiMethod(since={6,6}) public void initializeProperty(java.lang.String propertyName, IPrimitiveType value) throws java.lang.Exception
Initializes the named property to the specified value. This method is intended for use by subclasses of Thing
during the
"thing initialization" step of the lifecycle to assign an initial value to a property managed by the subclass.
propertyName
- the name of the propertyvalue
- the value to assign to the propertyjava.lang.Exception
- If an error occurs@ThingworxExtensionApiMethod(since={6,6}) public void setPropertyValue(java.lang.String propertyName, IPrimitiveType newValue) throws java.lang.Exception
setPropertyValue
in interface IPropertyProvider
propertyName
- the name of the property that is being modifiednewValue
- the value to assign to the propertyjava.lang.Exception
- If an error occurs
Assigns the provided value to the specified property.
This method may be used at the "start" step of the lifecycle or later.
java.lang.Exception
- if either of the parameters are null, the user is unauthorized, or an error occurs when attempting to modify the
property@ThingworxExtensionApiMethod(since={6,6}) public QueuedEvent setPropertyVTQ(java.lang.String propertyName, VTQ newValue, boolean withUpdate) throws java.lang.Exception
java.lang.Exception
- If an error occurs@ThingworxExtensionApiMethod(since={6,6}) public QueuedEvent setPropertyVTQ(java.lang.String propertyName, VTQ newValue, boolean deferNotifications, boolean bypassReadOnly, boolean bypassHooksAndBindings) throws java.lang.Exception
java.lang.Exception
- If an error occurs@ThingworxExtensionApiMethod(since={6,6}) public ValueCollection getPropertyValues() throws java.lang.Exception
Returns a collection of mappings of property names and the current values of the properties. This method performs a runtime authorization check on each property to be read to ensure the current security context is authorized. Any properties that the current security context does not have access to will not be a member of the returned collection.
This method may be used at the "thing initialization" step of the lifecycle or later.
java.lang.Exception
- if an error occurred while reading a property, excepting an authorization failure@ThingworxExtensionApiMethod(since={6,6}) public InfoTable getPropertyValuesAsInfoTable() throws java.lang.Exception
IPropertyProvider
InfoTable
containing a list of the properties belonging to this instance and their
values.getPropertyValuesAsInfoTable
in interface IPropertyProvider
InfoTable
of property names and their associated valuesjava.lang.Exception
- If an error occurs@ThingworxExtensionApiMethod(since={6,6}) public AlertConfigurationCollection getAlertConfigurations()
Returns a collection of alert configurations belonging to the local properties of this thing.
getAlertConfigurations
in interface IAlertProvider
@ThingworxExtensionApiMethod(since={6,6}) public AlertConfigurationCollection getEffectiveAlertConfiguration()
Returns a collection of alert configurations associated to any of the properties applicable to this thing.
This method may be used at the "thing initialization" step of the lifecycle or later.
getEffectiveAlertConfiguration
in interface IAlertProvider
@ThingworxExtensionApiMethod(since={7,3}) public void acknowledgeAlertByPropertyAndName(java.lang.String propertyName, java.lang.String alertName, java.lang.String message) throws java.lang.Exception
java.lang.Exception
- If an error occurs@ThingworxExtensionApiMethod(since={6,6}) public void acknowledgeAlertByProperty(java.lang.String propertyName, java.lang.String message) throws java.lang.Exception
java.lang.Exception
- If an error occurs@ThingworxExtensionApiMethod(since={6,6}) public void acknowledgeAllAlerts(java.lang.String message)
@ThingworxExtensionApiMethod(since={6,6}) public AlertList getAlertsForProperty(java.lang.String propertyName)
propertyName
- name of the property on which the alert's defined@ThingworxExtensionApiMethod(since={6,6}) public AlertCollection getAlerts()
Returns a list of effective alerts on the properties associated with this thing.
This method may be used at the "start" step of the lifecycle or later.
@ThingworxExtensionApiMethod(since={6,6}) public boolean getPropertyAlertStatus(java.lang.String property)
@ThingworxExtensionApiMethod(since={6,6}) public boolean getPropertyAckStatus(java.lang.String property)
@ThingworxExtensionApiMethod(since={6,6}) public java.lang.String GetValueStream()
@ThingworxExtensionApiMethod(since={6,6}) public void SetValueStream(java.lang.String name) throws java.lang.Exception
name
- Value stream name - THINGNAMEjava.lang.Exception
- If an error occurs@ThingworxExtensionApiMethod(since={6,6}) public void DisableThing() throws java.lang.Exception
java.lang.Exception
- If an error occurs@ThingworxExtensionApiMethod(since={6,6}) public void EnableThing() throws java.lang.Exception
java.lang.Exception
- If an error occurs@ThingworxExtensionApiMethod(since={6,6}) public boolean IsEnabled() throws java.lang.Exception
java.lang.Exception
- If an error occurs@ThingworxExtensionApiMethod(since={6,6}) public void RestartThing() throws java.lang.Exception
java.lang.Exception
- If an error occurs@ThingworxExtensionApiMethod(since={6,6}) public java.lang.String GetIdentifier()
@ThingworxExtensionApiMethod(since={6,6}) public void SetIdentifier(java.lang.String identifier) throws java.lang.Exception
identifier
- Thing identifier for remote things - STRINGjava.lang.Exception
- If an error occurs@ThingworxExtensionApiMethod(since={6,6}) public InfoTable GetLocalPropertyBinding(java.lang.String propertyName) throws java.lang.Exception
propertyName
- Property name - STRINGjava.lang.Exception
- If an error occurs@ThingworxExtensionApiMethod(since={7,3}) public InfoTable GetEffectiveLocalPropertyBinding(java.lang.String propertyName) throws java.lang.Exception
propertyName
- : name of property to get the local bindingjava.lang.Exception
@ThingworxExtensionApiMethod(since={7,3}) public InfoTable GetEffectiveLocalPropertyBindings() throws java.lang.Exception
java.lang.Exception
@ThingworxExtensionApiMethod(since={8,0}) public InfoTable GetIncomingLocalPropertyBindings() throws java.lang.Exception
java.lang.Exception
@ThingworxExtensionApiMethod(since={8,0}) public InfoTable GetIncomingLocalPropertyBinding(java.lang.String propertyName) throws java.lang.Exception
propertyName
- : name of property for which incoming bindings are to be fetchedjava.lang.Exception
@ThingworxExtensionApiMethod(since={6,6}) public void RemoveLocalPropertyBinding(java.lang.String propertyName) throws java.lang.Exception
propertyName
- Property name - STRINGjava.lang.Exception
- If an error occurs@ThingworxExtensionApiMethod(since={6,6}, deprecatedSince={8,1,0}) @Deprecated public void SetLocalPropertyBinding(java.lang.String propertyName, java.lang.String sourceThingName, java.lang.String sourcePropertyName) throws java.lang.Exception
SetLocalPropertyBinding(String, String, String, JSONObject)
java.lang.Exception
- If an error occurs
@ThingworxExtensionApiMethod(since={8,1,0}) public void SetLocalPropertyBinding(java.lang.String propertyName, java.lang.String sourceThingName, java.lang.String sourcePropertyName, org.json.JSONObject aspects) throws java.lang.Exception
propertyName
- Property name - STRINGsourceThingName
- Thing name to bind to - STRINGsourcePropertyName
- Source property name - STRINGaspects
- Aspects for the local binding - JSONjava.lang.Exception
- If an error occurs@ThingworxExtensionApiMethod(since={6,6}) public InfoTable GetRemotePropertyBinding(java.lang.String propertyName) throws java.lang.Exception
propertyName
- Property name - STRINGjava.lang.Exception
- If an error occurs@ThingworxExtensionApiMethod(since={6,6}) public void RemoveRemotePropertyBinding(java.lang.String propertyName) throws java.lang.Exception
propertyName
- Property name - STRINGjava.lang.Exception
- If an error occurs@ThingworxExtensionApiMethod(since={6,6}, deprecatedSince={8,0,0}) @Deprecated public void SetRemotePropertyBinding(java.lang.String propertyName, java.lang.String sourcePropertyName, java.lang.Integer timeout, java.lang.String pushType, java.lang.Double pushThreshold) throws java.lang.Exception
SetRemotePropertyBinding(String, String, Integer, String, Double, JSONObject, Integer, String)
java.lang.Exception
- If an error occurs
@ThingworxExtensionApiMethod(since={8,0}) public void SetRemotePropertyBinding(java.lang.String propertyName, java.lang.String sourcePropertyName, java.lang.Integer timeout, java.lang.String pushType, java.lang.Double pushThreshold, org.json.JSONObject aspects, java.lang.Integer cacheTime, java.lang.String foldType) throws java.lang.Exception
propertyName
- Property name - STRINGsourcePropertyName
- Source property name - STRINGtimeout
- Request timeout - INTEGERpushType
- Push type - STRINGpushThreshold
- Push threshold - NUMBERaspects
- Aspects for the remote binding - JSONcacheTime
- Property's cache time value at the server in milliseconds - INTEGERfoldType
- How a remote property's value should be handled by the server when a connection is lost - STRINGjava.lang.Exception
- If an error occurs@ThingworxExtensionApiMethod(since={6,6}) public InfoTable GetRemoteServiceBinding(java.lang.String serviceName) throws java.lang.Exception
serviceName
- Service name - STRINGjava.lang.Exception
- If an error occurs@ThingworxExtensionApiMethod(since={6,6}) public void RemoveRemoteServiceBinding(java.lang.String serviceName) throws java.lang.Exception
serviceName
- Service name - STRINGjava.lang.Exception
- If an error occurs@ThingworxExtensionApiMethod(since={6,6}) public void SetRemoteServiceBinding(java.lang.String serviceName, java.lang.String sourceServiceName, java.lang.Integer timeout) throws java.lang.Exception
serviceName
- Service name - STRINGsourceServiceName
- Source service name - STRINGtimeout
- Request timeout - INTEGERjava.lang.Exception
- If an error occurs@ThingworxExtensionApiMethod(since={6,6}) public InfoTable GetRemoteEventBinding(java.lang.String eventName) throws java.lang.Exception
eventName
- Event name - STRINGjava.lang.Exception
- If an error occurs@ThingworxExtensionApiMethod(since={6,6}) public void RemoveRemoteEventBinding(java.lang.String eventName) throws java.lang.Exception
eventName
- Event name - STRINGjava.lang.Exception
- If an error occurs@ThingworxExtensionApiMethod(since={6,6}) public void SetRemoteEventBinding(java.lang.String eventName, java.lang.String sourceEventName) throws java.lang.Exception
eventName
- Event name - STRINGsourceEventName
- Source event name - STRINGjava.lang.Exception
- If an error occurs@ThingworxExtensionApiMethod(since={6,6}) public void UpdatePropertyValues(InfoTable values) throws java.lang.Exception
values
- Collection of properties to be updated - INFOTABLEjava.lang.Exception
- If an error occurs@ThingworxExtensionApiMethod(since={6,6}) public java.lang.String GetPropertyQuality(java.lang.String propertyName) throws java.lang.Exception
propertyName
- Property name - STRINGjava.lang.Exception
- If an error occurs@ThingworxExtensionApiMethod(since={6,6}) public org.joda.time.DateTime GetPropertyTime(java.lang.String propertyName) throws java.lang.Exception
propertyName
- Property name - STRINGjava.lang.Exception
- If an error occurs@ThingworxExtensionApiMethod(since={6,6}) public InfoTable GetLoggedProperties(java.lang.String type) throws java.lang.Exception
type
- Type to filter on - BASETYPENAMEjava.lang.Exception
- If an error occurs@ThingworxExtensionApiMethod(since={6,6}) public InfoTable GetNumericLoggedProperties() throws java.lang.Exception
java.lang.Exception
- If an error occurs@ThingworxExtensionApiMethod(since={6,6}) public java.lang.Double GetNumberPropertyValue(java.lang.String propertyName) throws java.lang.Exception
propertyName
- Property name - STRINGjava.lang.Exception
- If an error occurs@ThingworxExtensionApiMethod(since={6,6}) public java.lang.Integer GetIntegerPropertyValue(java.lang.String propertyName) throws java.lang.Exception
propertyName
- Property name - STRINGjava.lang.Exception
- If an error occurs@ThingworxExtensionApiMethod(since={6,6}) public java.lang.Long GetLongPropertyValue(java.lang.String propertyName) throws java.lang.Exception
propertyName
- Property name - STRINGjava.lang.Exception
- If an error occurs@ThingworxExtensionApiMethod(since={6,6}) public java.lang.Boolean GetBooleanPropertyValue(java.lang.String propertyName) throws java.lang.Exception
propertyName
- Property name - STRINGjava.lang.Exception
- If an error occurs@ThingworxExtensionApiMethod(since={6,6}) public Location GetLocationPropertyValue(java.lang.String propertyName) throws java.lang.Exception
propertyName
- Property name - STRINGjava.lang.Exception
- If an error occurs@ThingworxExtensionApiMethod(since={6,6}) public org.joda.time.DateTime GetDateTimePropertyValue(java.lang.String propertyName) throws java.lang.Exception
propertyName
- Property name - STRINGjava.lang.Exception
- If an error occurs@ThingworxExtensionApiMethod(since={6,6}) public java.lang.String GetStringPropertyValue(java.lang.String propertyName) throws java.lang.Exception
propertyName
- Property name - STRINGjava.lang.Exception
- If an error occurs@ThingworxExtensionApiMethod(since={7,1}) public Vec2 GetVec2PropertyValue(java.lang.String propertyName) throws java.lang.Exception
propertyName
- Property name - STRINGjava.lang.Exception
- If an error occurs@ThingworxExtensionApiMethod(since={7,1}) public Vec3 GetVec3PropertyValue(java.lang.String propertyName) throws java.lang.Exception
propertyName
- Property name - STRINGjava.lang.Exception
- If an error occurs@ThingworxExtensionApiMethod(since={7,1}) public Vec4 GetVec4PropertyValue(java.lang.String propertyName) throws java.lang.Exception
propertyName
- Property name - STRINGjava.lang.Exception
- If an error occurs@ThingworxExtensionApiMethod(since={7,1}) public ThingCode GetThingCodePropertyValue(java.lang.String propertyName) throws java.lang.Exception
propertyName
- Property name - STRINGjava.lang.Exception
- If an error occurs@ThingworxExtensionApiMethod(since={6,6}) public byte[] GetImagePropertyValue(java.lang.String propertyName) throws java.lang.Exception
propertyName
- Property name - STRINGjava.lang.Exception
- If an error occurs@ThingworxExtensionApiMethod(since={6,6}) public InfoTable GetPropertyValues() throws java.lang.Exception
java.lang.Exception
- If an error occurs@ThingworxExtensionApiMethod(since={6,6}) public InfoTable GetPropertyValuesAsMultiRowTable() throws java.lang.Exception
java.lang.Exception
- If an error occurs@ThingworxExtensionApiMethod(since={6,6}) public void SetPropertyValues(InfoTable values) throws java.lang.Exception
values
- Property values - INFOTABLEjava.lang.Exception
- If an error occurs@ThingworxExtensionApiMethod(since={6,6}) public InfoTable GetNamedPropertyValues(InfoTable propertyNames) throws java.lang.Exception
propertyNames
- Property names - INFOTABLEjava.lang.Exception
- If an error occurs@ThingworxExtensionApiMethod(since={6,6}) public InfoTable GetNamedProperties(org.json.JSONObject propertyNames) throws java.lang.Exception
propertyNames
- List of property names - JSONjava.lang.Exception
- If an error occurs@ThingworxExtensionApiMethod(since={6,6}) public InfoTable GetPropertyValuesVTQ() throws java.lang.Exception
java.lang.Exception
- If an error occurs@ThingworxExtensionApiMethod(since={6,6}) public InfoTable GetNamedPropertyValuesVTQ(InfoTable propertyNames) throws java.lang.Exception
propertyNames
- Property names - INFOTABLEjava.lang.Exception
- If an error occurs@ThingworxExtensionApiMethod(since={6,6}) public InfoTable GetPropertyValuesVTQA() throws java.lang.Exception
java.lang.Exception
- If an error occurs@ThingworxExtensionApiMethod(since={6,6}) public InfoTable GetNamedPropertyValuesVTQA(InfoTable propertyNames) throws java.lang.Exception
propertyNames
- Property names - INFOTABLEjava.lang.Exception
- If an error occurs@ThingworxExtensionApiMethod(since={6,6}) public InfoTable QueryAlertSummary(org.json.JSONObject query, java.lang.Boolean onlyAcknowledged, java.lang.Boolean onlyUnacknowledged, java.lang.Double maxItems) throws java.lang.Exception
query
- Query definition - QUERYonlyAcknowledged
- Show only acknowledged alerts - BOOLEANonlyUnacknowledged
- Show only unacknowledged alerts - BOOLEANmaxItems
- Maximum number of items to return - NUMBERjava.lang.Exception
- If an error occurs@ThingworxExtensionApiMethod(since={6,6}) public InfoTable QueryAlertHistory(org.joda.time.DateTime startDate, org.joda.time.DateTime endDate, java.lang.Boolean oldestFirst, org.json.JSONObject query, java.lang.Double maxItems) throws java.lang.Exception
startDate
- Start time - DATETIMEendDate
- End time - DATETIMEoldestFirst
- Search/sort from oldest to newest - BOOLEANquery
- Query definition - QUERYmaxItems
- Maximum number of items to return - NUMBERjava.lang.Exception
- If an error occurs@ThingworxExtensionApiMethod(since={6,6}) public void AcknowledgeAllAlerts(java.lang.String message) throws java.lang.Exception
message
- Message (optional) - STRINGjava.lang.Exception
- If an error occurs@ThingworxExtensionApiMethod(since={6,6}) public void AcknowledgeAlert(java.lang.String property, java.lang.String message) throws java.lang.Exception
property
- Property name - STRINGmessage
- Message (optional) - STRINGjava.lang.Exception
- If an error occurs
This service takes the name of the property and the message and throws an alert acknowledge event.
Acknowledges each alert on the property whether or not it's in an alert state.
@ThingworxExtensionApiMethod(since={6,6}) public InfoTable GetAlertSummary(java.lang.Boolean onlyAcknowledged, java.lang.Boolean onlyUnacknowledged, java.lang.Double maxItems) throws java.lang.Exception
onlyAcknowledged
- Show only acknowledged alerts - BOOLEANonlyUnacknowledged
- Show only unacknowledged alerts - BOOLEANmaxItems
- Maximum number of items to return - NUMBERjava.lang.Exception
- If an error occurs@ThingworxExtensionApiMethod(since={6,6}) public InfoTable GetAlertSummaryForProperty(java.lang.String property, java.lang.Boolean onlyAcknowledged, java.lang.Boolean onlyUnacknowledged, java.lang.Double maxItems) throws java.lang.Exception
property
- Property name - STRINGonlyAcknowledged
- Show only acknowledged alerts - BOOLEANonlyUnacknowledged
- Show only unacknowledged alerts - BOOLEANmaxItems
- Maximum number of items to return - NUMBERjava.lang.Exception
- If an error occurs@ThingworxExtensionApiMethod(since={6,6}) public void DisableAllAlerts(java.lang.Boolean persistent) throws java.lang.Exception
persistent
- Persist this change - BOOLEANjava.lang.Exception
- If an error occurs@ThingworxExtensionApiMethod(since={6,6}) public void EnableAllAlerts(java.lang.Boolean persistent) throws java.lang.Exception
persistent
- Persist this change - BOOLEANjava.lang.Exception
- If an error occurs@ThingworxExtensionApiMethod(since={6,6}) public void DisableAlertsForProperty(java.lang.String property, java.lang.String alertName, java.lang.Boolean persistent) throws java.lang.Exception
property
- Property name - STRINGalertName
- Alert name - STRINGpersistent
- Persist this change - BOOLEANjava.lang.Exception
- If an error occurs@ThingworxExtensionApiMethod(since={6,6}) public void EnableAlertsForProperty(java.lang.String property, java.lang.String alertName, java.lang.Boolean persistent) throws java.lang.Exception
property
- Property name - STRINGalertName
- Alert name - STRINGpersistent
- Persist this change - BOOLEANjava.lang.Exception
- If an error occurs@ThingworxExtensionApiMethod(since={6,6}) public AlertDefinition getEffectiveAlertDefinition(java.lang.String property, java.lang.String alertName)
@ThingworxExtensionApiMethod(since={6,6}) public java.lang.Boolean GetPropertyLogging(java.lang.String propertyName) throws java.lang.Exception
propertyName
- Property name - STRINGjava.lang.Exception
- If an error occurs@ThingworxExtensionApiMethod(since={6,6}) public void SetPropertyLogging(java.lang.String propertyName, java.lang.Boolean enabled) throws java.lang.Exception
propertyName
- Property name - STRINGenabled
- Enable/disable logging - BOOLEANjava.lang.Exception
- If an error occurs@ThingworxExtensionApiMethod(since={8,5}) public void SetUnitsForNumericPropertyDefinition(java.lang.String propertyName, java.lang.String units) throws java.lang.Exception
propertyName
- Property name - STRINGunits
- Units (eg. lbs, F, inches, etc.) associated with input. For information only. - STRINGjava.lang.Exception
- If an error occurs@ThingworxExtensionApiMethod(since={7,2,2}) public java.lang.Boolean GetEffectivePropertyLogging(java.lang.String propertyName) throws InvalidRequestException
propertyName
- Property name to look up on the effective shape for its logging status - STRINGInvalidRequestException
- If an error occurs@ThingworxExtensionApiMethod(since={6,6}, deprecatedSince={8,0}) @Deprecated public void AddPropertyDefinition(java.lang.String name, java.lang.String description, java.lang.String type, java.lang.String category, java.lang.String dataShape, java.lang.Boolean readOnly, java.lang.Boolean persistent, java.lang.Boolean logged, java.lang.String dataChangeType, java.lang.Double dataChangeThreshold, java.lang.Boolean remote, java.lang.String remotePropertyName, java.lang.Integer timeout, java.lang.String pushType, java.lang.Double pushThreshold, java.lang.String defaultValue) throws java.lang.Exception
java.lang.Exception
- If an error occurs
@ThingworxExtensionApiMethod(since={8,0}) public void AddPropertyDefinition(java.lang.String name, java.lang.String description, java.lang.String type, java.lang.String category, java.lang.String dataShape, java.lang.Boolean readOnly, java.lang.Boolean persistent, java.lang.Boolean logged, java.lang.String dataChangeType, java.lang.Double dataChangeThreshold, java.lang.Boolean remote, java.lang.String remotePropertyName, java.lang.Integer timeout, java.lang.String pushType, java.lang.Double pushThreshold, java.lang.String defaultValue, org.json.JSONObject remoteBindingAspects) throws java.lang.Exception
name
- Property name - STRINGdescription
- Property description - STRINGtype
- Data type - BASETYPENAMEcategory
- Category - STRINGdataShape
- Data shape - DATASHAPENAMEreadOnly
- Read only - BOOLEANpersistent
- Persist property value - BOOLEANlogged
- Log property value - BOOLEANdataChangeType
- Data change type - STRINGdataChangeThreshold
- Data change threshold - NUMBERremote
- Is a remote property - BOOLEANremotePropertyName
- Remote property name - STRINGtimeout
- Request timeout - INTEGERpushType
- Push type - STRINGpushThreshold
- Push threshold - NUMBERdefaultValue
- Default value for property - STRINGremoteBindingAspects
- Aspects for the remote binding - JSONjava.lang.Exception
- If an error occurs@ThingworxExtensionApiMethod(since={8,4}) public void AddPropertyTransformDefinition(java.lang.String name, java.lang.String description, java.lang.String category, java.lang.Boolean persistent, java.lang.Boolean logged, java.lang.Integer timeout, InfoTable propertyTransformConfig) throws java.lang.Exception
name
- - The name of your new derived property.description
- - The description of the new property.category
- - Category for the new property.persistent
- - Should the value of this derived property be persisted between tomcat restarts?logged
- - Should the value of this derived property be logged over time?timeout
- - Timeout for creating the property.propertyTransformConfig
- - A configuration infotable consisting of key/value pairs. Refer to the help center for possible keys.java.lang.Exception
- If an error occurs
Creates a derived property on this Thing. A derived property receives data from a specified source property, and performs some requested calculation on the stream of data as the source property changes. The type of calculation will determine which configuration keys/values need to be set on the derivedPropertyConfig.
Note: In order to use the derived property functionality, you must have a RabbitMQ instance, Flink cluster, and "derived property configuration service" running on your machine, as well as the necessary configuration set inside your platform-settings.json file.
For more information on running derived properties, please refer to the help center docs on derived properties.
@ThingworxExtensionApiMethod(since={7,3}) public InfoTable AddPropertyDefinitions(InfoTable values, java.lang.Boolean ignoreInvalidDefinitions) throws java.lang.Exception
values
- Infotable where each row defines a property, using the PropertyDefinitionWithDetails data shape - INFOTABLEignoreInvalidDefinitions
- True will skip over any invalid definitions provided, false indicates to fail the whole transaction when at least one invalid definition is found - BOOLEANjava.lang.Exception
- If an error occurs@ThingworxExtensionApiMethod(since={6,6}) public void AddServiceDefinition(java.lang.String name, java.lang.String description, java.lang.String category, InfoTable parameters, InfoTable resultType, java.lang.Boolean remote, java.lang.String remoteServiceName, java.lang.Integer timeout) throws java.lang.Exception
name
- Property name - STRINGdescription
- Property description - STRINGcategory
- Category - STRINGparameters
- Service parameters - INFOTABLEresultType
- Service result type - INFOTABLEremote
- Is a remote service - BOOLEANremoteServiceName
- Remote service name - STRINGtimeout
- Request timeout - INTEGERjava.lang.Exception
- If an error occurs@ThingworxExtensionApiMethod(since={6,6}) public void AddEventDefinition(java.lang.String name, java.lang.String description, java.lang.String category, java.lang.String dataShape, java.lang.Boolean remote, java.lang.String remoteEventName) throws java.lang.Exception
name
- Property name - STRINGdescription
- Property description - STRINGcategory
- Category - STRINGdataShape
- Data shape - DATASHAPENAMEremote
- Is a remote service - BOOLEANremoteEventName
- Remote event name - STRINGjava.lang.Exception
- If an error occurs@ThingworxExtensionApiMethod(since={6,6}) public void DisableSubscription(java.lang.String thingName, java.lang.String eventName, java.lang.String propertyName) throws java.lang.Exception
thingName
- Thing name - THINGNAMEeventName
- Event name - STRINGpropertyName
- Property name - STRINGjava.lang.Exception
- If an error occurs@ThingworxExtensionApiMethod(since={6,6}) public void EnableSubscription(java.lang.String thingName, java.lang.String eventName, java.lang.String propertyName) throws java.lang.Exception
thingName
- Thing name - THINGNAMEeventName
- Event name - STRINGpropertyName
- Property name - STRINGjava.lang.Exception
- If an error occurs@ThingworxExtensionApiMethod(since={6,6}) public void RemovePropertyDefinition(java.lang.String name) throws java.lang.Exception
name
- Property name - STRINGjava.lang.Exception
- If an error occurs@ThingworxExtensionApiMethod(since={6,6}) public void RemoveServiceDefinition(java.lang.String name) throws java.lang.Exception
name
- Service name - STRINGjava.lang.Exception
- If an error occurs@ThingworxExtensionApiMethod(since={6,6}) public void RemoveEventDefinition(java.lang.String name) throws java.lang.Exception
name
- Event name - STRINGjava.lang.Exception
- If an error occurs@ThingworxExtensionApiMethod(since={6,6}) public void AddOrUpdateAlert(java.lang.String property, java.lang.String alertType, java.lang.String alertName, java.lang.String description, java.lang.Boolean enabled, java.lang.Integer priority, InfoTable attributes, java.lang.Boolean persistent) throws java.lang.Exception
property
- Property name - STRINGalertType
- Alert type - STRINGalertName
- Alert name - STRINGdescription
- Alert description - STRINGenabled
- Alert enabled - BOOLEANpriority
- Alert priority - INTEGERattributes
- Alert attributes - INFOTABLEpersistent
- Persist this change - BOOLEANjava.lang.Exception
- If an error occurs@ThingworxExtensionApiMethod(since={6,6}) public void RemoveAlert(java.lang.String property, java.lang.String alertName, java.lang.Boolean persistent) throws java.lang.Exception
property
- Property name - STRINGalertName
- Alert name - STRINGpersistent
- Persist this change - BOOLEANjava.lang.Exception
- If an error occurs@ThingworxExtensionApiMethod(since={6,6}) public InfoTable GetLocalAlertDefinitions(java.lang.String property) throws java.lang.Exception
property
- Property name - STRINGjava.lang.Exception
- If an error occurs@ThingworxExtensionApiMethod(since={6,6}) public InfoTable GetAlertDefinitions(java.lang.String property) throws java.lang.Exception
property
- Property name - STRINGjava.lang.Exception
- If an error occurs@ThingworxExtensionApiMethod(since={6,6}) public InfoTable GetAlertDefinition(java.lang.String property, java.lang.String alertName) throws java.lang.Exception
property
- Property name - STRINGalertName
- Alert name - STRINGjava.lang.Exception
- If an error occurs@ThingworxExtensionApiMethod(since={6,6}) public java.lang.Boolean HasAlert(java.lang.String property, java.lang.String alertName) throws java.lang.Exception
property
- Property name - STRINGalertName
- Alert name - STRINGjava.lang.Exception
- If an error occurs@ThingworxExtensionApiMethod(since={6,6}) public void SetNumberAlertParameter(java.lang.String property, java.lang.String alertName, java.lang.String parameterName, java.lang.Double value, java.lang.Boolean persistent) throws java.lang.Exception
property
- Property name - STRINGalertName
- Alert name - STRINGparameterName
- Parameter name - STRINGvalue
- Parameter value - NUMBERpersistent
- Make it persistent - BOOLEANjava.lang.Exception
- If an error occurs@ThingworxExtensionApiMethod(since={6,6}) public java.lang.Double GetNumberAlertParameter(java.lang.String property, java.lang.String alertName, java.lang.String parameterName) throws java.lang.Exception
property
- Property name - STRINGalertName
- Alert name - STRINGparameterName
- Parameter name - STRINGjava.lang.Exception
- If an error occurs@ThingworxExtensionApiMethod(since={6,6}) public void SetIntegerAlertParameter(java.lang.String property, java.lang.String alertName, java.lang.String parameterName, java.lang.Integer value, java.lang.Boolean persistent) throws java.lang.Exception
property
- Property name - STRINGalertName
- Alert name - STRINGparameterName
- Parameter name - STRINGvalue
- Parameter value - INTEGERpersistent
- Make it persistent - BOOLEANjava.lang.Exception
- If an error occurs@ThingworxExtensionApiMethod(since={6,6}) public java.lang.Integer GetIntegerAlertParameter(java.lang.String property, java.lang.String alertName, java.lang.String parameterName) throws java.lang.Exception
property
- Property name - STRINGalertName
- Alert name - STRINGparameterName
- Parameter name - STRINGjava.lang.Exception
- If an error occurs@ThingworxExtensionApiMethod(since={6,6}) public java.lang.Long GetLongAlertParameter(java.lang.String property, java.lang.String alertName, java.lang.String parameterName) throws java.lang.Exception
property
- Property name - STRINGalertName
- Alert name - STRINGparameterName
- Parameter name - STRINGjava.lang.Exception
- If an error occurs@ThingworxExtensionApiMethod(since={6,6}) public void SetBooleanAlertParameter(java.lang.String property, java.lang.String alertName, java.lang.String parameterName, java.lang.Boolean value, java.lang.Boolean persistent) throws java.lang.Exception
property
- Property name - STRINGalertName
- Alert name - STRINGparameterName
- Parameter name - STRINGvalue
- Parameter value - BOOLEANpersistent
- Make it persistent - BOOLEANjava.lang.Exception
- If an error occurs@ThingworxExtensionApiMethod(since={6,6}) public java.lang.Boolean GetBooleanAlertParameter(java.lang.String property, java.lang.String alertName, java.lang.String parameterName) throws java.lang.Exception
property
- Property name - STRINGalertName
- Alert name - STRINGparameterName
- Parameter name - STRINGjava.lang.Exception
- If an error occurs@ThingworxExtensionApiMethod(since={6,6}) public void SetDateTimeAlertParameter(java.lang.String property, java.lang.String alertName, java.lang.String parameterName, org.joda.time.DateTime value, java.lang.Boolean persistent) throws java.lang.Exception
property
- Property name - STRINGalertName
- Alert name - STRINGparameterName
- Parameter name - STRINGvalue
- Parameter value - DATETIMEpersistent
- Make it persistent - BOOLEANjava.lang.Exception
- If an error occurs@ThingworxExtensionApiMethod(since={6,6}) public org.joda.time.DateTime GetDateTimeAlertParameter(java.lang.String property, java.lang.String alertName, java.lang.String parameterName) throws java.lang.Exception
property
- Property name - STRINGalertName
- Alert name - STRINGparameterName
- Parameter name - STRINGjava.lang.Exception
- If an error occurs@ThingworxExtensionApiMethod(since={6,6}) public void SetLocationAlertParameter(java.lang.String property, java.lang.String alertName, java.lang.String parameterName, Location value, java.lang.Boolean persistent) throws java.lang.Exception
property
- Property name - STRINGalertName
- Alert name - STRINGparameterName
- Parameter name - STRINGvalue
- Parameter value - LOCATIONpersistent
- Make it persistent - BOOLEANjava.lang.Exception
- If an error occurs@ThingworxExtensionApiMethod(since={6,6}) public Location GetLocationAlertParameter(java.lang.String property, java.lang.String alertName, java.lang.String parameterName) throws java.lang.Exception
property
- Property name - STRINGalertName
- Alert name - STRINGparameterName
- Parameter name - STRINGjava.lang.Exception
- If an error occurs@ThingworxExtensionApiMethod(since={6,6}) public void SetStringAlertParameter(java.lang.String property, java.lang.String alertName, java.lang.String parameterName, java.lang.String value, java.lang.Boolean persistent) throws java.lang.Exception
property
- Property name - STRINGalertName
- Alert name - STRINGparameterName
- Parameter name - STRINGvalue
- Parameter value - STRINGpersistent
- Make it persistent - BOOLEANjava.lang.Exception
- If an error occurs@ThingworxExtensionApiMethod(since={6,6}) public java.lang.String GetStringAlertParameter(java.lang.String property, java.lang.String alertName, java.lang.String parameterName) throws java.lang.Exception
property
- Property name - STRINGalertName
- Alert name - STRINGparameterName
- Parameter name - STRINGjava.lang.Exception
- If an error occurs@ThingworxExtensionApiMethod(since={7,4}) public java.lang.String GetAlertStatus(java.lang.String property, java.lang.String alertName) throws java.lang.Exception
property
- Property name - STRINGalertName
- Alert name - STRINGjava.lang.Exception
- If an error occurs@ThingworxExtensionApiMethod(since={7,4}) public InfoTable GetAlertStatuses() throws java.lang.Exception
java.lang.Exception
- If an error occurs@ThingworxExtensionApiMethod(since={7,4}) public InfoTable GetAlertStatusesForProperty(java.lang.String property) throws java.lang.Exception
property
- Property name - STRINGjava.lang.Exception
- If an error occurs@ThingworxExtensionApiMethod(since={8,0}) public InfoTable GetAnomalyAlertTrainingStatisticsForAlert(java.lang.String property, java.lang.String alertName) throws java.lang.Exception
property
- Property name - STRINGalertName
- Alert name - STRINGjava.lang.Exception
- If an error occurs@ThingworxExtensionApiMethod(since={8,0}) public InfoTable GetAllAnomalyAlertTrainingStatistics() throws java.lang.Exception
java.lang.Exception
- If an error occurs@ThingworxExtensionApiMethod(since={8,0}) public InfoTable GetAnomalyAlertTrainingStatisticsForProperty(java.lang.String property) throws java.lang.Exception
property
- Property name - STRINGjava.lang.Exception
- If an error occurs@ThingworxExtensionApiMethod(since={6,6}) public void AddDynamicSubscription(java.lang.String thingName, java.lang.String eventName, java.lang.String propertyName, java.lang.String serviceName) throws java.lang.Exception
thingName
- Thing name - THINGNAMEeventName
- Event name - STRINGpropertyName
- Property name - STRINGserviceName
- Local service name - STRINGjava.lang.Exception
- If an error occurs@ThingworxExtensionApiMethod(since={8,5}) public boolean IsDynamicSubscriptionCreated(java.lang.String thingName, java.lang.String eventName, java.lang.String propertyName, java.lang.String serviceName) throws java.lang.Exception
thingName
- Thing name - THINGNAMEeventName
- Event name - STRINGpropertyName
- Property name - STRINGserviceName
- Local service name - STRINGjava.lang.Exception
- If an error occurs@ThingworxExtensionApiMethod(since={6,6}) public void RemoveDynamicSubscription(java.lang.String thingName, java.lang.String eventName, java.lang.String propertyName, java.lang.String serviceName) throws java.lang.Exception
thingName
- Thing name - THINGNAMEeventName
- Event name - STRINGpropertyName
- Property name - STRINGserviceName
- Local service name - STRINGjava.lang.Exception
- If an error occurs@ThingworxExtensionApiMethod(since={6,6}) public void dispatchEvent(ThingworxEvent event)
@ThingworxExtensionApiMethod(since={6,6}) public void dispatchBackgroundEvent(ThingworxEvent event)
@ThingworxExtensionApiMethod(since={6,6}, canOverride=true, requiresSuper=true) public InfoTable processServiceRequest(java.lang.String serviceName, ValueCollection params) throws java.lang.Exception
IServiceProvider
Processes an internal or reflected service request. Entities may call this method if they wish to invoke a service call directly on an entity. This method performs a service invoke authorization check against the current security context.
processServiceRequest
in interface IServiceProvider
serviceName
- - The name of the service to invokeparams
- - A collection of parameter mappingsjava.lang.Exception
- If an error occurs
Subclasses of Thing
may override this method if they want to add additional logic or validation around service calls.
@ThingworxExtensionApiMethod(since={6,6}, canOverride=true, requiresSuper=true) public InfoTable processAPIServiceRequest(java.lang.String serviceName, ValueCollection params) throws java.lang.Exception
IServiceProvider
Processes a service request invoked via the REST API. This method performs a service invoke authorization check against the current security context.
processAPIServiceRequest
in interface IServiceProvider
serviceName
- - The name of the service to invokeparams
- - A collection of parameter mappingsjava.lang.Exception
- If an error occurs
Subclasses of Thing
may override this method if they want to add additional logic or validation around service calls.
@ThingworxExtensionApiMethod(since={6,6}, canOverride=true, requiresSuper=true) public static boolean isAlwaysAvailableService(java.lang.String name)
Returns true
if the provided service name can always be invoked against the thing, regardless of its current state.
Subclasses overriding this method must ensure that they preserve and return the result of this method if it returns true.
name
- the name of the service to checktrue
if the service can always be invoked@ThingworxExtensionApiMethod(since={6,6}) public void fireEvent(EventDefinition eventDefinition, org.joda.time.DateTime timestamp, ValueCollection eventData) throws java.lang.Exception
fireEvent
in interface IEventProvider
java.lang.Exception
- If an error occurs@ThingworxExtensionApiMethod(since={6,6}) public InfoTable GetImplementedShapes() throws java.lang.Exception
java.lang.Exception
- If an error occurs@ThingworxExtensionApiMethod(since={6,6}) public InfoTable GetLocallyImplementedShapes() throws java.lang.Exception
java.lang.Exception
- If an error occurs@ThingworxExtensionApiMethod(since={6,6}) public InfoTable GetMashups() throws java.lang.Exception
java.lang.Exception
- If an error occurs@ThingworxExtensionApiMethod(since={6,6}) public InfoTable GetThingTemplate() throws java.lang.Exception
java.lang.Exception
- If an error occurs@ThingworxExtensionApiMethod(since={6,6}) public java.lang.Boolean ImplementsShape(java.lang.String thingShapeName) throws java.lang.Exception
thingShapeName
- Thing shape name - THINGSHAPENAMEjava.lang.Exception
- If an error occurs@ThingworxExtensionApiMethod(since={6,6}) public java.lang.Boolean IsDerivedFromTemplate(java.lang.String thingTemplateName) throws java.lang.Exception
thingTemplateName
- Thing template name - THINGTEMPLATENAMEjava.lang.Exception
- If an error occurs@ThingworxExtensionApiMethod(since={6,6}) public void SetPublished(java.lang.Boolean publish) throws java.lang.Exception
publish
- Publish status (true/false) - BOOLEANjava.lang.Exception
- If an error occurs@ThingworxExtensionApiMethod(since={6,6}) public java.lang.Boolean GetPublished() throws java.lang.Exception
java.lang.Exception
- If an error occurs@ThingworxExtensionApiMethod(since={6,6}) public void SetDescription(java.lang.String description) throws java.lang.Exception
SetDescription
in class RootEntity
description
- Description for an entity - STRINGjava.lang.Exception
- If an error occurs@ThingworxExtensionApiMethod(since={6,6}) public void SetTags(TagCollection tags) throws java.lang.Exception
SetTags
in class RootEntity
tags
- Tags for an entity - TAGSjava.lang.Exception
- If an error occurs@ThingworxExtensionApiMethod(since={6,6}) public void AddTags(TagCollection tags) throws java.lang.Exception
AddTags
in class RootEntity
tags
- Tags for an entity - TAGSjava.lang.Exception
- If an error occurs@ThingworxExtensionApiMethod(since={6,6}) public InfoTable GetThingRelationships(java.lang.Integer maxDepth) throws java.lang.Exception
maxDepth
- Maximum depth to search - INTEGERjava.lang.Exception
- If an error occurs@ThingworxExtensionApiMethod(since={6,6}) public InfoTable GetNetworks() throws java.lang.Exception
java.lang.Exception
- If an error occurs@ThingworxExtensionApiMethod(since={6,6}) public java.lang.Boolean IsInNetwork(java.lang.String network) throws java.lang.Exception
network
- Network name - STRINGjava.lang.Exception
- If an error occurs@ThingworxExtensionApiMethod(since={6,6}) public java.lang.Boolean HavePropertiesChangedSince(org.joda.time.DateTime timestamp) throws java.lang.Exception
timestamp
- Timestamp to compare - DATETIMEjava.lang.Exception
- If an error occurs@ThingworxExtensionApiMethod(since={6,6}) public void PurgePropertyHistory(java.lang.String propertyName, org.joda.time.DateTime startDate, org.joda.time.DateTime endDate, java.lang.Boolean immediate) throws java.lang.Exception
propertyName
- Property name - STRINGstartDate
- Start time - DATETIMEendDate
- End time - DATETIMEimmediate
- Delete immediately - BOOLEANjava.lang.Exception
- If an error occurs@ThingworxExtensionApiMethod(since={7,2}) public void PurgeAllPropertyHistory(org.joda.time.DateTime startDate, org.joda.time.DateTime endDate) throws java.lang.Exception
startDate
- Start time - DATETIMEendDate
- End time - DATETIMEjava.lang.Exception
- If an error occurs@ThingworxExtensionApiMethod(since={7,2}) public void PurgeSelectedPropertyHistory(org.joda.time.DateTime startDate, org.joda.time.DateTime endDate, InfoTable propertiesToPurge) throws java.lang.Exception
startDate
- Start time - DATETIMEendDate
- End time - DATETIMEpropertiesToPurge
- Properties to purge - INFOTABLEjava.lang.Exception
- If an error occurs@ThingworxExtensionApiMethod(since={6,6}) public InfoTable QueryPropertyHistory(java.lang.Double maxItems, org.joda.time.DateTime startDate, org.joda.time.DateTime endDate, java.lang.Boolean oldestFirst, org.json.JSONObject query) throws java.lang.Exception
maxItems
- Maximum number of items to return - NUMBERstartDate
- Start time - DATETIMEendDate
- End time - DATETIMEoldestFirst
- Search/sort from oldest to newest - BOOLEANquery
- Query definition - QUERYjava.lang.Exception
- If an error occurs
Queries the value stream for each property (must be a logged property) value of the given source thing in a given time range. Calls ValueStream.queryValueStreamEntries for each property, then munges the values together in a result set.
QueryPropertyHistory returns a data set created by querying each logged property on a thing and then combining the individual datasets into one big data set. A "row" is created for each time stamp in the individual data sets. If there is a logged value with that time stamp, it is entered in the row of the data set. If there is no logged value, the last logged value for that property is used. If there is no logged property; the entry is left blank. This combiner process removes duplicates for a given property based on timestamp.
To obtain the actual logged values for a given property, you must use the QuerydatatypePropertyHistory services (for example, QueryIntegerPropertyHistory). You can confirm that data is actually purged with these services.
@ThingworxExtensionApiMethod(since={6,6}) public InfoTable QueryNamedPropertyHistory(InfoTable propertyNames, java.lang.Double maxItems, org.joda.time.DateTime startDate, org.joda.time.DateTime endDate, java.lang.Boolean oldestFirst, org.json.JSONObject query) throws java.lang.Exception
propertyNames
- Property names - INFOTABLEmaxItems
- Maximum number of items to return - NUMBERstartDate
- Start time - DATETIMEendDate
- End time - DATETIMEoldestFirst
- Search/sort from oldest to newest - BOOLEANquery
- Query definition - QUERYjava.lang.Exception
- If an error occurs@ThingworxExtensionApiMethod(since={6,6}) public InfoTable QueryIntegerPropertyHistory(java.lang.Double maxItems, java.lang.String propertyName, org.joda.time.DateTime startDate, org.joda.time.DateTime endDate, java.lang.Boolean oldestFirst, org.json.JSONObject query) throws java.lang.Exception
maxItems
- Maximum number of items to return - NUMBERpropertyName
- Property name - STRINGstartDate
- Start time - DATETIMEendDate
- End time - DATETIMEoldestFirst
- Search/sort from oldest to newest - BOOLEANquery
- Query definition - QUERYjava.lang.Exception
- If an error occurs@ThingworxExtensionApiMethod(since={6,6}) public InfoTable QueryLongPropertyHistory(java.lang.Double maxItems, java.lang.String propertyName, org.joda.time.DateTime startDate, org.joda.time.DateTime endDate, java.lang.Boolean oldestFirst, org.json.JSONObject query) throws java.lang.Exception
maxItems
- Maximum number of items to return - NUMBERpropertyName
- Property name - STRINGstartDate
- Start time - DATETIMEendDate
- End time - DATETIMEoldestFirst
- Search/sort from oldest to newest - BOOLEANquery
- Query definition - QUERYjava.lang.Exception
- If an error occurs@ThingworxExtensionApiMethod(since={6,6}) public InfoTable QueryNumberPropertyHistory(java.lang.Double maxItems, java.lang.String propertyName, org.joda.time.DateTime startDate, org.joda.time.DateTime endDate, java.lang.Boolean oldestFirst, org.json.JSONObject query) throws java.lang.Exception
maxItems
- Maximum number of items to return - NUMBERpropertyName
- Property name - STRINGstartDate
- Start time - DATETIMEendDate
- End time - DATETIMEoldestFirst
- Search/sort from oldest to newest - BOOLEANquery
- Query definition - QUERYjava.lang.Exception
- If an error occurs@ThingworxExtensionApiMethod(since={6,6}) public InfoTable QueryBooleanPropertyHistory(java.lang.Double maxItems, java.lang.String propertyName, org.joda.time.DateTime startDate, org.joda.time.DateTime endDate, java.lang.Boolean oldestFirst, org.json.JSONObject query) throws java.lang.Exception
maxItems
- Maximum number of items to return - NUMBERpropertyName
- Property name - STRINGstartDate
- Start time - DATETIMEendDate
- End time - DATETIMEoldestFirst
- Search/sort from oldest to newest - BOOLEANquery
- Query definition - QUERYjava.lang.Exception
- If an error occurs@ThingworxExtensionApiMethod(since={6,6}) public InfoTable QueryDateTimePropertyHistory(java.lang.Double maxItems, java.lang.String propertyName, org.joda.time.DateTime startDate, org.joda.time.DateTime endDate, java.lang.Boolean oldestFirst, org.json.JSONObject query) throws java.lang.Exception
maxItems
- Maximum number of items to return - NUMBERpropertyName
- Property name - STRINGstartDate
- Start time - DATETIMEendDate
- End time - DATETIMEoldestFirst
- Search/sort from oldest to newest - BOOLEANquery
- Query definition - QUERYjava.lang.Exception
- If an error occurs@ThingworxExtensionApiMethod(since={6,6}) public InfoTable QueryInfoTablePropertyHistory(java.lang.Double maxItems, java.lang.String propertyName, org.joda.time.DateTime startDate, org.joda.time.DateTime endDate, java.lang.Boolean oldestFirst, org.json.JSONObject query, java.lang.Boolean flatten) throws java.lang.Exception
maxItems
- Maximum number of items to return - NUMBERpropertyName
- Property name - STRINGstartDate
- Start time - DATETIMEendDate
- End time - DATETIMEoldestFirst
- Search/sort from oldest to newest - BOOLEANquery
- Query definition - QUERYflatten
- Flatten the result - BOOLEANjava.lang.Exception
- If an error occurs@ThingworxExtensionApiMethod(since={6,6}) public InfoTable QueryLocationPropertyHistory(java.lang.Double maxItems, java.lang.String propertyName, org.joda.time.DateTime startDate, org.joda.time.DateTime endDate, java.lang.Boolean oldestFirst, org.json.JSONObject query) throws java.lang.Exception
maxItems
- Maximum number of items to return - NUMBERpropertyName
- Property name - STRINGstartDate
- Start time - DATETIMEendDate
- End time - DATETIMEoldestFirst
- Search/sort from oldest to newest - BOOLEANquery
- Query definition - QUERYjava.lang.Exception
- If an error occurs@ThingworxExtensionApiMethod(since={6,6}) public InfoTable QueryStringPropertyHistory(java.lang.Double maxItems, java.lang.String propertyName, org.joda.time.DateTime startDate, org.joda.time.DateTime endDate, java.lang.Boolean oldestFirst, org.json.JSONObject query) throws java.lang.Exception
maxItems
- Maximum number of items to return - NUMBERpropertyName
- Property name - STRINGstartDate
- Start time - DATETIMEendDate
- End time - DATETIMEoldestFirst
- Search/sort from oldest to newest - BOOLEANquery
- Query definition - QUERYjava.lang.Exception
- If an error occurs@ThingworxExtensionApiMethod(since={7,1}) public InfoTable QueryVec2PropertyHistory(java.lang.Double maxItems, java.lang.String propertyName, org.joda.time.DateTime startDate, org.joda.time.DateTime endDate, java.lang.Boolean oldestFirst, org.json.JSONObject query) throws java.lang.Exception
maxItems
- Maximum number of items to return - NUMBERpropertyName
- Property name - STRINGstartDate
- Start time - DATETIMEendDate
- End time - DATETIMEoldestFirst
- Search/sort from oldest to newest - BOOLEANquery
- Query definition - QUERYjava.lang.Exception
- If an error occurs@ThingworxExtensionApiMethod(since={7,1}) public InfoTable QueryVec3PropertyHistory(java.lang.Double maxItems, java.lang.String propertyName, org.joda.time.DateTime startDate, org.joda.time.DateTime endDate, java.lang.Boolean oldestFirst, org.json.JSONObject query) throws java.lang.Exception
maxItems
- Maximum number of items to return - NUMBERpropertyName
- Property name - STRINGstartDate
- Start time - DATETIMEendDate
- End time - DATETIMEoldestFirst
- Search/sort from oldest to newest - BOOLEANquery
- Query definition - QUERYjava.lang.Exception
- If an error occurs@ThingworxExtensionApiMethod(since={7,1}) public InfoTable QueryVec4PropertyHistory(java.lang.Double maxItems, java.lang.String propertyName, org.joda.time.DateTime startDate, org.joda.time.DateTime endDate, java.lang.Boolean oldestFirst, org.json.JSONObject query) throws java.lang.Exception
maxItems
- Maximum number of items to return - NUMBERpropertyName
- Property name - STRINGstartDate
- Start time - DATETIMEendDate
- End time - DATETIMEoldestFirst
- Search/sort from oldest to newest - BOOLEANquery
- Query definition - QUERYjava.lang.Exception
- If an error occurs@ThingworxExtensionApiMethod(since={7,1}) public InfoTable QueryThingCodePropertyHistory(java.lang.Double maxItems, java.lang.String propertyName, org.joda.time.DateTime startDate, org.joda.time.DateTime endDate, java.lang.Boolean oldestFirst, org.json.JSONObject query) throws java.lang.Exception
maxItems
- Maximum number of items to return - NUMBERpropertyName
- Property name - STRINGstartDate
- Start time - DATETIMEendDate
- End time - DATETIMEoldestFirst
- Search/sort from oldest to newest - BOOLEANquery
- Query definition - QUERYjava.lang.Exception
- If an error occurs@ThingworxExtensionApiMethod(since={6,6}) public InfoTable QueryImagePropertyHistory(java.lang.Double maxItems, java.lang.String propertyName, org.joda.time.DateTime startDate, org.joda.time.DateTime endDate, java.lang.Boolean oldestFirst, org.json.JSONObject query) throws java.lang.Exception
maxItems
- Maximum number of items to return - NUMBERpropertyName
- Property name - STRINGstartDate
- Start time - DATETIMEendDate
- End time - DATETIMEoldestFirst
- Search/sort from oldest to newest - BOOLEANquery
- Query definition - QUERYjava.lang.Exception
- If an error occurs@ThingworxExtensionApiMethod(since={6,6}) public void WritePropertiesToStream(java.lang.String name, TagCollection tags) throws java.lang.Exception
name
- Stream name - THINGNAMEtags
- Tags - TAGSjava.lang.Exception
- If an error occurs@ThingworxExtensionApiMethod(since={6,6}) public InfoTable GetThingSummaryInformation() throws java.lang.Exception
java.lang.Exception
- If an error occurs@ThingworxExtensionApiMethod(since={6,6}) public ImagePrimitive GetAvatar() throws java.lang.Exception
GetAvatar
in interface IAvatar
GetAvatar
in class RootEntity
java.lang.Exception
- If an error occurs@ThingworxExtensionApiMethod(since={6,6}) public java.lang.String GetHomeMashup()
GetHomeMashup
in class RootEntity
@ThingworxExtensionApiMethod(since={6,6}) public void AddIntegerValueStreamEntry(org.joda.time.DateTime timestamp, java.lang.String propertyName, java.lang.Integer value) throws java.lang.Exception
timestamp
- Event time (optional) - DATETIMEpropertyName
- Property name - STRINGvalue
- Data value - INTEGERjava.lang.Exception
- If an error occurs@ThingworxExtensionApiMethod(since={6,6}) public void AddLongValueStreamEntry(org.joda.time.DateTime timestamp, java.lang.String propertyName, java.lang.Long value) throws java.lang.Exception
timestamp
- Event time (optional) - DATETIMEpropertyName
- Property name - STRINGvalue
- Data value - LONGjava.lang.Exception
- If an error occurs@ThingworxExtensionApiMethod(since={6,6}) public void AddNumberValueStreamEntry(org.joda.time.DateTime timestamp, java.lang.String propertyName, java.lang.Double value) throws java.lang.Exception
timestamp
- Event time (optional) - DATETIMEpropertyName
- Property name - STRINGvalue
- Data value - NUMBERjava.lang.Exception
- If an error occurs@ThingworxExtensionApiMethod(since={6,6}) public void AddBooleanValueStreamEntry(org.joda.time.DateTime timestamp, java.lang.String propertyName, java.lang.Boolean value) throws java.lang.Exception
timestamp
- Event time (optional) - DATETIMEpropertyName
- Property name - STRINGvalue
- Data value - BOOLEANjava.lang.Exception
- If an error occurs@ThingworxExtensionApiMethod(since={6,6}) public void AddLocationValueStreamEntry(org.joda.time.DateTime timestamp, java.lang.String propertyName, Location value) throws java.lang.Exception
timestamp
- Event time (optional) - DATETIMEpropertyName
- Property name - STRINGvalue
- Data value - LOCATIONjava.lang.Exception
- If an error occurs@ThingworxExtensionApiMethod(since={7,1}) public void AddVec2ValueStreamEntry(org.joda.time.DateTime timestamp, java.lang.String propertyName, Vec2 value) throws java.lang.Exception
timestamp
- Event time (optional) - DATETIMEpropertyName
- Property name - STRINGvalue
- Data value - VEC2java.lang.Exception
- If an error occurs@ThingworxExtensionApiMethod(since={7,1}) public void AddVec3ValueStreamEntry(org.joda.time.DateTime timestamp, java.lang.String propertyName, Vec3 value) throws java.lang.Exception
timestamp
- Event time (optional) - DATETIMEpropertyName
- Property name - STRINGvalue
- Data value - VEC3java.lang.Exception
- If an error occurs@ThingworxExtensionApiMethod(since={7,1}) public void AddVec4ValueStreamEntry(org.joda.time.DateTime timestamp, java.lang.String propertyName, Vec4 value) throws java.lang.Exception
timestamp
- Event time (optional) - DATETIMEpropertyName
- Property name - STRINGvalue
- Data value - VEC4java.lang.Exception
- If an error occurs@ThingworxExtensionApiMethod(since={7,1}) public void AddThingCodeValueStreamEntry(org.joda.time.DateTime timestamp, java.lang.String propertyName, ThingCode value) throws java.lang.Exception
timestamp
- Event time (optional) - DATETIMEpropertyName
- Property name - STRINGvalue
- Data value - THINGCODEjava.lang.Exception
- If an error occurs@ThingworxExtensionApiMethod(since={6,6}) public void AddStringValueStreamEntry(org.joda.time.DateTime timestamp, java.lang.String propertyName, java.lang.String value) throws java.lang.Exception
timestamp
- Event time (optional) - DATETIMEpropertyName
- Property name - STRINGvalue
- Data value - STRINGjava.lang.Exception
- If an error occurs@ThingworxExtensionApiMethod(since={6,6}) public void AddInfoTableValueStreamEntry(org.joda.time.DateTime timestamp, java.lang.String propertyName, InfoTable value) throws java.lang.Exception
timestamp
- Event time (optional) - DATETIMEpropertyName
- Property name - STRINGvalue
- Data value - INFOTABLEjava.lang.Exception
- If an error occurs@ThingworxExtensionApiMethod(since={6,6}) public void AddImageValueStreamEntry(org.joda.time.DateTime timestamp, java.lang.String propertyName, byte[] value) throws java.lang.Exception
timestamp
- Event time (optional) - DATETIMEpropertyName
- Property name - STRINGvalue
- Data value - IMAGEjava.lang.Exception
- If an error occurs@ThingworxExtensionApiMethod(since={6,6}) public void AddDateTimeValueStreamEntry(org.joda.time.DateTime timestamp, java.lang.String propertyName, org.joda.time.DateTime value) throws java.lang.Exception
timestamp
- Event time (optional) - DATETIMEpropertyName
- Property name - STRINGvalue
- Data value - DATETIMEjava.lang.Exception
- If an error occurs@ThingworxExtensionApiMethod(since={6,6}) protected void checkValueStream() throws java.lang.Exception
java.lang.Exception
- If an error occurs@ThingworxExtensionApiMethod(since={6,6}) protected void checkPropertyName(java.lang.String propertyName) throws java.lang.Exception
java.lang.Exception
- If an error occurs