2 * Copyright (c) 2010-2022 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.zway.internal.config;
15 import static org.openhab.binding.zway.internal.ZWayBindingConstants.*;
17 import org.apache.commons.lang3.builder.ToStringBuilder;
20 * The {@link ZWayBridgeConfiguration} class defines the model for a bridge configuration.
22 * @author Patrick Hecker - Initial contribution, remove openHAB configuration
24 public class ZWayBridgeConfiguration {
25 private String zwayServerIpAddress;
26 private Integer zwayServerPort;
27 private String zwayServerProtocol;
29 private String zwayServerUsername;
30 private String zwayServerPassword;
32 private Integer pollingInterval;
34 public String getZWayIpAddress() {
35 return zwayServerIpAddress;
38 public void setZWayIpAddress(String ipAddress) {
39 this.zwayServerIpAddress = ipAddress;
42 public Integer getZWayPort() {
43 return zwayServerPort;
46 public void setZWayPort(Integer port) {
47 this.zwayServerPort = port;
50 public String getZWayProtocol() {
51 return zwayServerProtocol;
54 public void setZWayProtocol(String protocol) {
55 this.zwayServerProtocol = protocol;
58 public String getZWayUsername() {
59 return zwayServerUsername;
62 public void setZWayUsername(String username) {
63 this.zwayServerUsername = username;
66 public String getZWayPassword() {
67 return zwayServerPassword;
70 public void setZWayPassword(String password) {
71 this.zwayServerPassword = password;
74 public Integer getPollingInterval() {
75 return pollingInterval;
78 public void setPollingInterval(Integer pollingInterval) {
79 this.pollingInterval = pollingInterval;
83 public String toString() {
84 return new ToStringBuilder(this).append(BRIDGE_CONFIG_ZWAY_SERVER_IP_ADDRESS, this.getZWayIpAddress())
85 .append(BRIDGE_CONFIG_ZWAY_SERVER_PORT, this.getZWayPort())
86 .append(BRIDGE_CONFIG_ZWAY_SERVER_PROTOCOL, this.getZWayProtocol())
87 .append(BRIDGE_CONFIG_ZWAY_SERVER_USERNAME, this.getZWayUsername())
88 .append(BRIDGE_CONFIG_ZWAY_SERVER_PASSWORD, this.getZWayPassword())
89 .append(BRIDGE_CONFIG_POLLING_INTERVAL, this.getPollingInterval()).toString();