2 * Copyright (c) 2010-2023 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.ojelectronics.internal.config;
15 import org.eclipse.jdt.annotation.NonNullByDefault;
16 import org.eclipse.jdt.annotation.Nullable;
19 * The configuration for {@link org.openhab.binding.ojelectronics.internal.OJElectronicsCloudHandler}
21 * @author Christian Kittel - Initial contribution
24 public class OJElectronicsBridgeConfiguration {
29 public String password = "";
34 public int customerId = 1;
39 public String userName = "";
44 private String apiUrl = "https://OWD5-OJ001-App.ojelectronics.com";
49 public String apiKey = "";
54 public int softwareVersion = 1060;
56 private @Nullable String restApiUrl;
61 public String getRestApiUrl() {
62 String localRestApiUrl = restApiUrl;
63 if (localRestApiUrl == null) {
64 localRestApiUrl = restApiUrl = apiUrl.replace("/api", "") + "/api";
66 return localRestApiUrl;
69 private @Nullable String signalRApiUrl;
72 * Gets the SignalR Notification URL
74 public String getSignalRUrl() {
75 String localSignalRApiUrl = signalRApiUrl;
76 if (localSignalRApiUrl == null) {
77 localSignalRApiUrl = signalRApiUrl = apiUrl.replace("/api", "") + "/ocd5notification";
79 return localSignalRApiUrl;