2 * Copyright (c) 2010-2020 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.feed.internal;
15 import java.math.BigDecimal;
17 import org.eclipse.jdt.annotation.NonNullByDefault;
18 import org.openhab.core.thing.ThingTypeUID;
21 * The {@link FeedBindingConstants} class defines common constants, which are
22 * used across the whole binding.
24 * @author Svilen Valkanov - Initial contribution
27 public class FeedBindingConstants {
29 public static final String BINDING_ID = "feed";
31 // List of all Thing Type UIDs
32 public static final ThingTypeUID FEED_THING_TYPE_UID = new ThingTypeUID("feed", "feed");
34 // List of all Channel IDs
36 * Contains the published date of the last feed entry.
38 public static final String CHANNEL_LATEST_PUBLISHED_DATE = "latest-date";
41 * Contains the title of the last feed entry.
43 public static final String CHANNEL_LATEST_TITLE = "latest-title";
46 * Contains the description of last feed entry.
48 public static final String CHANNEL_LATEST_DESCRIPTION = "latest-description";
51 * Description of the feed.
53 public static final String CHANNEL_DESCRIPTION = "description";
56 * The last update date of the feed.
58 public static final String CHANNEL_LAST_UPDATE = "last-update";
61 * The name of the feed author, if author is present.
63 public static final String CHANNEL_AUTHOR = "author";
66 * The title of the feed.
68 public static final String CHANNEL_TITLE = "title";
71 * Number of entries in the feed
73 public static final String CHANNEL_NUMBER_OF_ENTRIES = "number-of-entries";
75 // Configuration parameters
77 * * The URL of the feed document.
79 public static final String URL = "URL";
82 * The refresh time in minutes.
84 public static final String REFRESH_TIME = "refresh";
87 * The default auto refresh time in minutes.
89 public static final BigDecimal DEFAULT_REFRESH_TIME = new BigDecimal(20);
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.
95 public static final int MINIMUM_REFRESH_TIME = 3000;