Class ConfigStatusMessage

java.lang.Object
org.openhab.core.config.core.status.ConfigStatusMessage

public final class ConfigStatusMessage extends Object
The ConfigStatusMessage is a domain object for a configuration status message. It contains the name of the configuration parameter, the ConfigStatusMessage.Type information, the internationalized message and an optional status code.

The framework will take care of setting the corresponding internationalized message. For this purpose there must be an i18n properties file inside the bundle of the ConfigStatusProvider that has a message declared for the messageKey. The actual message key is built by ConfigStatusMessage.Builder.withMessageKeySuffix(String) in the manner that the given message key suffix is appended to config-status.config-status-message-type.. As a result depending on the type of the message the final constructed message keys are:

  • config-status.information.any-suffix
  • config-status.warning.any-suffix
  • config-status.error.any-suffix
  • config-status.pending.any-suffix
Author:
Thomas Höfer - Initial contribution, Chris Jackson - Add withMessageKey and remove message from other methods
  • Field Details

    • parameterName

      public final String parameterName
      The name of the configuration parameter.
    • type

      public final ConfigStatusMessage.Type type
      The ConfigStatusMessage.Type of the configuration status message.
    • message

      public final @Nullable String message
      The corresponding internationalized status message.
    • statusCode

      public final @Nullable Integer statusCode
      The optional status code of the configuration status message; to be used if there are additional information to be provided.
  • Method Details