Class 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 Detail

      • 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 Detail

      • 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
      • hashCode

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

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