Commit 2525107c authored by Julian Hochstetter's avatar Julian Hochstetter
Browse files

Task #3918: add unimplemented methods

parent 27ec7917
......@@ -10,6 +10,7 @@ import org.springframework.stereotype.Component;
import de.thm.arsnova.entities.Feedback;
import de.thm.arsnova.entities.Session;
import de.thm.arsnova.entities.User;
import de.thm.arsnova.socket.message.Question;
@Component
@Scope("singleton")
......@@ -17,6 +18,7 @@ public class StubDatabaseDao implements IDatabaseDao {
private Map<String, Session> stubSessions = new ConcurrentHashMap<String, Session>();
private Map<String, Feedback> stubFeedbacks = new ConcurrentHashMap<String, Feedback>();
private Map<Session, Question> stubQuestions = new ConcurrentHashMap<Session, Question>();
public StubDatabaseDao() {
fillWithDummySessions();
......@@ -95,4 +97,15 @@ public class StubDatabaseDao implements IDatabaseDao {
return (stubSessions.get(keyword) == null);
}
@Override
public Session getSessionFromKeyword(String keyword) {
return stubSessions.get(keyword);
}
@Override
public boolean saveQuestion(Session session, Question question) {
stubQuestions.put(session, question);
return stubQuestions.get(session) != null;
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment