From 081606e391a352d8117210d731d252dfb43c4b84 Mon Sep 17 00:00:00 2001
From: ulrich
Date: Mon, 05 Apr 2021 10:00:45 +0000
Subject: [PATCH] FileStorage und Interface Storage

---
 src/de/uhilger/mediaz/api/StoreTestHandler.java |    9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/src/de/uhilger/mediaz/api/StoreTestHandler.java b/src/de/uhilger/mediaz/api/StoreTestHandler.java
index e1da7c3..af7f54c 100644
--- a/src/de/uhilger/mediaz/api/StoreTestHandler.java
+++ b/src/de/uhilger/mediaz/api/StoreTestHandler.java
@@ -7,14 +7,15 @@
 
 import com.sun.net.httpserver.HttpExchange;
 import com.sun.net.httpserver.HttpHandler;
-import de.uhilger.mediaz.conf.Store;
+import de.uhilger.mediaz.App;
+import de.uhilger.mediaz.store.FileStorage;
 import de.uhilger.mediaz.entity.Ablageort;
-import de.uhilger.mediaz.entity.ConfigurationElement;
 import java.io.File;
 import java.io.IOException;
 import java.io.OutputStream;
 import java.util.logging.Level;
 import java.util.logging.Logger;
+import de.uhilger.mediaz.entity.Entity;
 
 /**
  *
@@ -31,10 +32,10 @@
     ort.setName("Katalog");
     ort.setOrt("/home/ulrich/Videos");
     ort.setUrl("/media/test");
-    Store store = new Store();
+    FileStorage store = new FileStorage(App.getInitParameter(App.getRs(App.RB_AP_CONF)));
     File file = store.writeToFile(ort);
     try {
-      ConfigurationElement elem = store.readFromFile(file);
+      Entity elem = store.readFromFile(file);
       logger.log(Level.INFO, "Typ: {0}, Name: {1}", 
               new Object[]{elem.getClass().getSimpleName(), elem.getName()});
     } catch (ClassNotFoundException ex) {

--
Gitblit v1.9.3