]> git.basschouten.com Git - openhab-addons.git/blob
8591f8670c347f2b77e47b5822c286e7dc75a4b8
[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.utils;
14
15 import java.util.Map;
16
17 import org.eclipse.jdt.annotation.NonNullByDefault;
18 import org.eclipse.jdt.annotation.Nullable;
19 import org.openhab.core.thing.Bridge;
20 import org.openhab.core.thing.ChannelUID;
21 import org.openhab.core.thing.binding.BaseBridgeHandler;
22
23 /**
24  * The {@link ExtendedBaseBridgeHandler} extended the {@link BaseBridgeHandler} interface and adds <B>publicly
25  * visible</B> convenience methods for property handling.
26  *
27  * @author Guenther Schreiner - Initial contribution.
28  */
29 @NonNullByDefault
30 public abstract class ExtendedBaseBridgeHandler extends BaseBridgeHandler {
31
32     /*
33      * ************************
34      * ***** Constructors *****
35      */
36
37     /**
38      * @see BaseBridgeHandler
39      * @param bridge which will be created.
40      */
41     protected ExtendedBaseBridgeHandler(Bridge bridge) {
42         super(bridge);
43     }
44
45     /**
46      * Returns a copy of the properties map, that can be modified. The method {@link #updateProperties} must be called
47      * to persist the properties.
48      *
49      * @return copy of the thing properties (not null)
50      */
51     @Override
52     public Map<String, String> editProperties() {
53         return super.editProperties();
54     }
55
56     /**
57      * Informs the framework, that the given properties map of the thing was updated. This method performs a check, if
58      * the properties were updated. If the properties did not change, the framework is not informed about changes.
59      *
60      * @param properties properties map, that was updated and should be persisted
61      */
62     @Override
63     public void updateProperties(@Nullable Map<String, String> properties) {
64         super.updateProperties(properties);
65     }
66
67     /**
68      * Returns whether at least one item is linked for the given UID of the channel.
69      *
70      * @param channelUID UID of the channel (must not be null)
71      * @return true if at least one item is linked, false otherwise
72      */
73     @Override
74     public boolean isLinked(ChannelUID channelUID) {
75         return super.isLinked(channelUID);
76     }
77 }