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 newConfigStatusMessage
object.static ConfigStatusMessage.Builder
Creates a builder for the construction of aConfigStatusMessage
having typeConfigStatusMessage.Type.ERROR
.static ConfigStatusMessage.Builder
information
(String parameterName) Creates a builder for the construction of aConfigStatusMessage
having typeConfigStatusMessage.Type.INFORMATION
.static ConfigStatusMessage.Builder
Creates a builder for the construction of aConfigStatusMessage
having typeConfigStatusMessage.Type.PENDING
.static ConfigStatusMessage.Builder
Creates a builder for the construction of aConfigStatusMessage
having 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 aConfigStatusMessage
having 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 aConfigStatusMessage
having 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 aConfigStatusMessage
having 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 aConfigStatusMessage
having 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 newConfigStatusMessage
object.- Returns:
- new
ConfigStatusMessage
object.
-