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.zway.internal.config;
15 import static org.openhab.binding.zway.internal.ZWayBindingConstants.*;
17 import org.eclipse.jdt.annotation.NonNullByDefault;
18 import org.eclipse.jdt.annotation.Nullable;
21 * The {@link ZWayBridgeConfiguration} class defines the model for a bridge configuration.
23 * @author Patrick Hecker - Initial contribution, remove openHAB configuration
26 public class ZWayBridgeConfiguration {
27 private String zwayServerIpAddress = "localhost";
28 private Integer zwayServerPort = 8083;
29 private String zwayServerProtocol = "http";
31 private String zwayServerUsername = "admin";
32 private @Nullable String zwayServerPassword;
34 private Integer pollingInterval = 3600;
36 public String getZWayIpAddress() {
37 return zwayServerIpAddress;
40 public void setZWayIpAddress(String ipAddress) {
41 this.zwayServerIpAddress = ipAddress;
44 public Integer getZWayPort() {
45 return zwayServerPort;
48 public void setZWayPort(Integer port) {
49 this.zwayServerPort = port;
52 public String getZWayProtocol() {
53 return zwayServerProtocol;
56 public void setZWayProtocol(String protocol) {
57 this.zwayServerProtocol = protocol;
60 public String getZWayUsername() {
61 return zwayServerUsername;
64 public void setZWayUsername(String username) {
65 this.zwayServerUsername = username;
68 public @Nullable String getZWayPassword() {
69 return zwayServerPassword;
72 public void setZWayPassword(String password) {
73 this.zwayServerPassword = password;
76 public Integer getPollingInterval() {
77 return pollingInterval;
80 public void setPollingInterval(Integer pollingInterval) {
81 this.pollingInterval = pollingInterval;
85 public String toString() {
86 return getClass().getSimpleName() + "{ " + BRIDGE_CONFIG_ZWAY_SERVER_IP_ADDRESS + "=" + getZWayIpAddress()
87 + ", " + BRIDGE_CONFIG_ZWAY_SERVER_PORT + "=" + getZWayPort() + ", "
88 + BRIDGE_CONFIG_ZWAY_SERVER_PROTOCOL + "=" + getZWayProtocol() + ", "
89 + BRIDGE_CONFIG_ZWAY_SERVER_USERNAME + "=" + getZWayUsername() + ", "
90 + BRIDGE_CONFIG_ZWAY_SERVER_PASSWORD + "=" + getZWayPassword() + ", " + BRIDGE_CONFIG_POLLING_INTERVAL
91 + "=" + this.getPollingInterval() + "}";