]> git.basschouten.com Git - openhab-addons.git/blob
a725be8578f6970f8c5594ad978c6b1c8cf2e206
[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.api.dto.clip1;
14
15 /**
16  * Basic group information.
17  *
18  * @author Q42 - Initial contribution
19  * @author Denis Dudnik - moved Jue library source code inside the smarthome Hue binding
20  * @author Laurent Garnier - field type added
21  */
22 public class Group {
23     private String id;
24     private String name;
25     private String type;
26
27     public Group() {
28         this.id = "0";
29         this.name = "Lightset 0";
30         this.type = "LightGroup";
31     }
32
33     /**
34      * Test constructor
35      */
36     Group(String id, String name, String type) {
37         this.id = id;
38         this.name = name;
39         this.type = type;
40     }
41
42     public void setName(String name) {
43         this.name = name;
44     }
45
46     public void setId(String id) {
47         this.id = id;
48     }
49
50     void setType(String type) {
51         this.type = type;
52     }
53
54     /**
55      * Returns if the group can be modified.
56      * Currently only returns false for the all lights pseudo group.
57      *
58      * @return modifiability of group
59      */
60     public boolean isModifiable() {
61         return !"0".equals(id);
62     }
63
64     /**
65      * Returns the id of the group.
66      *
67      * @return id
68      */
69     public String getId() {
70         return id;
71     }
72
73     /**
74      * Returns the name of the group.
75      *
76      * @return name
77      */
78     public String getName() {
79         return name;
80     }
81
82     /**
83      * Returns the tyoe of the group.
84      *
85      * @return type
86      */
87     public String getType() {
88         return type;
89     }
90 }