]> git.basschouten.com Git - openhab-addons.git/blob
e63d1b287da86d88301c559be9710838b1811aac
[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      * <li>provide any excluded ThingType on their own - e.g. in a custom
36      * {@link org.openhab.core.thing.binding.ThingTypeProvider} or by
37      * defining those {@link org.openhab.core.thing.type.ThingType}s in XML.</li>
38      * <li>provide {@link org.openhab.core.thing.type.ChannelType}s
39      * which are introduced by the provided thing-types</li>
40      * <li>ensure compatibility and completeness of those thing-types (for any
41      * {@link org.openhab.binding.homematic.internal.model.HmDatapoint}
42      * there must be a matching
43      * {@link org.openhab.core.thing.Channel}) which can be handled by
44      * the binding (see
45      * {@link org.openhab.binding.homematic.internal.handler.HomematicThingHandler})</li>
46      *
47      * @return {@link ThingTypeUID}s of ThingTypes that are supposed to be
48      *         excluded from the binding's thing-type generation
49      */
50     Set<ThingTypeUID> getExcludedThingTypes();
51
52     /**
53      * Check for the given {@link ThingTypeUID} whether it is excluded by this
54      * {@link HomematicThingTypeExcluder} or not
55      *
56      * @param thingType a specific ThingType, specified by its {@link ThingTypeUID}
57      * @return <i>true</i>, if the {@link org.openhab.core.thing.type.ThingType} is excluded
58      */
59     boolean isThingTypeExcluded(ThingTypeUID thingType);
60
61     /**
62      * Check for the given {@link ChannelTypeUID} whether it is excluded by this
63      * {@link HomematicThingTypeExcluder} or not
64      *
65      * @param channelType a specific ChannelType, specified by its {@link ChannelTypeUID}
66      * @return <i>true</i>, if the {@link org.openhab.core.thing.type.ChannelType} is
67      *         excluded
68      */
69     boolean isChannelTypeExcluded(ChannelTypeUID channelType);
70
71     /**
72      * Check for the given {@link ChannelGroupTypeUID} whether it is excluded by
73      * this {@link HomematicThingTypeExcluder} or not
74      *
75      * @param channelGroupType a specific ChannelGroupType, specified by its {@link ChannelGroupTypeUID}
76      * @return <i>true</i>, if the
77      *         {@link org.openhab.core.thing.type.ChannelGroupType} is
78      *         excluded
79      */
80     boolean isChannelGroupTypeExcluded(ChannelGroupTypeUID channelGroupType);
81
82     /**
83      * Check for the given config-description-{@link URI} whether it is excluded by
84      * this {@link HomematicThingTypeExcluder} or not
85      *
86      * @param configDescriptionURI a specific ConfigDescription, specified by a unique {@link URI}
87      * @return <i>true</i>, if the {@link org.openhab.core.config.core.ConfigDescription} is
88      *         excluded
89      */
90     boolean isConfigDescriptionExcluded(URI configDescriptionURI);
91 }