]> git.basschouten.com Git - openhab-addons.git/blob
9861cc4f9d87d91257ea0012ecf942d0e3bb4232
[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.zway.internal.config;
14
15 import static org.openhab.binding.zway.internal.ZWayBindingConstants.*;
16
17 import org.eclipse.jdt.annotation.NonNullByDefault;
18 import org.eclipse.jdt.annotation.Nullable;
19
20 /**
21  * The {@link ZWayBridgeConfiguration} class defines the model for a bridge configuration.
22  *
23  * @author Patrick Hecker - Initial contribution, remove openHAB configuration
24  */
25 @NonNullByDefault
26 public class ZWayBridgeConfiguration {
27     private String zwayServerIpAddress = "localhost";
28     private Integer zwayServerPort = 8083;
29     private String zwayServerProtocol = "http";
30
31     private String zwayServerUsername = "admin";
32     private @Nullable String zwayServerPassword;
33
34     private Integer pollingInterval = 3600;
35
36     public String getZWayIpAddress() {
37         return zwayServerIpAddress;
38     }
39
40     public void setZWayIpAddress(String ipAddress) {
41         this.zwayServerIpAddress = ipAddress;
42     }
43
44     public Integer getZWayPort() {
45         return zwayServerPort;
46     }
47
48     public void setZWayPort(Integer port) {
49         this.zwayServerPort = port;
50     }
51
52     public String getZWayProtocol() {
53         return zwayServerProtocol;
54     }
55
56     public void setZWayProtocol(String protocol) {
57         this.zwayServerProtocol = protocol;
58     }
59
60     public String getZWayUsername() {
61         return zwayServerUsername;
62     }
63
64     public void setZWayUsername(String username) {
65         this.zwayServerUsername = username;
66     }
67
68     public @Nullable String getZWayPassword() {
69         return zwayServerPassword;
70     }
71
72     public void setZWayPassword(String password) {
73         this.zwayServerPassword = password;
74     }
75
76     public Integer getPollingInterval() {
77         return pollingInterval;
78     }
79
80     public void setPollingInterval(Integer pollingInterval) {
81         this.pollingInterval = pollingInterval;
82     }
83
84     @Override
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() + "}";
92     }
93 }