Class ReportingStrategy

All Implemented Interfaces:
ISupportsAccessModifier, IConfigurableObject, INotScriptFriendly, ISupportsDeprecation, IDiffableObject, IAlertProvider, IAvatar, IEntityLifeCycleEvent, IEventMetadataProvider, IEventProvider, IPersistable, IPropertyProvider, IServiceMetadataProvider, IServiceProvider, IShapeProvider, ITaggableObject, IDependencyScannableObject, IImportDependencyHandler, IHierarchicalEntity, IEntityDefinition, IPersistableObject<String>, IDesignTimeSecurable, IDesignTimeSecurableEntity, IRunTimeSecurable, IRunTimeSecurableEntity, ISecurable, IVisibilitySecurable, IVisibilitySecurableEntity, IEventProcessor, IReportingStrategy, IAspectContainer, INamedObject, Serializable

@ThingworxExtensionApiClass(since={8,4}, canExtendOrImplement=true) public class ReportingStrategy extends Thing implements IReportingStrategy
The ReportingStrategy class is represented by a ThingTemplate entity in ThingWorx. Additional Things can be created for different ReportingStrategys, or custom ThingTemplates can be created for custom strategies. The default ThingWorx ReportingStrategy is AlwaysOn. A remote entity can then be checked to see if it isReporting or not.

The entity contains a ConfigurationTable with a Run As User setting that is validated upon update by the RunAsUserUtilities.isValidRunAsUser function.
See Also:
  • Constructor Details

    • ReportingStrategy

      protected ReportingStrategy()
  • Method Details

    • ReportingAlgorithm

      @ThingworxExtensionApiMethod(since={8,4}, canOverride=true) public Boolean ReportingAlgorithm(String eventName, org.joda.time.DateTime eventTime, String source, String sourceProperty, InfoTable eventData)
      Service Category:
      ConnectionStatus
      Service Description:
      Evaluates a Thing to determine if it is Present.
      Specified by:
      ReportingAlgorithm in interface IReportingStrategy
      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 - Parameters necessary for the algorithm to determine if a Thing is reporting - INFOTABLE
      Returns:
      result Whether the parameters describe a Device that is Reporting normally - BOOLEAN

      Abstract service definition, expected to be overridden by Strategy instances. This is roughly the Strategy design pattern