]> git.basschouten.com Git - openhab-addons.git/blob
5a360a2254de30c4c2ad5a264c2b2dbd6736d78c
[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 import org.openhab.core.thing.type.ThingType;
22
23 /**
24  * Allows external definition of
25  * {@link org.openhab.core.thing.type.ThingType}s for this binding by
26  * suppressing those ThingTypes which are generated by
27  * {@link org.openhab.binding.homematic.internal.type.HomematicThingTypeProvider}
28  *
29  * @author Michael Reitler - Initial contribution
30  */
31 public interface HomematicThingTypeExcluder {
32
33     /**
34      * Returns list of ThingTypes to be excluded. Clients which implement this
35      * are henceforth responsible to ...
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 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      *
48      * @return {@link ThingTypeUID}s of ThingTypes that are supposed to be
49      *         excluded from the binding's thing-type generation
50      */
51     Set<ThingTypeUID> getExcludedThingTypes();
52
53     /**
54      * Check for the given {@link ThingTypeUID} whether it is excluded by this
55      * {@link HomematicThingTypeExcluder} or not
56      *
57      * @param thingType a specific ThingType, specified by its {@link ThingTypeUID}
58      * @return <i>true</i>, if the {@link ThingType} is excluded
59      */
60     boolean isThingTypeExcluded(ThingTypeUID thingType);
61
62     /**
63      * Check for the given {@link ChannelTypeUID} whether it is excluded by this
64      * {@link HomematicThingTypeExcluder} or not
65      *
66      * @param channelType a specific ChannelType, specified by its {@link ChannelTypeUID}
67      * @return <i>true</i>, if the {@link org.openhab.core.thing.type.ChannelType} is
68      *         excluded
69      */
70     boolean isChannelTypeExcluded(ChannelTypeUID channelType);
71
72     /**
73      * Check for the given {@link ChannelGroupTypeUID} whether it is excluded by
74      * this {@link HomematicThingTypeExcluder} or not
75      *
76      * @param channelGroupType a specific ChannelGroupType, specified by its {@link ChannelGroupTypeUID}
77      * @return <i>true</i>, if the
78      *         {@link org.openhab.core.thing.type.ChannelGroupType} is
79      *         excluded
80      */
81     boolean isChannelGroupTypeExcluded(ChannelGroupTypeUID channelGroupType);
82
83     /**
84      * Check for the given config-description-{@link URI} whether it is excluded by
85      * this {@link HomematicThingTypeExcluder} or not
86      *
87      * @param configDescriptionURI a specific ConfigDescription, specified by a unique {@link URI}
88      * @return <i>true</i>, if the {@link org.openhab.core.config.core.ConfigDescription} is
89      *         excluded
90      */
91     boolean isConfigDescriptionExcluded(URI configDescriptionURI);
92 }