]> git.basschouten.com Git - openhab-addons.git/blob
62fbae4251e1a4ac73e2231d32bd20c90e522e3a
[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.type;
14
15 import java.net.URI;
16 import java.util.Set;
17
18 import org.openhab.core.thing.ThingTypeUID;
19 import org.openhab.core.thing.type.ChannelGroupTypeUID;
20 import org.openhab.core.thing.type.ChannelTypeUID;
21
22 /**
23  * Allows external definition of
24  * {@link org.openhab.core.thing.type.ThingType}s for this binding by
25  * suppressing those ThingTypes which are generated by
26  * {@link org.openhab.binding.homematic.internal.type.HomematicThingTypeProvider}
27  *
28  * @author Michael Reitler - Initial contribution
29  */
30 public interface HomematicThingTypeExcluder {
31
32     /**
33      * Returns list of ThingTypes to be excluded. Clients which implement this
34      * are henceforth responsible to ...
35      * <ul>
36      * <li>provide any excluded ThingType on their own - e.g. in a custom
37      * {@link org.openhab.core.thing.binding.ThingTypeProvider} or by
38      * defining those {@link org.openhab.core.thing.type.ThingType}s in XML.</li>
39      * <li>provide {@link org.openhab.core.thing.type.ChannelType}s
40      * which are introduced by the provided thing-types</li>
41      * <li>ensure compatibility and completeness of those thing-types (for any
42      * {@link org.openhab.binding.homematic.internal.model.HmDatapoint}
43      * there must be a matching
44      * {@link org.openhab.core.thing.Channel}) which can be handled by
45      * the binding (see
46      * {@link org.openhab.binding.homematic.internal.handler.HomematicThingHandler})</li>
47      * </ul>
48      *
49      * @return {@link ThingTypeUID}s of ThingTypes that are supposed to be
50      *         excluded from the binding's thing-type generation
51      */
52     Set<ThingTypeUID> getExcludedThingTypes();
53
54     /**
55      * Check for the given {@link ThingTypeUID} whether it is excluded by this
56      * {@link HomematicThingTypeExcluder} or not
57      *
58      * @param thingType a specific ThingType, specified by its {@link ThingTypeUID}
59      * @return <i>true</i>, if the {@link org.openhab.core.thing.type.ThingType} is excluded
60      */
61     boolean isThingTypeExcluded(ThingTypeUID thingType);
62
63     /**
64      * Check for the given {@link ChannelTypeUID} whether it is excluded by this
65      * {@link HomematicThingTypeExcluder} or not
66      *
67      * @param channelType a specific ChannelType, specified by its {@link ChannelTypeUID}
68      * @return <i>true</i>, if the {@link org.openhab.core.thing.type.ChannelType} is
69      *         excluded
70      */
71     boolean isChannelTypeExcluded(ChannelTypeUID channelType);
72
73     /**
74      * Check for the given {@link ChannelGroupTypeUID} whether it is excluded by
75      * this {@link HomematicThingTypeExcluder} or not
76      *
77      * @param channelGroupType a specific ChannelGroupType, specified by its {@link ChannelGroupTypeUID}
78      * @return <i>true</i>, if the
79      *         {@link org.openhab.core.thing.type.ChannelGroupType} is
80      *         excluded
81      */
82     boolean isChannelGroupTypeExcluded(ChannelGroupTypeUID channelGroupType);
83
84     /**
85      * Check for the given config-description-{@link URI} whether it is excluded by
86      * this {@link HomematicThingTypeExcluder} or not
87      *
88      * @param configDescriptionURI a specific ConfigDescription, specified by a unique {@link URI}
89      * @return <i>true</i>, if the {@link org.openhab.core.config.core.ConfigDescription} is
90      *         excluded
91      */
92     boolean isConfigDescriptionExcluded(URI configDescriptionURI);
93 }