2 * Copyright (c) 2010-2023 Contributors to the openHAB project
4 * See the NOTICE file(s) distributed with this work for additional
7 * This program and the accompanying materials are made available under the
8 * terms of the Eclipse Public License 2.0 which is available at
9 * http://www.eclipse.org/legal/epl-2.0
11 * SPDX-License-Identifier: EPL-2.0
13 package org.openhab.binding.enocean.internal;
15 import org.eclipse.jdt.annotation.NonNull;
16 import org.openhab.core.thing.type.ChannelTypeUID;
20 * @author Daniel Weber - Initial contribution
21 * This class holds information for creating a channel of an EnOcean thing like acceptedItemType and
24 public class EnOceanChannelDescription {
25 public final ChannelTypeUID channelTypeUID;
26 public final String acceptedItemType;
28 public final String label;
29 public final boolean isStateChannel;
30 public final boolean autoCreate;
33 * Ctor for an EnOceanChannelDescription
35 * @param channelTypeUID ChannelTypeUID of channel
36 * @param acceptedItemType AcceptedItemType of channel like Switch, Dimmer or null if we accept everything
38 public EnOceanChannelDescription(ChannelTypeUID channelTypeUID, String itemType) {
39 this(channelTypeUID, itemType, "", true, true);
43 * Ctor for an EnOceanChannelDescription with detailed information
45 * @param channelTypeUID ChannelTypeUID of channel
46 * @param acceptedItemType ItemType of channel like Switch, Dimmer
47 * @param label of created channel
48 * @param isStateChannel otherwise created channel is a trigger channel
49 * @param autoCreate create channel during thing initialization, otherwise channel is created
52 public EnOceanChannelDescription(ChannelTypeUID channelTypeUID, String itemType, String label,
53 boolean isStateChannel, boolean autoCreate) {
54 this.channelTypeUID = channelTypeUID;
55 this.acceptedItemType = itemType;
62 this.isStateChannel = isStateChannel;
63 this.autoCreate = autoCreate;