]> git.basschouten.com Git - openhab-addons.git/blob
bb85453f258e9f9669d7909a9e8097246c884aeb
[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.hue.internal.handler;
14
15 import java.util.List;
16
17 import org.eclipse.jdt.annotation.NonNullByDefault;
18 import org.openhab.binding.hue.internal.dto.FullGroup;
19 import org.openhab.binding.hue.internal.dto.Scene;
20
21 /**
22  * The {@link GroupStatusListener} is notified when a group status has changed or a group has been removed or added.
23  *
24  * @author Laurent Garnier - Initial contribution
25  */
26 @NonNullByDefault
27 public interface GroupStatusListener {
28
29     /**
30      * This method returns the group id of listener
31      *
32      * @return groupId String
33      */
34     String getGroupId();
35
36     /**
37      * This method is called whenever the state of the given group has changed. The new state can be obtained by
38      * {@link FullGroup#getState()}.
39      *
40      * @param group The group which received the state update.
41      * @return
42      */
43     boolean onGroupStateChanged(FullGroup group);
44
45     /**
46      * This method is called whenever a group is removed.
47      */
48     void onGroupRemoved();
49
50     /**
51      * This method is called whenever a group is reported as gone.
52      */
53     void onGroupGone();
54
55     /**
56      * This method is called whenever a group is added.
57      *
58      * @param group The added group
59      */
60     void onGroupAdded(FullGroup group);
61
62     /**
63      * This method is called whenever the list of available scenes is updated.
64      *
65      * @param updatedScenes available scenes
66      */
67     void onScenesUpdated(List<Scene> scenes);
68 }