Class Reportable
java.lang.Object
com.thingworx.things.connected.reportable.Reportable
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedInitializes this instace with default values. -
Method Summary
Modifier and TypeMethodDescriptionbooleanEvaluateReporting(String eventName, org.joda.time.DateTime eventTime, String source, String sourceProperty, InfoTable eventData) Service Category: Service Description: Evaluates this Thing's Reporting status based on its strategy.Service Category: Service Description: Retrieves this Thing's reporting strategy.voidSetReportingStrategy(String strategyThing) Service Category: Service Description: Set this Thing's reporting strategy.
-
Constructor Details
-
Reportable
protected Reportable()Initializes this instace with default values.
-
-
Method Details
-
EvaluateReporting
@ThingworxExtensionApiMethod(since={8,4}) public boolean EvaluateReporting(String eventName, org.joda.time.DateTime eventTime, String source, String sourceProperty, InfoTable eventData) throws 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 - INFOTABLEThis 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:
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(String strategyThing) throws Exception - Service Category:
- Service Description:
- Set this Thing's reporting strategy.
- Parameters:
strategyThing- Name of the Strategy Thing - THINGNAMEThis method sets the Strategy used for evaluating if a Reportable is indeed reporting
- Throws:
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 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 occursA 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
-