Package org.openhab.core.config.core
Class ConfigDescriptionBuilder
java.lang.Object
org.openhab.core.config.core.ConfigDescriptionBuilder
The
ConfigDescriptionBuilder
class provides a builder for the ConfigDescription
class.- Author:
- Christoph Weitkamp - Initial contribution
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds aConfigDescription
with the settings of this builder.static ConfigDescriptionBuilder
Creates a config description builderwithParameter
(ConfigDescriptionParameter parameter) Adds aConfigDescriptionParameter
s.withParameterGroup
(ConfigDescriptionParameterGroup parameterGroup) Adds aConfigDescriptionParameterGroup
associated with theConfigDescriptionParameter
s.withParameterGroups
(List<ConfigDescriptionParameterGroup> parameterGroups) Adds a list ofConfigDescriptionParameterGroup
associated with theConfigDescriptionParameter
s.withParameters
(List<ConfigDescriptionParameter> parameters) Adds a list ofConfigDescriptionParameter
s.
-
Method Details
-
create
Creates a config description builder- Parameters:
uri
- the URI of this description within theConfigDescriptionRegistry
- Returns:
- the config description builder instance
-
withParameter
Adds aConfigDescriptionParameter
s.- Returns:
- the updated builder instance
-
withParameters
Adds a list ofConfigDescriptionParameter
s.- Returns:
- the updated builder instance
-
withParameterGroup
Adds aConfigDescriptionParameterGroup
associated with theConfigDescriptionParameter
s.- Returns:
- the updated builder instance
-
withParameterGroups
public ConfigDescriptionBuilder withParameterGroups(List<ConfigDescriptionParameterGroup> parameterGroups) Adds a list ofConfigDescriptionParameterGroup
associated with theConfigDescriptionParameter
s.- Returns:
- the updated builder instance
-
build
Builds aConfigDescription
with the settings of this builder.- Returns:
- the desired result
- Throws:
IllegalArgumentException
- if the URI is invalid
-