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 TypeMethodDescription@Nullable StringGet the rule argument for icon or color rules.Get the rule conditions.voidsetArgument(@Nullable String argument) Set the rule argument.voidsetConditions(List<Condition> conditions) Replace the rule conditions with a new list of conditions.
-
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-
-
getArgument
@Nullable String getArgument()Get the rule argument for icon or color rules. The rule argument is the resulting value if the rule is met. Visibility rules don't have an argument, always work on the full widget.- Returns:
- argument
-
setArgument
Set the rule argument.- Parameters:
argument-
-