List<ChannelDefinition> localizedChannelDefinitions = new ArrayList<>(channelDefinitions.size()); for (final ChannelDefinition channelDefinition : channelDefinitions) { final ChannelDefinitionBuilder builder = new ChannelDefinitionBuilder(channelDefinition); String channelLabel = channelLabelResolver.apply(channelDefinition); String channelDescription = channelDescriptionResolver.apply(channelDefinition);
protected ChannelDefinition toChannelDefinition(String bindingId) throws ConversionException { String id = getId(); String typeId = getTypeId(); String typeUID = getTypeUID(bindingId, typeId); // Convert the channel properties into a map Map<String, String> propertiesMap = new HashMap<>(); for (NodeValue property : getProperties()) { propertiesMap.put(property.getAttributes().get("name"), (String) property.getValue()); } return new ChannelDefinitionBuilder(id, new ChannelTypeUID(typeUID)).withProperties(propertiesMap) .withLabel(getLabel()).withDescription(getDescription()).withAutoUpdatePolicy(getAutoUpdatePolicy()) .build(); }