2 * Copyright 2017-2018 Gregory Moyer and contributors.
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
16 package org.openhab.binding.lametrictime.api.local;
18 import java.util.List;
19 import java.util.SortedMap;
21 import javax.ws.rs.client.ClientBuilder;
23 import org.openhab.binding.lametrictime.api.local.impl.LaMetricTimeLocalImpl;
24 import org.openhab.binding.lametrictime.api.local.model.Api;
25 import org.openhab.binding.lametrictime.api.local.model.Application;
26 import org.openhab.binding.lametrictime.api.local.model.Audio;
27 import org.openhab.binding.lametrictime.api.local.model.Bluetooth;
28 import org.openhab.binding.lametrictime.api.local.model.Device;
29 import org.openhab.binding.lametrictime.api.local.model.Display;
30 import org.openhab.binding.lametrictime.api.local.model.Notification;
31 import org.openhab.binding.lametrictime.api.local.model.UpdateAction;
32 import org.openhab.binding.lametrictime.api.local.model.WidgetUpdates;
33 import org.openhab.binding.lametrictime.api.local.model.Wifi;
35 public interface LaMetricTimeLocal
39 public Device getDevice();
41 public String createNotification(Notification notification) throws NotificationCreationException;
43 public List<Notification> getNotifications();
45 public Notification getCurrentNotification();
47 public Notification getNotification(String id) throws NotificationNotFoundException;
49 public void deleteNotification(String id) throws NotificationNotFoundException;
51 public Display getDisplay();
53 public Display updateDisplay(Display display) throws UpdateException;
55 public Audio getAudio();
57 public Audio updateAudio(Audio audio) throws UpdateException;
59 public Bluetooth getBluetooth();
61 public Bluetooth updateBluetooth(Bluetooth bluetooth) throws UpdateException;
63 public Wifi getWifi();
65 public void updateApplication(String packageName,
67 WidgetUpdates widgetUpdates) throws UpdateException;
69 public SortedMap<String, Application> getApplications();
71 public Application getApplication(String packageName) throws ApplicationNotFoundException;
73 public void activatePreviousApplication();
75 public void activateNextApplication();
77 public void activateApplication(String packageName,
78 String widgetId) throws ApplicationActivationException;
80 public void doAction(String packageName,
82 UpdateAction action) throws ApplicationActionException;
84 public static LaMetricTimeLocal create(LocalConfiguration config)
86 return new LaMetricTimeLocalImpl(config);
89 public static LaMetricTimeLocal create(LocalConfiguration config, ClientBuilder clientBuilder)
91 return new LaMetricTimeLocalImpl(config, clientBuilder);