]> git.basschouten.com Git - openhab-addons.git/blob
c1e45ffa54a59da04a0911ed14fa8bc35d996c1e
[openhab-addons.git] /
1 /**
2  * Copyright (c) 2010-2023 Contributors to the openHAB project
3  *
4  * See the NOTICE file(s) distributed with this work for additional
5  * information.
6  *
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
10  *
11  * SPDX-License-Identifier: EPL-2.0
12  */
13 package org.openhab.binding.icalendar.internal;
14
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;
19
20 /**
21  * The {@link ICalendarBindingConstants} class defines common constants, which are
22  * used across the whole binding.
23  *
24  * @author Michael Wodniok - Initial contribution
25  * @author Michael Wodniok - Added last_update related constants
26  */
27 @NonNullByDefault
28 public class ICalendarBindingConstants {
29
30     public static final String BINDING_ID = "icalendar";
31
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");
35
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");
46
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";
53
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");
64 }