Class Reportable

  • java.lang.Object
    • com.thingworx.things.connected.reportable.Reportable
    • 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.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • Reportable

        protected Reportable()
    • 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 - STRING
        eventTime - Time event is triggered - DATETIME
        source - Name of Thing that triggered event - STRING
        sourceProperty - Soure property - STRING
        eventData - 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