From a0513fd29cba8f86423c4cd0da210c2c4d676968 Mon Sep 17 00:00:00 2001
From: tudtianus <tudtianus@gmail.com>
Date: Sat, 9 Jun 2018 10:11:58 +0200
Subject: [PATCH] fix: Updated Journal Interface

---
 .../unipotsdam/gf/interfaces/IJournal.java    | 59 ++----------
 .../gf/modules/journal/JournalEntry.java      | 89 -------------------
 2 files changed, 7 insertions(+), 141 deletions(-)
 delete mode 100644 gemeinsamforschen/src/main/java/unipotsdam/gf/modules/journal/JournalEntry.java

diff --git a/gemeinsamforschen/src/main/java/unipotsdam/gf/interfaces/IJournal.java b/gemeinsamforschen/src/main/java/unipotsdam/gf/interfaces/IJournal.java
index af88032c..af66e583 100644
--- a/gemeinsamforschen/src/main/java/unipotsdam/gf/interfaces/IJournal.java
+++ b/gemeinsamforschen/src/main/java/unipotsdam/gf/interfaces/IJournal.java
@@ -1,63 +1,18 @@
 package unipotsdam.gf.interfaces;
 
-import unipotsdam.gf.modules.journal.JournalEntry;
+import unipotsdam.gf.modules.assessment.controller.StudentIdentifier;
 
 /**
- * Interface for learning journal entry
+ * Interface for learning journal
  */
-public interface IJournal {
-
-    /**
-     * Enum for visibility
-     */
-    enum Visibility{ALL, STUDENT, DOZENT, NONE}
-
-
-    /**
-     * Add a new journal entry
-     *
-     * @param text text of the entry
-     * @param visibility visibility of the entry
-     */
-    void addJournal(String text, Visibility visibility);
-
-    /**
-     * Change an existing journal entry
-     *
-      * @param newText the new text
-     */
-    void editJournal(String newText);
 
-    /**
-     * Delete a journal entry
-     *
-     * @param journaId id of the entry
-     */
-    void deleteJournal(long journaId);
-
-    /**
-     * change visibility of an entry
-     * @param journaId id of the entry
-     * @param visibility new visibility
-     */
-    void setVisibility(long journaId, Visibility visibility);
-
-    /**
-
-     * Get specific journal entry
-     *
-     * @param journaId id of the entry
-     * @return JournalEntry from database
-     */
-    JournalEntry getJournal(long journaId);
+public interface IJournal {
 
     /**
-     * Get all JournalEntry for a project
-     *
-     * @param projectId id of project
-     * @return all JournalEnrys for that project
+     * Exports the learning journal
+     * @param student StudentIdentifier
+     * @return the journal as String (may change)
      */
-    JournalEntry getAllJournalEntrysProject(long projectId);
-
+    String exportJournal (StudentIdentifier student);
 
 }
diff --git a/gemeinsamforschen/src/main/java/unipotsdam/gf/modules/journal/JournalEntry.java b/gemeinsamforschen/src/main/java/unipotsdam/gf/modules/journal/JournalEntry.java
deleted file mode 100644
index 496f0418..00000000
--- a/gemeinsamforschen/src/main/java/unipotsdam/gf/modules/journal/JournalEntry.java
+++ /dev/null
@@ -1,89 +0,0 @@
-package unipotsdam.gf.modules.journal;
-
-import unipotsdam.gf.interfaces.IJournal;
-
-/**
- * Prototype of JournalEntry Class
- */
-public class JournalEntry {
-
-    long id;
-    long owner;
-    long project;
-    long timestamp;
-    IJournal.Visibility visibility;
-    String text;
-
-
-    public JournalEntry() {
-    }
-
-    public JournalEntry(long id, long owner, long project, long timestamp, IJournal.Visibility visibility, String text) {
-        this.id = id;
-        this.owner = owner;
-        this.project = project;
-        this.timestamp = timestamp;
-        this.visibility = visibility;
-        this.text = text;
-    }
-
-    public long getId() {
-        return id;
-    }
-
-    public void setId(long id) {
-        this.id = id;
-    }
-
-    public long getOwner() {
-        return owner;
-    }
-
-    public void setOwner(long owner) {
-        this.owner = owner;
-    }
-
-    public long getProject() {
-        return project;
-    }
-
-    public void setProject(long project) {
-        this.project = project;
-    }
-
-    public long getTimestamp() {
-        return timestamp;
-    }
-
-    public void setTimestamp(long timestamp) {
-        this.timestamp = timestamp;
-    }
-
-    public IJournal.Visibility getVisibility() {
-        return visibility;
-    }
-
-    public void setVisibility(IJournal.Visibility visibility) {
-        this.visibility = visibility;
-    }
-
-    public String getText() {
-        return text;
-    }
-
-    public void setText(String text) {
-        this.text = text;
-    }
-
-    @Override
-    public String toString() {
-        return "JournalEntry{" +
-                "id=" + id +
-                ", owner=" + owner +
-                ", project=" + project +
-                ", timestamp=" + timestamp +
-                ", visibility=" + visibility +
-                ", text='" + text + '\'' +
-                '}';
-    }
-}
-- 
GitLab