Package org.openhab.core.thing.type
Enum Class AutoUpdatePolicy
- All Implemented Interfaces:
Serializable
,Comparable<AutoUpdatePolicy>
,Constable
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
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic @Nullable AutoUpdatePolicy
Parses the input string into anAutoUpdatePolicy
.static AutoUpdatePolicy
Returns the enum constant of this class with the specified name.static AutoUpdatePolicy[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
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
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
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
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
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 nameNullPointerException
- if the argument is null
-
parse
Parses the input string into anAutoUpdatePolicy
.- 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.
-