2 * Copyright (c) 2010-2020 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.zoneminder.internal.config;
15 import org.openhab.binding.zoneminder.internal.ZoneMinderConstants;
18 * Configuration data according to zoneminderserver.xml
20 * @author Martin S. Eskildsen - Initial contribution
22 public class ZoneMinderBridgeServerConfig extends ZoneMinderConfig {
24 private String hostname;
25 private Integer http_port;
26 private Integer telnet_port;
28 private String protocol;
30 private String urlpath;
33 private String password;
34 private Integer refresh_interval;
35 private Integer refresh_interval_disk_usage;
36 private Boolean autodiscover_things;
39 public String getConfigId() {
40 return ZoneMinderConstants.BRIDGE_ZONEMINDER_SERVER;
43 public String getHostName() {
47 public void setHostName(String hostName) {
48 this.hostname = hostName;
51 public Integer getHttpPort() {
52 if ((http_port == null) || (http_port == 0)) {
53 if (getProtocol().equalsIgnoreCase("http")) {
62 public void setHttpPort(Integer port) {
63 this.http_port = port;
66 public Integer getTelnetPort() {
70 public void setTelnetPort(Integer telnetPort) {
71 this.telnet_port = telnetPort;
74 public String getProtocol() {
78 public void setProtocol(String protocol) {
79 this.protocol = protocol;
82 public String getServerBasePath() {
86 public void setServerBasePath(String urlpath) {
87 this.urlpath = urlpath;
90 public String getUserName() {
94 public void setUserName(String userName) {
98 public String getPassword() {
102 public void setPassword(String password) {
103 this.password = password;
106 public Integer getRefreshInterval() {
107 return refresh_interval;
110 public void setRefreshInterval(Integer refreshInterval) {
111 this.refresh_interval = refreshInterval;
114 public Integer getRefreshIntervalLowPriorityTask() {
115 return refresh_interval_disk_usage;
118 public void setRefreshIntervalDiskUsage(Integer refreshIntervalDiskUsage) {
119 this.refresh_interval_disk_usage = refreshIntervalDiskUsage;
122 public Boolean getAutodiscoverThings() {
123 return autodiscover_things;
126 public void setAutodiscoverThings(Boolean autodiscoverThings) {
127 this.autodiscover_things = autodiscoverThings;