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)
.isAdvanced(channelType.isAdvanced()).withCategory(channelType.getCategory()) .withConfigDescriptionURI(channelType.getConfigDescriptionURI()).withTags(channelType.getTags()) .withStateDescription(state).withAutoUpdatePolicy(channelType.getAutoUpdatePolicy()); if (description != null) { stateBuilder.withDescription(description); return stateBuilder.build(); case TRIGGER: TriggerChannelTypeBuilder triggerBuilder = ChannelTypeBuilder