Enum Class AutoUpdatePolicy

java.lang.Object
java.lang.Enum<AutoUpdatePolicy>
org.openhab.core.thing.type.AutoUpdatePolicy
All Implemented Interfaces:
Serializable, Comparable<AutoUpdatePolicy>, Constable

@NonNullByDefault public enum AutoUpdatePolicy extends Enum<AutoUpdatePolicy>
A binding's recommendation to the framework whether a state update should be automatically sent to an item if a command was received.
Author:
Simon Kaufmann - Initial contribution
  • Enum Constant Details

    • VETO

      public static final AutoUpdatePolicy VETO
      No automatic state update should be sent by the framework. The handler will make sure it sends a state update and it can do it better than just converting the command to a state.
    • DEFAULT

      public static final AutoUpdatePolicy DEFAULT
      The binding does not care and the framework may do what it deems to be right. The state update which the framework will send out normally will correspond the command state anyway. This is the default if no other policy is set.
    • RECOMMEND

      public static final AutoUpdatePolicy RECOMMEND
      An automatic state update should be sent by the framework because no updates will be sent by the binding. This usually is the case when devices don't expose their current state to the handler.
  • Method Details

    • values

      public static AutoUpdatePolicy[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static AutoUpdatePolicy valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • parse

      public static @Nullable AutoUpdatePolicy parse(@Nullable String input)
      Parses the input string into an AutoUpdatePolicy.
      Parameters:
      input - the input string
      Returns:
      the parsed AutoUpdatePolicy or null if the input was null
      Throws:
      IllegalArgumentException - if the input couldn't be parsed.