]> git.basschouten.com Git - openhab-addons.git/blob
28934c05b3acc0499a6980ff7ace785e68c84557
[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.nibeuplink.internal.config;
14
15 import org.apache.commons.lang3.builder.ToStringBuilder;
16 import org.eclipse.jdt.annotation.NonNullByDefault;
17 import org.eclipse.jdt.annotation.Nullable;
18
19 /**
20  * Bean holding configuration data according to bridge.xml
21  *
22  * @author Alexander Friese - initial contribution
23  */
24 @NonNullByDefault
25 public class NibeUplinkConfiguration {
26
27     private @Nullable String user;
28     private @Nullable String password;
29     private @Nullable String nibeId;
30
31     private Integer asyncTimeout = 120;
32     private Integer syncTimeout = 120;
33     private Integer pollingInterval = 60;
34     private Integer houseKeepingInterval = 3600;
35
36     public @Nullable String getUser() {
37         return user;
38     }
39
40     public void setUser(String user) {
41         this.user = user;
42     }
43
44     public @Nullable String getPassword() {
45         return password;
46     }
47
48     public void setPassword(String password) {
49         this.password = password;
50     }
51
52     public @Nullable String getNibeId() {
53         return nibeId;
54     }
55
56     public void setNibeId(String nibeId) {
57         this.nibeId = nibeId;
58     }
59
60     public Integer getAsyncTimeout() {
61         return asyncTimeout;
62     }
63
64     public void setAsyncTimeout(Integer asyncTimeout) {
65         this.asyncTimeout = asyncTimeout;
66     }
67
68     public Integer getSyncTimeout() {
69         return syncTimeout;
70     }
71
72     public void setSyncTimeout(Integer syncTimeout) {
73         this.syncTimeout = syncTimeout;
74     }
75
76     public Integer getPollingInterval() {
77         return pollingInterval;
78     }
79
80     public void setPollingInterval(Integer pollingInterval) {
81         this.pollingInterval = pollingInterval;
82     }
83
84     public Integer getHouseKeepingInterval() {
85         return houseKeepingInterval;
86     }
87
88     public void setHouseKeepingInterval(Integer houseKeepingInterval) {
89         this.houseKeepingInterval = houseKeepingInterval;
90     }
91
92     @Override
93     public String toString() {
94         return new ToStringBuilder(this).append("user", getUser()).append("password", getPassword())
95                 .append("nibeId", getNibeId()).append("pollingInterval", getPollingInterval())
96                 .append("houseKeepingInterval", getHouseKeepingInterval()).append("asyncTimeout", getAsyncTimeout())
97                 .append("syncTimeout", getSyncTimeout()).toString();
98     }
99 }