diff --git a/app/src/main/java/lightcontainer/storage/FileReader.java b/app/src/main/java/lightcontainer/storage/FileReader.java new file mode 100644 index 0000000..4e79a0b --- /dev/null +++ b/app/src/main/java/lightcontainer/storage/FileReader.java @@ -0,0 +1,6 @@ +package lightcontainer.storage; + +public interface FileReader { + + AppData readFile(String fileName); +} diff --git a/app/src/main/java/lightcontainer/storage/FileWriter.java b/app/src/main/java/lightcontainer/storage/FileWriter.java new file mode 100644 index 0000000..3cef3aa --- /dev/null +++ b/app/src/main/java/lightcontainer/storage/FileWriter.java @@ -0,0 +1,6 @@ +package lightcontainer.storage; + +public interface FileWriter { + + void writeToFile(String fileName, AppData appData); +} diff --git a/app/src/main/java/lightcontainer/storage/JsonReader.java b/app/src/main/java/lightcontainer/storage/JsonReader.java new file mode 100644 index 0000000..0b67603 --- /dev/null +++ b/app/src/main/java/lightcontainer/storage/JsonReader.java @@ -0,0 +1,9 @@ +package lightcontainer.storage; + +public class JsonReader implements FileReader { + + @Override + public AppData readFile(String fileName) { + return null; + } +} diff --git a/app/src/main/java/lightcontainer/storage/JsonRepository.java b/app/src/main/java/lightcontainer/storage/JsonRepository.java index a002404..c2c693d 100644 --- a/app/src/main/java/lightcontainer/storage/JsonRepository.java +++ b/app/src/main/java/lightcontainer/storage/JsonRepository.java @@ -4,12 +4,14 @@ public class JsonRepository implements Repository { @Override - public void save(String fileName, AppData data) { + public void save(FileWriter fileWriter) { } @Override - public AppData load(String fileName) { + public AppData load(FileReader fileReader) { return null; } + + } diff --git a/app/src/main/java/lightcontainer/storage/JsonWriter.java b/app/src/main/java/lightcontainer/storage/JsonWriter.java new file mode 100644 index 0000000..56fceb9 --- /dev/null +++ b/app/src/main/java/lightcontainer/storage/JsonWriter.java @@ -0,0 +1,9 @@ +package lightcontainer.storage; + +public class JsonWriter implements FileWriter { + + @Override + public void writeToFile(String fileName, AppData appData) { + + } +} diff --git a/app/src/main/java/lightcontainer/storage/Repository.java b/app/src/main/java/lightcontainer/storage/Repository.java index 79f19fd..b688fc7 100644 --- a/app/src/main/java/lightcontainer/storage/Repository.java +++ b/app/src/main/java/lightcontainer/storage/Repository.java @@ -2,7 +2,7 @@ package lightcontainer.storage; public interface Repository { - void save(String fileName, AppData data); + void save(FileWriter fileWriter); - AppData load(String fileName); + AppData load(FileReader fileReader); }