Package org.openhab.core.sitemap
Interface Rule
@NonNullByDefault
public interface Rule
A representation of a sitemap widget icon, color or visibility rule.
- Author:
- Mark Herwege - Initial contribution
-
Method Summary
Modifier and TypeMethodDescriptionGet the rule conditions.@Nullable StringgetValue()Get the rule value for icon, color or confirmCmd rules.voidsetConditions(List<Condition> conditions) Replace the rule conditions with a new list of conditions.voidSet the rule value.
-
Method Details
-
getConditions
Get the rule conditions. This method should return a modifiable list, allowing updates to conditions.- Returns:
- conditions
-
setConditions
Replace the rule conditions with a new list of conditions.- Parameters:
conditions-
-
getValue
@Nullable String getValue()Get the rule value for icon, color or confirmCmd rules. The rule value is the resulting value if the rule is met. Visibility rules don't have a value, always work on the full widget.- Returns:
- value
-
setValue
Set the rule value.- Parameters:
value-
-