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