/** * Build the {@link ChannelGroupType} with the given values * * @return the created {@link ChannelGroupType} */ public ChannelGroupType build() { return new ChannelGroupType(channelGroupTypeUID, advanced, label, description, category, channelDefinitions); }
public ChannelGroupType toChannelGroupType(Map<String, ChannelType> channelTypes) throws ConversionException { ChannelGroupType channelGroupType = new ChannelGroupType(this.channelGroupTypeUID, this.advanced, this.label, this.description, toChannelDefinitions(this.channelTypeReferences, channelTypes)); return channelGroupType; }
private ChannelGroupType createLocalizedChannelGroupType(Bundle bundle, ChannelGroupType channelGroupType, Locale locale) { LocalizedChannelTypeKey localizedChannelTypeKey = getLocalizedChannelTypeKey(channelGroupType.getUID(), locale); ChannelGroupType cachedEntry = localizedChannelGroupTypeCache.get(localizedChannelTypeKey); if (cachedEntry != null) { return cachedEntry; } if (this.thingTypeI18nUtil != null) { ChannelGroupTypeUID channelGroupTypeUID = channelGroupType.getUID(); String label = this.thingTypeI18nUtil.getChannelGroupLabel(bundle, channelGroupTypeUID, channelGroupType.getLabel(), locale); String description = this.thingTypeI18nUtil.getChannelGroupDescription(bundle, channelGroupTypeUID, channelGroupType.getDescription(), locale); ChannelGroupType localizedChannelType = new ChannelGroupType(channelGroupTypeUID, channelGroupType.isAdvanced(), label, description, channelGroupType.getChannelDefinitions()); localizedChannelGroupTypeCache.put(localizedChannelTypeKey, localizedChannelType); return localizedChannelType; } return channelGroupType; }