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.lametrictime.internal.api.local;
15 import java.util.List;
16 import java.util.SortedMap;
18 import javax.ws.rs.client.ClientBuilder;
20 import org.eclipse.jdt.annotation.NonNullByDefault;
21 import org.eclipse.jdt.annotation.Nullable;
22 import org.openhab.binding.lametrictime.internal.api.local.dto.Api;
23 import org.openhab.binding.lametrictime.internal.api.local.dto.Application;
24 import org.openhab.binding.lametrictime.internal.api.local.dto.Audio;
25 import org.openhab.binding.lametrictime.internal.api.local.dto.Bluetooth;
26 import org.openhab.binding.lametrictime.internal.api.local.dto.Device;
27 import org.openhab.binding.lametrictime.internal.api.local.dto.Display;
28 import org.openhab.binding.lametrictime.internal.api.local.dto.Notification;
29 import org.openhab.binding.lametrictime.internal.api.local.dto.UpdateAction;
30 import org.openhab.binding.lametrictime.internal.api.local.dto.WidgetUpdates;
31 import org.openhab.binding.lametrictime.internal.api.local.dto.Wifi;
32 import org.openhab.binding.lametrictime.internal.api.local.impl.LaMetricTimeLocalImpl;
35 * Interface for local device access.
37 * @author Gregory Moyer - Initial contribution
40 public interface LaMetricTimeLocal {
45 String createNotification(Notification notification) throws NotificationCreationException;
47 List<Notification> getNotifications();
50 Notification getCurrentNotification();
52 Notification getNotification(String id) throws NotificationNotFoundException;
54 void deleteNotification(String id) throws NotificationNotFoundException;
58 Display updateDisplay(Display display) throws UpdateException;
62 Audio updateAudio(Audio audio) throws UpdateException;
64 Bluetooth getBluetooth();
66 Bluetooth updateBluetooth(Bluetooth bluetooth) throws UpdateException;
70 void updateApplication(String packageName, String accessToken, WidgetUpdates widgetUpdates) throws UpdateException;
72 SortedMap<String, Application> getApplications();
75 Application getApplication(String packageName) throws ApplicationNotFoundException;
77 void activatePreviousApplication();
79 void activateNextApplication();
81 void activateApplication(String packageName, String widgetId) throws ApplicationActivationException;
83 void doAction(String packageName, String widgetId, @Nullable UpdateAction action) throws ApplicationActionException;
85 static LaMetricTimeLocal create(LocalConfiguration config) {
86 return new LaMetricTimeLocalImpl(config);
89 static LaMetricTimeLocal create(LocalConfiguration config, ClientBuilder clientBuilder) {
90 return new LaMetricTimeLocalImpl(config, clientBuilder);