Skip to content
Snippets Groups Projects
Commit 920f2416 authored by Martin Stähr's avatar Martin Stähr
Browse files

feat: implement dummy functions

parent 2e5d49aa
No related branches found
No related tags found
No related merge requests found
......@@ -44,7 +44,7 @@ public class UserService {
return registrationError();
}
}
/**
* checks if a user exists in order to log him in
*
......
......@@ -6,38 +6,46 @@ import unipotsdam.gf.modules.communication.model.Message;
import unipotsdam.gf.modules.communication.model.chat.ChatMessage;
import unipotsdam.gf.modules.communication.model.chat.ChatRoom;
import java.time.Instant;
import java.util.ArrayList;
import java.util.List;
public class CommunicationDummyService implements ICommunication {
@Override
public List<ChatMessage> getChatHistory(String roomId) {
return null;
ArrayList<ChatMessage> chatMessages = new ArrayList<>();
int maxValue = 6;
for (int i = 1;i <= maxValue;i++) {
chatMessages.add(new ChatMessage(String.valueOf(i+1), "Dies ist ein Test" + i + " .",
Instant.now().minusSeconds(maxValue * 10 - i * 10),"testUser" + i));
}
return chatMessages;
}
@Override
public boolean sendMessageToChat(Message message) {
return false;
throw new RuntimeException("Do not call this method without implementation");
}
@Override
public String createChatRoom(String name, List<User> studentIdentifierList) {
return null;
return "1";
}
@Override
public boolean addUserToChatRoom(String roomId, User user) {
return false;
throw new RuntimeException("Do not call this method without implementation");
}
@Override
public boolean setChatRoomTopic(String roomId, String topic) {
return false;
throw new RuntimeException("Do not call this method without implementation");
}
@Override
public ChatRoom getChatRoomInfo(String roomId) {
return null;
return new ChatRoom("1", "test");
}
@Override
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment