]> git.basschouten.com Git - openhab-addons.git/blob
366f131a7f8209b44c941e00adc2bcd7dc57f898
[openhab-addons.git] /
1 /**
2  * Copyright (c) 2010-2020 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  */
24 @NonNullByDefault
25 public class FeedBindingConstants {
26
27     public static final String BINDING_ID = "feed";
28
29     // List of all Thing Type UIDs
30     public static final ThingTypeUID FEED_THING_TYPE_UID = new ThingTypeUID("feed", "feed");
31
32     // List of all Channel IDs
33     /**
34      * Contains the published date of the last feed entry.
35      */
36     public static final String CHANNEL_LATEST_PUBLISHED_DATE = "latest-date";
37
38     /**
39      * Contains the title of the last feed entry.
40      */
41     public static final String CHANNEL_LATEST_TITLE = "latest-title";
42
43     /**
44      * Contains the description of last feed entry.
45      */
46     public static final String CHANNEL_LATEST_DESCRIPTION = "latest-description";
47
48     /**
49      * Description of the feed.
50      */
51     public static final String CHANNEL_DESCRIPTION = "description";
52
53     /**
54      * The last update date of the feed.
55      */
56     public static final String CHANNEL_LAST_UPDATE = "last-update";
57
58     /**
59      * The name of the feed author, if author is present.
60      */
61     public static final String CHANNEL_AUTHOR = "author";
62
63     /**
64      * The title of the feed.
65      */
66     public static final String CHANNEL_TITLE = "title";
67
68     /**
69      * Number of entries in the feed
70      */
71     public static final String CHANNEL_NUMBER_OF_ENTRIES = "number-of-entries";
72
73     // Configuration parameters
74     /**
75      * * The URL of the feed document.
76      */
77     public static final String URL = "URL";
78
79     /**
80      * The refresh time in minutes.
81      */
82     public static final String REFRESH_TIME = "refresh";
83
84     /**
85      * The default auto refresh time in minutes.
86      */
87     public static final long DEFAULT_REFRESH_TIME = 20;
88
89     /**
90      * The minimum refresh time in milliseconds. Any REFRESH command send to a Thing, before this time has expired, will
91      * not trigger an attempt to download new data from the server.
92      **/
93     public static final int MINIMUM_REFRESH_TIME = 3000;
94 }