Class RuleStatusInfo

java.lang.Object
org.openhab.core.automation.RuleStatusInfo

@NonNullByDefault public class RuleStatusInfo extends Object
This class is used to present status of a rule. The status consists of three parts: The main status, a status detail and a string description.
Author:
Yordan Mihaylov - Initial contribution, Kai Kreuzer - Refactored to match ThingStatusInfo implementation
  • Constructor Details

    • RuleStatusInfo

      protected RuleStatusInfo()
      Default constructor for deserialization e.g. by Gson.
    • RuleStatusInfo

      public RuleStatusInfo(RuleStatus status)
      Constructs a status info.
      Parameters:
      status - the status
    • RuleStatusInfo

      public RuleStatusInfo(RuleStatus status, RuleStatusDetail statusDetail)
      Constructs a status info.
      Parameters:
      status - the status
      statusDetail - the detail of the status
    • RuleStatusInfo

      public RuleStatusInfo(RuleStatus status, RuleStatusDetail statusDetail, @Nullable String description)
      Constructs a status info.
      Parameters:
      status - the status
      statusDetail - the detail of the status
      description - the description of the status
  • Method Details

    • getStatus

      public RuleStatus getStatus()
      Gets the status itself.
      Returns:
      the status
    • getStatusDetail

      public RuleStatusDetail getStatusDetail()
      Gets the detail of the status.
      Returns:
      the status detail
    • getDescription

      public @Nullable String getDescription()
      Gets the description of the status.
      Returns:
      the description
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(@Nullable Object obj)
      Overrides:
      equals in class Object