Class Reportable
- java.lang.Object
-
- com.thingworx.things.connected.reportable.Reportable
-
@ThingworxExtensionApiClass(since={8,4}) public class Reportable extends java.lang.Object
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
Reportable()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
EvaluateReporting(java.lang.String eventName, org.joda.time.DateTime eventTime, java.lang.String source, java.lang.String sourceProperty, InfoTable eventData)
Service Category: Service Description: Evaluates this Thing's Reporting status based on its strategy.java.lang.String
GetReportingStrategy()
Service Category: Service Description: Retrieves this Thing's reporting strategy.void
SetReportingStrategy(java.lang.String strategyThing)
Service Category: Service Description: Set this Thing's reporting strategy.
-
-
-
Method Detail
-
EvaluateReporting
@ThingworxExtensionApiMethod(since={8,4}) public boolean EvaluateReporting(java.lang.String eventName, org.joda.time.DateTime eventTime, java.lang.String source, java.lang.String sourceProperty, InfoTable eventData) throws java.lang.Exception
- Service Category:
- Service Description:
- Evaluates this Thing's Reporting status based on its strategy.
- Parameters:
eventName
- Name of the event - STRINGeventTime
- Time event is triggered - DATETIMEsource
- Name of Thing that triggered event - STRINGsourceProperty
- Soure property - STRINGeventData
- Data used to evaluate presence - INFOTABLE
This method evaluates if a Thing is reporting Then sets the Connectable read-only properties accordingly: "isReporting" = result of that call "reportingLastEvaluation" = new Date() after the call finished "reportingLastChange" = if isReporting changed, then lastEvaluationTime; otherwise unchanged- Throws:
java.lang.Exception
- if the Thing doesn't have the right Properties, Services, has a Strategy that does not refer to a visible Thing, if the service calls return invalid values, or other exceptional conditions
-
SetReportingStrategy
@ThingworxExtensionApiMethod(since={8,4}) public void SetReportingStrategy(java.lang.String strategyThing) throws java.lang.Exception
- Service Category:
- Service Description:
- Set this Thing's reporting strategy.
- Parameters:
strategyThing
- Name of the Strategy Thing - THINGNAME
This method sets the Strategy used for evaluating if a Reportable is indeed reporting- Throws:
java.lang.Exception
- if the Strategy Thing specified does not exist if the Strategy Thing specified does not extend from ReportingByConnection
-
GetReportingStrategy
@ThingworxExtensionApiMethod(since={8,4}) public java.lang.String GetReportingStrategy() throws InvalidRequestException
- Service Category:
- Service Description:
- Retrieves this Thing's reporting strategy.
- Returns:
- result Name of the Strategy Thing - STRING
- Throws:
InvalidRequestException
- If an error occurs
A Strategy is a Thing that represents an algorithm to determine if a device is Reporting or not This service exposes the Strategy that this Thing uses for Reporting evaluation, which is stored in a config table
-
-