diff --git a/app/src/main/java/lightcontainer/storage/Repository.java b/app/src/main/java/lightcontainer/storage/Repository.java index 324b125..6f2d6f2 100644 --- a/app/src/main/java/lightcontainer/storage/Repository.java +++ b/app/src/main/java/lightcontainer/storage/Repository.java @@ -39,6 +39,38 @@ public class Repository { } } + public boolean addUser(String login, String password, String key) { + if (appData.addUser(login, password, key)) { + save(); + return true; + } + return false; + } + + public boolean addFileFor(File file, String userName) { + if (appData.addFileFor(file, userName)) { + save(); + return true; + } + return false; + } + + public boolean deleteFileOf(String fileName, String userName) { + if (appData.deleteFileOf(fileName, userName)) { + save(); + return true; + } + return false; + } + + public boolean addStorage(String userName, File file, String storage) { + if (appData.addStorage(userName, file, storage)) { + save(); + return true; + } + return false; + } + /** * Loads configuration file