2 * Copyright (c) 2010-2021 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.unifi.internal;
15 import org.apache.commons.lang.StringUtils;
16 import org.openhab.binding.unifi.internal.handler.UniFiControllerThingHandler;
19 * The {@link UniFiControllerThingConfig} encapsulates all the configuration options for an instance of the
20 * {@link UniFiControllerThingHandler}.
22 * @author Matthew Bowman - Initial contribution
24 public class UniFiControllerThingConfig {
26 private String host = "unifi";
28 private int port = 8443;
30 private String username = "";
32 private String password = "";
34 private int refresh = 10;
36 public String getHost() {
40 public int getPort() {
44 public String getUsername() {
48 public String getPassword() {
52 public int getRefresh() {
56 public boolean isValid() {
57 return StringUtils.isNotBlank(host) && StringUtils.isNotBlank(username) && StringUtils.isNotBlank(password);
61 public String toString() {
62 return "UniFiControllerConfig{host = " + host + ", port = " + port + ", username = " + username
63 + ", password = *****, refresh = " + refresh + "}";