]> git.basschouten.com Git - openhab-addons.git/blob
d043c77d67c00cc2c48693df59a6ed52b20162c1
[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.feed.internal;
14
15 import org.eclipse.jdt.annotation.NonNullByDefault;
16 import org.openhab.core.thing.ThingTypeUID;
17
18 /**
19  * The {@link FeedBindingConstants} class defines common constants, which are
20  * used across the whole binding.
21  *
22  * @author Svilen Valkanov - Initial contribution
23  * @author Juergen Pabel - Added enclosure channel
24  */
25 @NonNullByDefault
26 public class FeedBindingConstants {
27
28     public static final String BINDING_ID = "feed";
29
30     // List of all Thing Type UIDs
31     public static final ThingTypeUID FEED_THING_TYPE_UID = new ThingTypeUID("feed", "feed");
32
33     // List of all Channel IDs
34     /**
35      * Contains the published date of the last feed entry.
36      */
37     public static final String CHANNEL_LATEST_PUBLISHED_DATE = "latest-date";
38
39     /**
40      * Contains the title of the last feed entry.
41      */
42     public static final String CHANNEL_LATEST_TITLE = "latest-title";
43
44     /**
45      * Contains the description of the last feed entry.
46      */
47     public static final String CHANNEL_LATEST_DESCRIPTION = "latest-description";
48
49     /**
50      * Contains the link to the last feed entry.
51      */
52     public static final String CHANNEL_LATEST_LINK = "latest-link";
53
54     /**
55      * Contains the enclosure link to the last feed entry.
56      */
57     public static final String CHANNEL_LATEST_ENCLOSURE = "latest-enclosure";
58
59     /**
60      * Description of the feed.
61      */
62     public static final String CHANNEL_DESCRIPTION = "description";
63
64     /**
65      * The last update date of the feed.
66      */
67     public static final String CHANNEL_LAST_UPDATE = "last-update";
68
69     /**
70      * The name of the feed author, if author is present.
71      */
72     public static final String CHANNEL_AUTHOR = "author";
73
74     /**
75      * The title of the feed.
76      */
77     public static final String CHANNEL_TITLE = "title";
78
79     /**
80      * Number of entries in the feed
81      */
82     public static final String CHANNEL_NUMBER_OF_ENTRIES = "number-of-entries";
83
84     // Configuration parameters
85     /**
86      * * The URL of the feed document.
87      */
88     public static final String URL = "URL";
89
90     /**
91      * The refresh time in minutes.
92      */
93     public static final String REFRESH_TIME = "refresh";
94
95     /**
96      * The default auto refresh time in minutes.
97      */
98     public static final long DEFAULT_REFRESH_TIME = 20;
99
100     /**
101      * The minimum refresh time in milliseconds. Any REFRESH command send to a Thing, before this time has expired, will
102      * not trigger an attempt to download new data from the server.
103      **/
104     public static final int MINIMUM_REFRESH_TIME = 3000;
105 }