@Override public synchronized void addingFinished() { Map<String, ChannelType> channelTypes = new HashMap<>(10); // create channel types for (ChannelTypeXmlResult type : this.channelTypeRefs) { ChannelType channelType = type.toChannelType(); channelTypes.put(channelType.getUID().getAsString(), channelType); this.channelTypeProvider.add(this.bundle, channelType); } // create channel group types for (ChannelGroupTypeXmlResult type : this.channelGroupTypeRefs) { this.channelGroupTypeProvider.add(this.bundle, type.toChannelGroupType()); } // create thing and bridge types for (ThingTypeXmlResult type : this.thingTypeRefs) { this.thingTypeProvider.add(this.bundle, type.toThingType()); } // release temporary cache this.thingTypeRefs.clear(); this.channelGroupTypeRefs.clear(); this.channelTypeRefs.clear(); }
@Override public synchronized void addingFinished() { Map<String, ChannelType> channelTypes = new HashMap<>(10); // create channel types for (ChannelTypeXmlResult type : this.channelTypeRefs) { ChannelType channelType = type.toChannelType(); channelTypes.put(channelType.getUID().getAsString(), channelType); this.channelTypeProvider.addChannelType(this.bundle, channelType); } // create channel group types for (ChannelGroupTypeXmlResult type : this.channelGroupTypeRefs) { this.channelTypeProvider.addChannelGroupType(this.bundle, type.toChannelGroupType(channelTypes)); } // create thing and bridge types for (ThingTypeXmlResult type : this.thingTypeRefs) { this.thingTypeProvider.addThingType(this.bundle, type.toThingType()); } // release temporary cache this.thingTypeRefs.clear(); this.channelGroupTypeRefs.clear(); this.channelTypeRefs.clear(); }
new ChannelTypeUID(channelTypeUID.getAsString()), advanced, itemType, field.getName(), field.getInformativeText(), null, null, new StateDescription(getMinimum(field), getMaximum(field),
this.applyDefaultConfiguration(configuration, resolvedChannelType); } else { GenericThingProvider.logger.error("Channel type {} could not be resolved.", channelTypeUID.getAsString());