]> git.basschouten.com Git - openhab-addons.git/blob
3604966c0cca675cbfede82196f774f98c430b7c
[openhab-addons.git] /
1 /**
2  * Copyright (c) 2010-2020 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.zoneminder.internal.config;
14
15 import org.openhab.binding.zoneminder.internal.ZoneMinderConstants;
16
17 /**
18  * Configuration data according to zoneminderserver.xml
19  *
20  * @author Martin S. Eskildsen - Initial contribution
21  */
22 public class ZoneMinderBridgeServerConfig extends ZoneMinderConfig {
23
24     private String hostname;
25     private Integer http_port;
26     private Integer telnet_port;
27
28     private String protocol;
29
30     private String urlpath;
31
32     private String user;
33     private String password;
34     private Integer refresh_interval;
35     private Integer refresh_interval_disk_usage;
36     private Boolean autodiscover_things;
37
38     @Override
39     public String getConfigId() {
40         return ZoneMinderConstants.BRIDGE_ZONEMINDER_SERVER;
41     }
42
43     public String getHostName() {
44         return hostname;
45     }
46
47     public void setHostName(String hostName) {
48         this.hostname = hostName;
49     }
50
51     public Integer getHttpPort() {
52         if ((http_port == null) || (http_port == 0)) {
53             if (getProtocol().equalsIgnoreCase("http")) {
54                 http_port = 80;
55             } else {
56                 http_port = 443;
57             }
58         }
59         return http_port;
60     }
61
62     public void setHttpPort(Integer port) {
63         this.http_port = port;
64     }
65
66     public Integer getTelnetPort() {
67         return telnet_port;
68     }
69
70     public void setTelnetPort(Integer telnetPort) {
71         this.telnet_port = telnetPort;
72     }
73
74     public String getProtocol() {
75         return protocol;
76     }
77
78     public void setProtocol(String protocol) {
79         this.protocol = protocol;
80     }
81
82     public String getServerBasePath() {
83         return urlpath;
84     }
85
86     public void setServerBasePath(String urlpath) {
87         this.urlpath = urlpath;
88     }
89
90     public String getUserName() {
91         return user;
92     }
93
94     public void setUserName(String userName) {
95         this.user = userName;
96     }
97
98     public String getPassword() {
99         return password;
100     }
101
102     public void setPassword(String password) {
103         this.password = password;
104     }
105
106     public Integer getRefreshInterval() {
107         return refresh_interval;
108     }
109
110     public void setRefreshInterval(Integer refreshInterval) {
111         this.refresh_interval = refreshInterval;
112     }
113
114     public Integer getRefreshIntervalLowPriorityTask() {
115         return refresh_interval_disk_usage;
116     }
117
118     public void setRefreshIntervalDiskUsage(Integer refreshIntervalDiskUsage) {
119         this.refresh_interval_disk_usage = refreshIntervalDiskUsage;
120     }
121
122     public Boolean getAutodiscoverThings() {
123         return autodiscover_things;
124     }
125
126     public void setAutodiscoverThings(Boolean autodiscoverThings) {
127         this.autodiscover_things = autodiscoverThings;
128     }
129 }