ChannelType channelType = null; if (cKind == ChannelKind.STATE) { channelType = ChannelTypeBuilder.state(channelTypeUID, label, itemType).isAdvanced(advanced) .withDescription(description).withCategory(category).withTags(tags) .withConfigDescriptionURI(configDescriptionURI).withStateDescription(stateDescription) .withAutoUpdatePolicy(autoUpdatePolicy).build(); } else if (cKind == ChannelKind.TRIGGER) { channelType = ChannelTypeBuilder.trigger(channelTypeUID, label).isAdvanced(advanced) .withDescription(description).withCategory(category).withTags(tags) .withConfigDescriptionURI(configDescriptionURI).withEventDescription(eventDescription).build();
.state(channelTypeUID, label == null ? defaultLabel : label, channelType.getItemType()) .isAdvanced(channelType.isAdvanced()).withCategory(channelType.getCategory()) .withConfigDescriptionURI(channelType.getConfigDescriptionURI()).withTags(channelType.getTags()) case TRIGGER: TriggerChannelTypeBuilder triggerBuilder = ChannelTypeBuilder .trigger(channelTypeUID, label == null ? defaultLabel : label) .isAdvanced(channelType.isAdvanced()).withCategory(channelType.getCategory()) .withConfigDescriptionURI(channelType.getConfigDescriptionURI()).withTags(channelType.getTags())