Class ChannelGroupDefinition


  • public class ChannelGroupDefinition
    extends Object
    The ChannelGroupDefinition class defines a ChannelGroupType of a ThingType.

    A ChannelGroupType is part of a Thing that represents a set of channels (functionalities) of it.

    Hint: This class is immutable.

    Author:
    Michael Grammling - Initial contribution, Dennis Nobel - Introduced ChannelTypeRegistry and channel type references
    • Constructor Detail

      • ChannelGroupDefinition

        public ChannelGroupDefinition​(String id,
                                      ChannelGroupTypeUID typeUID,
                                      String label,
                                      String description)
                               throws IllegalArgumentException
        Creates a new instance of this class with the specified parameters.
        Parameters:
        id - the identifier of the channel group (must neither be null nor empty)
        typeUID - the type UID of the channel group (must not be null)
        label - the label for the channel group to override ChannelGroupType (could be null)
        description - the description for the channel group to override ChannelGroupType (could be null)
        Throws:
        IllegalArgumentException - if the ID is null or empty, or the type is null
      • ChannelGroupDefinition

        public ChannelGroupDefinition​(String id,
                                      ChannelGroupTypeUID typeUID)
                               throws IllegalArgumentException
        Creates a new instance of this class with the specified parameters.
        Parameters:
        id - the identifier of the channel group (must neither be null nor empty)
        typeUID - the type UID of the channel group (must not be null)
        Throws:
        IllegalArgumentException - if the ID is null or empty, or the type is null
    • Method Detail

      • getId

        public String getId()
        Returns the identifier of the channel group.
        Returns:
        the identifier of the channel group (neither null, nor empty)
      • getTypeUID

        public ChannelGroupTypeUID getTypeUID()
        Returns the type UID of the channel group.
        Returns:
        the type UID of the channel group (not null)
      • getLabel

        public String getLabel()
        Returns the label (if set). If no label is set, getLabel will return null and the default label for the ChannelGroupType is used.
        Returns:
        the label for the channel group. Can be null.
      • getDescription

        public String getDescription()
        Returns the description (if set). If no description is set, getDescription will return null and the default description for the ChannelGroupType is used.
        Returns:
        the description for the channel group. Can be null.