2 * Copyright (c) 2010-2023 Contributors to the openHAB project
4 * See the NOTICE file(s) distributed with this work for additional
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
11 * SPDX-License-Identifier: EPL-2.0
13 package org.openhab.binding.somfytahoma.internal.model;
15 import java.util.ArrayList;
16 import java.util.List;
18 import org.eclipse.jdt.annotation.NonNullByDefault;
21 * The {@link SomfyTahomaDeviceDefinition} holds information about a device definition.
23 * @author Ondrej Pecta - Initial contribution
26 public class SomfyTahomaDeviceDefinition {
28 private List<SomfyTahomaDeviceDefinitionCommand> commands = new ArrayList<>();
29 private List<SomfyTahomaDeviceDefinitionState> states = new ArrayList<>();
31 public List<SomfyTahomaDeviceDefinitionCommand> getCommands() {
35 public List<SomfyTahomaDeviceDefinitionState> getStates() {
39 private String widgetName = "";
41 private String uiClass = "";
43 public String getWidgetName() {
47 public String getUiClass() {
51 public void setWidgetName(String widgetName) {
52 this.widgetName = widgetName;
56 public String toString() {
57 StringBuilder sb = new StringBuilder();
58 sb.append("Commands: { ");
59 for (SomfyTahomaDeviceDefinitionCommand cmd : commands) {
60 sb.append(cmd.toString()).append("; ");
63 sb.append("}\nStates: {");
64 for (SomfyTahomaDeviceDefinitionState state : states) {
65 sb.append(state.toString()).append("; ");