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 {
43 public Device getDevice();
45 public String createNotification(Notification notification) throws NotificationCreationException;
47 public List<Notification> getNotifications();
49 public @Nullable Notification getCurrentNotification();
51 public Notification getNotification(String id) throws NotificationNotFoundException;
53 public void deleteNotification(String id) throws NotificationNotFoundException;
55 public Display getDisplay();
57 public Display updateDisplay(Display display) throws UpdateException;
59 public Audio getAudio();
61 public Audio updateAudio(Audio audio) throws UpdateException;
63 public Bluetooth getBluetooth();
65 public Bluetooth updateBluetooth(Bluetooth bluetooth) throws UpdateException;
67 public Wifi getWifi();
69 public void updateApplication(String packageName, String accessToken, WidgetUpdates widgetUpdates)
70 throws UpdateException;
72 public SortedMap<String, Application> getApplications();
74 public @Nullable Application getApplication(String packageName) throws ApplicationNotFoundException;
76 public void activatePreviousApplication();
78 public void activateNextApplication();
80 public void activateApplication(String packageName, String widgetId) throws ApplicationActivationException;
82 public void doAction(String packageName, String widgetId, @Nullable UpdateAction action)
83 throws ApplicationActionException;
85 public static LaMetricTimeLocal create(LocalConfiguration config) {
86 return new LaMetricTimeLocalImpl(config);
89 public static LaMetricTimeLocal create(LocalConfiguration config, ClientBuilder clientBuilder) {
90 return new LaMetricTimeLocalImpl(config, clientBuilder);