Class ConfigStatusMessage.Builder
java.lang.Object
org.openhab.core.config.core.status.ConfigStatusMessage.Builder
- Enclosing class:
ConfigStatusMessage
The builder for a
ConfigStatusMessage object.-
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds the newConfigStatusMessageobject.static ConfigStatusMessage.BuilderCreates a builder for the construction of aConfigStatusMessagehaving typeConfigStatusMessage.Type.ERROR.static ConfigStatusMessage.Builderinformation(String parameterName) Creates a builder for the construction of aConfigStatusMessagehaving typeConfigStatusMessage.Type.INFORMATION.static ConfigStatusMessage.BuilderCreates a builder for the construction of aConfigStatusMessagehaving typeConfigStatusMessage.Type.PENDING.static ConfigStatusMessage.BuilderCreates a builder for the construction of aConfigStatusMessagehaving typeConfigStatusMessage.Type.WARNING.withArguments(Object... arguments) Adds the given arguments (to be injected into the internationalized message) to the builder.withMessageKeySuffix(String messageKeySuffix) Adds the given message key suffix for the creation ofConfigStatusMessage.messageKey.withStatusCode(Integer statusCode) Adds the given status code to the builder.
-
Method Details
-
information
Creates a builder for the construction of aConfigStatusMessagehaving typeConfigStatusMessage.Type.INFORMATION.- Parameters:
parameterName- the name of the configuration parameter (must not be null)- Returns:
- the new builder instance
-
warning
Creates a builder for the construction of aConfigStatusMessagehaving typeConfigStatusMessage.Type.WARNING.- Parameters:
parameterName- the name of the configuration parameter (must not be null)- Returns:
- the new builder instance
-
error
Creates a builder for the construction of aConfigStatusMessagehaving typeConfigStatusMessage.Type.ERROR.- Parameters:
parameterName- the name of the configuration parameter (must not be null)- Returns:
- the new builder instance
-
pending
Creates a builder for the construction of aConfigStatusMessagehaving typeConfigStatusMessage.Type.PENDING.- Parameters:
parameterName- the name of the configuration parameter (must not be null)- Returns:
- the new builder instance
-
withMessageKeySuffix
Adds the given message key suffix for the creation ofConfigStatusMessage.messageKey.- Parameters:
messageKeySuffix- the message key suffix to be added- Returns:
- the updated builder
-
withArguments
Adds the given arguments (to be injected into the internationalized message) to the builder.- Parameters:
arguments- the arguments to be added- Returns:
- the updated builder instance
-
withStatusCode
Adds the given status code to the builder.- Parameters:
statusCode- the status code to be added- Returns:
- the updated builder
-
build
Builds the newConfigStatusMessageobject.- Returns:
- new
ConfigStatusMessageobject.
-