Class ConfigStatusInfo
java.lang.Object
org.openhab.core.config.core.status.ConfigStatusInfo
The
ConfigStatusInfo
contains ConfigStatusMessage
s to represent the current configuration status of
an entity. Furthermore it provides some convenience operations to filter for specific ConfigStatusMessage
s.- Author:
- Thomas Höfer - Initial contribution
-
Constructor Summary
ConstructorsConstructorDescriptionCreates a newConfigStatusInfo
.ConfigStatusInfo
(Collection<ConfigStatusMessage> configStatusMessages) Creates a newConfigStatusInfo
with the givenConfigStatusMessages
. -
Method Summary
Modifier and TypeMethodDescriptionvoid
add
(Collection<ConfigStatusMessage> configStatusMessages) Adds the given givenConfigStatusMessage
s.void
add
(ConfigStatusMessage configStatusMessage) Adds the givenConfigStatusMessage
.boolean
Retrieves all configuration status messages.getConfigStatusMessages
(String... parameterNames) Retrieves all configuration status messages that have one of the given parameter names.getConfigStatusMessages
(Collection<ConfigStatusMessage.Type> types, Collection<String> parameterNames) Retrieves all configuration status messages that have one of the given parameter names or types.Retrieves all configuration status messages that have one of the given types.int
hashCode()
toString()
-
Constructor Details
-
ConfigStatusInfo
public ConfigStatusInfo()Creates a newConfigStatusInfo
. -
ConfigStatusInfo
Creates a newConfigStatusInfo
with the givenConfigStatusMessages
.- Parameters:
configStatusMessages
- the configuration status messages to be added
-
-
Method Details
-
getConfigStatusMessages
Retrieves all configuration status messages.- Returns:
- an unmodifiable collection of available configuration status messages
-
getConfigStatusMessages
Retrieves all configuration status messages that have one of the given types.- Parameters:
types
- the types to be filtered for; if empty then all messages are delivered- Returns:
- an unmodifiable collection of the corresponding configuration status messages
-
getConfigStatusMessages
Retrieves all configuration status messages that have one of the given parameter names.- Parameters:
parameterNames
- the parameter names to be filtered for; if empty then all messages are delivered- Returns:
- an unmodifiable collection of the corresponding configuration status messages
-
getConfigStatusMessages
public Collection<ConfigStatusMessage> getConfigStatusMessages(Collection<ConfigStatusMessage.Type> types, Collection<String> parameterNames) Retrieves all configuration status messages that have one of the given parameter names or types.- Parameters:
types
- the types to be filtered for (must not be null)parameterNames
- the parameter names to be filtered for (must not be null)- Returns:
- an unmodifiable collection of the corresponding configuration status messages
- Throws:
NullPointerException
- if one of types or parameter names collection is empty
-
add
Adds the givenConfigStatusMessage
.- Parameters:
configStatusMessage
- the configuration status message to be added- Throws:
IllegalArgumentException
- if given configuration status message is null
-
add
Adds the given givenConfigStatusMessage
s.- Parameters:
configStatusMessages
- the configuration status messages to be added- Throws:
IllegalArgumentException
- if given collection is null
-
hashCode
public int hashCode() -
equals
-
toString
-