Skip to content
Snippets Groups Projects
Commit 7564aac7 authored by Tjark Wilhelm Hoeck's avatar Tjark Wilhelm Hoeck Committed by Tom Käsler
Browse files

hide deprecated API's and paid technical debts for StatisticsController

parent 9ae7ccbc
Branches
Tags
No related merge requests found
......@@ -59,9 +59,9 @@ public class AudienceQuestionController extends PaginationController {
@Autowired
private IQuestionService questionService;
@ApiOperation(value = "Count all the questions in current session",
/*@ApiOperation(value = "Count all the questions in current session",
nickname = "getAudienceQuestionCount",
notes = "getInterposedCount(String sessionkey, String user)"/*,
notes = "getInterposedCount(String sessionkey, String user)",
authorizations = {
@Authorization(
value = "arsnovaoauth",
......@@ -71,18 +71,20 @@ public class AudienceQuestionController extends PaginationController {
description = "Count all the questions in current session")
}
)
}*/)
})*/
@RequestMapping(value = "/count", method = RequestMethod.GET)
@DeprecatedApi
@ApiOperation(hidden=true, value="")
public int getInterposedCount(@ApiParam(value="Session-Key from current session", required=true) @RequestParam final String sessionkey) {
return questionService.getInterposedCount(sessionkey);
}
@ApiOperation(value = "count all unread interposed questions",
/*@ApiOperation(value = "count all unread interposed questions",
nickname = "getUnreadInterposedCount",
notes = "getUnreadInterposedCount(String sessionkey, String user)")
notes = "getUnreadInterposedCount(String sessionkey, String user)")*/
@RequestMapping(value = "/readcount", method = RequestMethod.GET)
@DeprecatedApi
@ApiOperation(hidden=true, value="")
public InterposedReadingCount getUnreadInterposedCount(@ApiParam(value = "Session-Key from current session", required = true) @RequestParam("sessionkey") final String sessionkey, String user) {
return questionService.getInterposedReadingCount(sessionkey, user);
}
......
......@@ -58,10 +58,11 @@ public class CourseController extends AbstractController {
@Autowired
private IUserService userService;
@ApiOperation(value = "retrieves a User Courses",
nickname = "myCourses",
notes = "Request encoding: none, Repsonse structure: none, encoding-type: application/json")
notes = "myCourses(" +
"@ApiParam(value=\"sort my courses by name\", required=true)" +
"@RequestParam(value = \"sortby\", defaultValue = \"name\") final String sortby)")
@ApiResponses(value = {
@ApiResponse(code = 200, message = "successful API requests")
})
......
......@@ -378,6 +378,7 @@ public class LecturerQuestionController extends PaginationController {
}
}
@ApiOperation(hidden=true, value="")
@DeprecatedApi
@RequestMapping(value = "/count", method = RequestMethod.GET)
public int getSkillQuestionCount(
......@@ -409,6 +410,7 @@ public class LecturerQuestionController extends PaginationController {
questionService.deleteQuestion(questionId);
}
@ApiOperation(hidden=true, value="")
@DeprecatedApi
@RequestMapping(value = "/unanswered", method = RequestMethod.GET)
public List<String> getUnAnsweredSkillQuestionIds(
......@@ -446,6 +448,7 @@ public class LecturerQuestionController extends PaginationController {
* @throws ForbiddenException
* if not logged in
*/
@ApiOperation(hidden=true, value="")
@DeprecatedApi
@RequestMapping(value = "/{questionId}/myanswer", method = RequestMethod.GET)
public Answer getMyAnswer(
......@@ -630,6 +633,7 @@ public class LecturerQuestionController extends PaginationController {
* @throws ForbiddenException
* if not logged in
*/
@ApiOperation(hidden=true, value="")
@DeprecatedApi
@RequestMapping(value = "/{questionId}/answercount", method = RequestMethod.GET)
public int getAnswerCount(@PathVariable final String questionId) {
......@@ -681,12 +685,14 @@ public class LecturerQuestionController extends PaginationController {
return questionService.getFreetextAnswers(questionId, offset, limit);
}
@ApiOperation(hidden=true, value="")
@DeprecatedApi
@RequestMapping(value = "/myanswers", method = RequestMethod.GET)
public List<Answer> getMyAnswers(@RequestParam final String sessionkey) {
return questionService.getMyAnswers(sessionkey);
}
@ApiOperation(hidden=true, value="")
@DeprecatedApi
@RequestMapping(value = "/answercount", method = RequestMethod.GET)
public int getTotalAnswerCount(
......
......@@ -91,6 +91,7 @@ public class SessionController extends PaginationController {
}
@DeprecatedApi
@ApiOperation(hidden=true, value="")
@RequestMapping(value = "/{sessionkey}/activeusercount", method = RequestMethod.GET)
public int countActiveUsers(@ApiParam(value = "Session-Key from current session", required = true) @PathVariable final String sessionkey) {
return sessionService.activeUsers(sessionkey);
......
......@@ -42,25 +42,28 @@ public class StatisticsController extends AbstractController {
@ApiOperation(value = "Retrieves global statistics",
nickname = "getStatistics",
notes = "Request encoding: none, Repsonse structure: none, encoding-type: application/json")
notes = "getStatistics()")
@RequestMapping(method = RequestMethod.GET, value = "/statistics")
@CacheControl(maxAge = 60, policy = CacheControl.Policy.PUBLIC)
public Statistics getStatistics() {
return statisticsService.getStatistics();
}
@ApiOperation(hidden=true, value="")
@DeprecatedApi
@RequestMapping(method = RequestMethod.GET, value = "/statistics/activeusercount", produces = "text/plain")
public String countActiveUsers() {
return Integer.toString(statisticsService.getStatistics().getActiveUsers());
}
@ApiOperation(hidden=true, value="")
@DeprecatedApi
@RequestMapping(method = RequestMethod.GET, value = "/statistics/loggedinusercount", produces = "text/plain")
public String countLoggedInUsers() {
return Integer.toString(statisticsService.getStatistics().getLoggedinUsers());
}
@ApiOperation(hidden=true, value="")
@DeprecatedApi
@RequestMapping(method = RequestMethod.GET, value = "/statistics/sessioncount", produces = "text/plain")
public String countSessions() {
......
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