Class ConfigStatusInfo
java.lang.Object
org.openhab.core.config.core.status.ConfigStatusInfo
The
ConfigStatusInfo contains ConfigStatusMessages to represent the current configuration status of
an entity. Furthermore it provides some convenience operations to filter for specific ConfigStatusMessages.- Author:
- Thomas Höfer - Initial contribution
-
Constructor Summary
ConstructorsConstructorDescriptionCreates a newConfigStatusInfo.ConfigStatusInfo(Collection<ConfigStatusMessage> configStatusMessages) Creates a newConfigStatusInfowith the givenConfigStatusMessages. -
Method Summary
Modifier and TypeMethodDescriptionvoidadd(Collection<ConfigStatusMessage> configStatusMessages) Adds the given givenConfigStatusMessages.voidadd(ConfigStatusMessage configStatusMessage) Adds the givenConfigStatusMessage.booleanRetrieves 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.inthashCode()toString()
-
Constructor Details
-
ConfigStatusInfo
public ConfigStatusInfo()Creates a newConfigStatusInfo. -
ConfigStatusInfo
Creates a newConfigStatusInfowith 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 givenConfigStatusMessages.- Parameters:
configStatusMessages- the configuration status messages to be added- Throws:
IllegalArgumentException- if given collection is null
-
hashCode
public int hashCode() -
equals
-
toString
-