Define interfaces with only getters for the updates

This also changes the code to use the new interfaces wherever the
update is not supposed to change.
This commit is contained in:
Gabriele M
2017-07-21 01:17:19 +02:00
parent 11f82cfb87
commit 28b8774db6
11 changed files with 153 additions and 68 deletions

View File

@@ -15,20 +15,20 @@
*/
package org.lineageos.updater.controller;
import org.lineageos.updater.model.UpdateDownload;
import org.lineageos.updater.model.UpdateInfo;
import java.util.List;
import java.util.Set;
public interface Controller {
boolean addUpdate(UpdateDownload update);
boolean addUpdate(UpdateInfo update);
List<UpdateDownload> getUpdates();
List<UpdateInfo> getUpdates();
Set<String> getIds();
UpdateDownload getUpdate(String downloadId);
UpdateInfo getUpdate(String downloadId);
void setUpdatesAvailableOnline(List<String> downloadIds, boolean purgeList);