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.icalendar.internal;
15 import org.eclipse.jdt.annotation.NonNullByDefault;
16 import org.openhab.core.thing.ThingTypeUID;
17 import org.openhab.core.thing.type.ChannelGroupTypeUID;
18 import org.openhab.core.thing.type.ChannelTypeUID;
21 * The {@link ICalendarBindingConstants} class defines common constants, which are
22 * used across the whole binding.
24 * @author Michael Wodniok - Initial contribution
25 * @author Michael Wodniok - Added last_update related constants
28 public class ICalendarBindingConstants {
30 public static final String BINDING_ID = "icalendar";
32 // List of all Thing Type UIDs
33 public static final ThingTypeUID THING_TYPE_CALENDAR = new ThingTypeUID(BINDING_ID, "calendar");
34 public static final ThingTypeUID THING_TYPE_FILTERED_EVENTS = new ThingTypeUID(BINDING_ID, "eventfilter");
36 // List of all Channel ids
37 public static final String CHANNEL_CURRENT_EVENT_TITLE = "current_title";
38 public static final String CHANNEL_CURRENT_EVENT_START = "current_start";
39 public static final String CHANNEL_CURRENT_EVENT_END = "current_end";
40 public static final String CHANNEL_CURRENT_EVENT_PRESENT = "current_presence";
41 public static final String CHANNEL_NEXT_EVENT_TITLE = "next_title";
42 public static final String CHANNEL_NEXT_EVENT_START = "next_start";
43 public static final String CHANNEL_NEXT_EVENT_END = "next_end";
44 public static final String CHANNEL_LAST_UPDATE = "last_update";
45 public static final ChannelTypeUID LAST_UPDATE_TYPE_UID = new ChannelTypeUID(BINDING_ID, "last_update");
47 // additional constants
48 public static final int HTTP_TIMEOUT_SECS = 60;
49 public static final String DATETIME_UNIT_MINUTE = "minute";
50 public static final String DATETIME_UNIT_HOUR = "hour";
51 public static final String DATETIME_UNIT_DAY = "day";
52 public static final String DATETIME_UNIT_WEEK = "week";
54 // specials for EventFilter
55 public static final int DEFAULT_FILTER_REFRESH = 15;
56 public static final String RESULT_GROUP_ID_PREFIX = "result_";
57 public static final String RESULT_BEGIN_ID = "begin";
58 public static final String RESULT_END_ID = "end";
59 public static final String RESULT_TITLE_ID = "title";
60 public static final ChannelGroupTypeUID GROUP_TYPE_UID = new ChannelGroupTypeUID(BINDING_ID, "result");
61 public static final ChannelTypeUID BEGIN_TYPE_UID = new ChannelTypeUID(BINDING_ID, "result_start");
62 public static final ChannelTypeUID END_TYPE_UID = new ChannelTypeUID(BINDING_ID, "result_end");
63 public static final ChannelTypeUID TITLE_TYPE_UID = new ChannelTypeUID(BINDING_ID, "result_title");