GitLab steht Mittwoch, den 23. September, zwischen 10:00 und 12:00 Uhr aufgrund von Wartungsarbeiten nicht zur Verfügung.

Commit 1cf48f9f authored by Daniel Gerhardt's avatar Daniel Gerhardt

Use interface instead of implementation as return type

parent b55f2bf1
......@@ -27,6 +27,7 @@ import org.springframework.web.bind.annotation.ResponseBody;
import javax.servlet.http.HttpServletRequest;
import java.util.HashMap;
import java.util.Map;
/**
* The ConfigurationController provides frontend clients with information necessary to correctly interact with the
......@@ -161,11 +162,11 @@ public class ConfigurationController extends AbstractController {
@RequestMapping(method = RequestMethod.GET)
@ResponseBody
public HashMap<String, Object> getConfiguration(HttpServletRequest request) {
HashMap<String, Object> config = new HashMap<>();
HashMap<String, Boolean> features = new HashMap<>();
HashMap<String, String> publicPool = new HashMap<>();
HashMap<String, Object> splashscreen = new HashMap<>();
public Map<String, Object> getConfiguration(HttpServletRequest request) {
Map<String, Object> config = new HashMap<>();
Map<String, Boolean> features = new HashMap<>();
Map<String, String> publicPool = new HashMap<>();
Map<String, Object> splashscreen = new HashMap<>();
/* The API path could be unknown to the client in case the request was forwarded */
if ("".equals(apiPath)) {
......@@ -268,7 +269,7 @@ public class ConfigurationController extends AbstractController {
}
if (!"".equals(trackingTrackerUrl)) {
HashMap<String, String> tracking = new HashMap<>();
Map<String, String> tracking = new HashMap<>();
config.put("tracking", tracking);
tracking.put("provider", trackingProvider);
......
......@@ -21,6 +21,7 @@ import de.thm.arsnova.entities.Question;
import de.thm.arsnova.entities.Session;
import java.util.HashMap;
import java.util.Map;
/**
* Fires whenever voting on a question is disabled.
......@@ -48,8 +49,8 @@ public class LockVoteEvent extends SessionEvent {
return this.question.isVotingDisabled();
}
public HashMap<String, Object> getVotingAdmission() {
HashMap<String, Object> map = new HashMap<>();
public Map<String, Object> getVotingAdmission() {
Map<String, Object> map = new HashMap<>();
map.put("_id", getQuestionId());
map.put("variant", getQuestionVariant());
......
......@@ -21,6 +21,7 @@ import de.thm.arsnova.entities.Question;
import de.thm.arsnova.entities.Session;
import java.util.HashMap;
import java.util.Map;
/**
* Fires whenever a delayed peer instruction round is initiated. The delayed part denotes that this round might not
......@@ -69,8 +70,8 @@ public class PiRoundDelayedStartEvent extends SessionEvent {
return piRound;
}
public HashMap<String, Object> getPiRoundInformations() {
HashMap<String, Object> map = new HashMap<>();
public Map<String, Object> getPiRoundInformations() {
Map<String, Object> map = new HashMap<>();
map.put("_id", getQuestionId());
map.put("endTime", getEndTime());
......
......@@ -21,6 +21,7 @@ import de.thm.arsnova.entities.Question;
import de.thm.arsnova.entities.Session;
import java.util.HashMap;
import java.util.Map;
/**
* Fires whenever a peer instruction round has ended.
......@@ -51,8 +52,8 @@ public class PiRoundEndEvent extends SessionEvent {
return questionVariant;
}
public HashMap<String, String> getPiRoundEndInformations() {
HashMap<String, String> map = new HashMap<>();
public Map<String, String> getPiRoundEndInformations() {
Map<String, String> map = new HashMap<>();
map.put("_id", getQuestionId());
map.put("variant", getQuestionVariant());
......
......@@ -21,6 +21,7 @@ import de.thm.arsnova.entities.Question;
import de.thm.arsnova.entities.Session;
import java.util.HashMap;
import java.util.Map;
/**
* Fires whenever a peer instruction round is reset.
......@@ -51,8 +52,8 @@ public class PiRoundResetEvent extends SessionEvent {
return questionVariant;
}
public HashMap<String, String> getPiRoundResetInformations() {
HashMap<String, String> map = new HashMap<>();
public Map<String, String> getPiRoundResetInformations() {
Map<String, String> map = new HashMap<>();
map.put("_id", getQuestionId());
map.put("variant", getQuestionVariant());
......
......@@ -21,6 +21,7 @@ import de.thm.arsnova.entities.Question;
import de.thm.arsnova.entities.Session;
import java.util.HashMap;
import java.util.Map;
/**
* Fires whenever voting on a question is enabled.
......@@ -48,8 +49,8 @@ public class UnlockVoteEvent extends SessionEvent {
return this.question.isVotingDisabled();
}
public HashMap<String, Object> getVotingAdmission() {
HashMap<String, Object> map = new HashMap<>();
public Map<String, Object> getVotingAdmission() {
Map<String, Object> map = new HashMap<>();
map.put("_id", getQuestionId());
map.put("variant", getQuestionVariant());
......
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