]> git.basschouten.com Git - openhab-addons.git/blob
fdb332735c9dfd71c7f6e79070f3bf73b0268b87
[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.velux.internal.handler;
14
15 import org.eclipse.jdt.annotation.NonNullByDefault;
16 import org.eclipse.jdt.annotation.Nullable;
17 import org.openhab.core.thing.ChannelUID;
18 import org.openhab.core.types.State;
19
20 /**
21  * <B>Channel-specific retrieval and modification.</B>
22  * <P>
23  * This class implements the Channel <B>VShutter</B> :
24  * <UL>
25  * <LI><I>Velux</I> <B>bridge</B> &rarr; <B>OpenHAB</B>:
26  * <P>
27  * Information retrieval by method {@link #handleRefresh}.</LI>
28  * </UL>
29  *
30  * @author Guenther Schreiner - Initial contribution.
31  */
32 @NonNullByDefault
33 abstract class PropertyHandlerTemplate {
34
35     /**
36      * Communication method to retrieve information to update the property value.
37      *
38      * @param channelUID The item passed as type {@link ChannelUID} for which a refresh is intended.
39      * @param channelId The same item passed as type {@link String} for which a refresh is intended.
40      * @param thisBridgeHandler The Velux bridge handler with a specific communication protocol which provides
41      *            information for this channel.
42      * @return <B>newValue</B> The value retrieved for the passed channel, or <I>null</I> in case if there is no (new)
43      *         value.
44      */
45     static @Nullable State handleRefresh(ChannelUID channelUID, String channelId,
46             VeluxBridgeHandler thisBridgeHandler) {
47         throw new IllegalStateException("handleRefresh hasn't been set up in the subclass");
48     }
49 }