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.unifi.internal;
15 import org.apache.commons.lang.StringUtils;
16 import org.openhab.binding.unifi.internal.handler.UniFiClientThingHandler;
19 * The {@link UniFiClientThingConfig} encapsulates all the configuration options for an instance of the
20 * {@link UniFiClientThingHandler}.
22 * @author Matthew Bowman - Initial contribution
24 public class UniFiClientThingConfig {
26 private String cid = "";
28 private String site = "";
30 private int considerHome = 180;
32 public String getClientID() {
36 public String getSite() {
40 public int getConsiderHome() {
44 public UniFiClientThingConfig tidy() {
45 cid = StringUtils.lowerCase(StringUtils.strip(cid));
46 site = StringUtils.lowerCase(StringUtils.strip(site));
50 public boolean isValid() {
51 return StringUtils.isNotBlank(cid);
55 public String toString() {
56 return String.format("UniFiClientConfig{cid: '%s', site: '%s', considerHome: %d}", cid, site, considerHome);