]> git.basschouten.com Git - openhab-addons.git/blob
6186a4cf57bb30f6a5257938ff2e307b3603d4d6
[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.homematic.internal.type;
14
15 import java.net.URI;
16 import java.util.Locale;
17
18 import org.eclipse.jdt.annotation.Nullable;
19 import org.openhab.core.config.core.ConfigDescription;
20 import org.openhab.core.config.core.ConfigDescriptionProvider;
21
22 /**
23  * Extends the ConfigDescriptionProvider to manually add a ConfigDescription.
24  *
25  * @author Gerhard Riegler - Initial contribution
26  */
27 public interface HomematicConfigDescriptionProvider extends ConfigDescriptionProvider {
28
29     /**
30      * Adds the ConfigDescription to this provider.
31      */
32     public void addConfigDescription(ConfigDescription configDescription);
33
34     /**
35      * Provides a {@link ConfigDescription} for the given URI.
36      *
37      * @param uri uri of the config description
38      * @param locale locale
39      *
40      * @return config description or null if no config description could be found
41      */
42     @Override
43     @Nullable
44     ConfigDescription getConfigDescription(URI uri, @Nullable Locale locale);
45
46     /**
47      * Use this method to lookup a ConfigDescription which was generated by the
48      * homematic binding. Other than {@link #getConfigDescription(URI, Locale)}
49      * of this provider, it will return also those {@link ConfigDescription}s
50      * which are excluded by {@link HomematicThingTypeExcluder}
51      * 
52      * @param URI config-description-uri
53      *            e.g. <i>thing-type:homematic:HM-WDS40-TH-I-2</i>
54      * @return ConfigDescription that was added to HomematicConfigDescriptionProvider,
55      *         identified by its config-description-uri<br>
56      *         <i>null</i> if no ConfigDescription with the given URI was added
57      *         before
58      */
59     public ConfigDescription getInternalConfigDescription(URI uri);
60 }