diff --git a/src/main/java/de/thm/arsnova/controller/AudienceQuestionController.java b/src/main/java/de/thm/arsnova/controller/AudienceQuestionController.java index 0e5fd0ce892c0129e5863e1cf5a82fb504d97e62..6938cf0e1da062a4cf96110136beb5fba66403b0 100644 --- a/src/main/java/de/thm/arsnova/controller/AudienceQuestionController.java +++ b/src/main/java/de/thm/arsnova/controller/AudienceQuestionController.java @@ -58,8 +58,7 @@ public class AudienceQuestionController extends PaginationController { private IQuestionService questionService; @ApiOperation(value = "Count all the questions in current session", - nickname = "getAudienceQuestionCount", - notes = "getInterposedCount(String sessionkey, String user)") + nickname = "getAudienceQuestionCount") @RequestMapping(value = "/count", method = RequestMethod.GET) @DeprecatedApi @Deprecated @@ -68,8 +67,7 @@ public class AudienceQuestionController extends PaginationController { } @ApiOperation(value = "count all unread interposed questions", - nickname = "getUnreadInterposedCount", - notes = "getUnreadInterposedCount(String sessionkey, String user)") + nickname = "getUnreadInterposedCount") @RequestMapping(value = "/readcount", method = RequestMethod.GET) @DeprecatedApi @Deprecated @@ -78,8 +76,7 @@ public class AudienceQuestionController extends PaginationController { } @ApiOperation(value = "Retrieves all Interposed Questions for a Session", - nickname = "getInterposedQuestions", - notes = "Repsonse structure: InterposedQuestion[], encoding-type: application/json") + nickname = "getInterposedQuestions") @RequestMapping(value = "/", method = RequestMethod.GET) @Pagination public List<InterposedQuestion> getInterposedQuestions(@ApiParam(value = "Session-Key from current session", required = true) @RequestParam final String sessionkey) { @@ -87,16 +84,14 @@ public class AudienceQuestionController extends PaginationController { } @ApiOperation(value = "Retrieves an InterposedQuestion", - nickname = "getInterposedQuestion", - notes = "Repsonse structure: InterposedQuestion, encoding-type: application/json") + nickname = "getInterposedQuestion") @RequestMapping(value = "/{questionId}", method = RequestMethod.GET) public InterposedQuestion getInterposedQuestion(@ApiParam(value = "ID of the question that needs to be deleted", required = true) @PathVariable final String questionId) { return new InterposedQuestion(questionService.readInterposedQuestion(questionId)); } @ApiOperation(value = "Creates a new Interposed Question for a Session and returns the InterposedQuestion's data", - nickname = "postInterposedQuestion", - notes = "Repsonse structure: InterposedQuestion, encoding-type: application/json") + nickname = "postInterposedQuestion") @ApiResponses(value = { @ApiResponse(code = 400, message = "Bad Request - The Api cannot or will not process the request due to something that is perceived to be a client error") }) @@ -114,8 +109,7 @@ public class AudienceQuestionController extends PaginationController { } @ApiOperation(value = "Deletes an InterposedQuestion", - nickname = "deleteInterposedQuestion", - notes = "Repsonse structure: none, encoding-type: application/json") + nickname = "deleteInterposedQuestion") @RequestMapping(value = "/{questionId}", method = RequestMethod.DELETE) public void deleteInterposedQuestion(@ApiParam(value = "ID of the question that needs to be deleted", required=true) @PathVariable final String questionId) { questionService.deleteInterposedQuestion(questionId); diff --git a/src/main/java/de/thm/arsnova/controller/CourseController.java b/src/main/java/de/thm/arsnova/controller/CourseController.java index 26e72709c9e0204cdd707869c66123e3d4599976..b912e3fc506782cfccab0a6409d47cb9c1e66376 100644 --- a/src/main/java/de/thm/arsnova/controller/CourseController.java +++ b/src/main/java/de/thm/arsnova/controller/CourseController.java @@ -60,10 +60,7 @@ public class CourseController extends AbstractController { private IUserService userService; @ApiOperation(value = "retrieves a User Courses", - nickname = "myCourses", - notes = "myCourses(" + - "@ApiParam(value=\"sort my courses by name\", required=true)" + - "@RequestParam(value = \"sortby\", defaultValue = \"name\") final String sortby)") + nickname = "myCourses") @ApiResponses(value = { @ApiResponse(code = 200, message = "successful API requests") }) diff --git a/src/main/java/de/thm/arsnova/controller/FeedbackController.java b/src/main/java/de/thm/arsnova/controller/FeedbackController.java index b2e3c11e9c28a1785e4b6851141b8af2d26e8506..b3cae614f15b4ed6c93d8ea7cc67ad3649f8a9c7 100644 --- a/src/main/java/de/thm/arsnova/controller/FeedbackController.java +++ b/src/main/java/de/thm/arsnova/controller/FeedbackController.java @@ -59,8 +59,7 @@ public class FeedbackController extends AbstractController { private IUserService userService; @ApiOperation(value = "Get feedback from a session", - nickname = "getFeedback", - notes = "getFeedback(@PathVariable final String sessionkey)") + nickname = "getFeedback") @DeprecatedApi @Deprecated @RequestMapping(value = "/session/{sessionkey}/feedback", method = RequestMethod.GET) @@ -69,8 +68,7 @@ public class FeedbackController extends AbstractController { } @ApiOperation(value = "Get own feedback from a session", - nickname = "getMyFeedback", - notes = "getMyFeedback(@PathVariable final String sessionkey)") + nickname = "getMyFeedback") @ApiResponses(value = { @ApiResponse(code = 404, message = "Not Found - The requested resource could not be found but may be available again in the future.") }) @@ -86,8 +84,7 @@ public class FeedbackController extends AbstractController { } @ApiOperation(value = "Get amout of feedback from a session", - nickname = "getFeedbackCount", - notes = "getFeedbackCount(@PathVariable final String sessionkey)") + nickname = "getFeedbackCount") @DeprecatedApi @Deprecated @RequestMapping(value = "/session/{sessionkey}/feedbackcount", method = RequestMethod.GET) @@ -96,8 +93,7 @@ public class FeedbackController extends AbstractController { } @ApiOperation(value = "Get the average feedback (rounded) from a session", - nickname = "getAverageFeedbackRounded", - notes = "getAverageFeedbackRounded(@PathVariable final String sessionkey)") + nickname = "getAverageFeedbackRounded") @DeprecatedApi @Deprecated @RequestMapping(value = "/session/{sessionkey}/roundedaveragefeedback", method = RequestMethod.GET) @@ -113,10 +109,7 @@ public class FeedbackController extends AbstractController { } @ApiOperation(value = "Post feedback for a session", - nickname = "postFeedback", - notes = "postFeedback(" + - "@PathVariable final String sessionkey," + - "@RequestBody final int value)") + nickname = "postFeedback") @ApiResponses(value = { @ApiResponse(code = 404, message = "Not Found - The requested resource could not be found but may be available again in the future.") }) diff --git a/src/main/java/de/thm/arsnova/controller/LecturerQuestionController.java b/src/main/java/de/thm/arsnova/controller/LecturerQuestionController.java index 2e7d64485c9cd9164279c6c561ff4e84c07c390f..d6269b3fd7e4cd35e121daca8364fea9561c7a50 100644 --- a/src/main/java/de/thm/arsnova/controller/LecturerQuestionController.java +++ b/src/main/java/de/thm/arsnova/controller/LecturerQuestionController.java @@ -63,11 +63,9 @@ public class LecturerQuestionController extends PaginationController { @Autowired private IQuestionService questionService; - + @ApiOperation(value = "Get question with provided question Id", - nickname = "getQuestion", - notes = "getQuestion(@PathVariable final String questionId)" - ) + nickname = "getQuestion") @ApiResponses(value = { @ApiResponse(code = 404, message = "Not Found - The requested resource could not be found but may be available again in the future.") }) @@ -82,9 +80,7 @@ public class LecturerQuestionController extends PaginationController { } @ApiOperation(value = "Post provided question", - nickname = "postQuestion", - notes = "postQuestion(@RequestBody final Question question)" - ) + nickname = "postQuestion") @ApiResponses(value = { @ApiResponse(code = 400, message = "Bad Request - The Api cannot or will not process the request due to something that is perceived to be a client error") }) @@ -98,9 +94,7 @@ public class LecturerQuestionController extends PaginationController { } @ApiOperation(value = "Update the question, identified by provided id, with the provided question in the Request Body", - nickname = "updateQuestion", - notes = "updateQuestion(@PathVariable final String questionId,@RequestBody final Question question)" - ) + nickname = "updateQuestion") @ApiResponses(value = { @ApiResponse(code = 400, message = "Bad Request - The Api cannot or will not process the request due to something that is perceived to be a client error") }) @@ -117,10 +111,7 @@ public class LecturerQuestionController extends PaginationController { } @ApiOperation(value = "Start new Pi Round on question, identified by provided id, with an optional time", - nickname = "startPiRound", - notes = "startPiRound(@PathVariable final String questionId," + - "@RequestParam(value = \"time\", defaultValue = \"0\", required = false) final int time)" - ) + nickname = "startPiRound") @RequestMapping(value = "/{questionId}/questionimage", method = RequestMethod.GET) public String getQuestionImage( @PathVariable final String questionId, @@ -149,9 +140,7 @@ public class LecturerQuestionController extends PaginationController { @RequestMapping(value = "/{questionId}/canceldelayedpiround", method = RequestMethod.POST) @ApiOperation(value = "Cancel Pi Round on question, identified by provided id", - nickname = "cancelPiRound", - notes = "cancelPiRound(@PathVariable final String questionId)" - ) + nickname = "cancelPiRound") public void cancelPiRound( @PathVariable final String questionId ) { @@ -160,9 +149,7 @@ public class LecturerQuestionController extends PaginationController { @RequestMapping(value = "/{questionId}/resetpiroundstate", method = RequestMethod.POST) @ApiOperation(value = "Reset Pi Round on question, identified by provided id", - nickname = "resetPiQuestion", - notes = "resetPiQuestion(@PathVariable final String questionId)" - ) + nickname = "resetPiQuestion") public void resetPiQuestion( @PathVariable final String questionId ) { @@ -170,10 +157,7 @@ public class LecturerQuestionController extends PaginationController { } @ApiOperation(value = "Set voting admission on question, identified by provided id", - nickname = "setVotingAdmission", - notes = "setVotingAdmission(@PathVariable final String questionId," + - "@RequestParam(value = \"disable\", defaultValue = \"false\", required = false) final Boolean disableVote)" - ) + nickname = "setVotingAdmission") @RequestMapping(value = "/{questionId}/disablevote", method = RequestMethod.POST) public void setVotingAdmission( @PathVariable final String questionId, @@ -189,13 +173,7 @@ public class LecturerQuestionController extends PaginationController { } @ApiOperation(value = "Set voting admission for all questions", - nickname = "setVotingAdmissionForAllQuestions", - notes = "setVotingAdmissionForAllQuestions(" + - "@RequestParam final String sessionkey," + - "@RequestParam(value = \"disable\", defaultValue = \"false\", required = false) final Boolean disableVote," + - "@RequestParam(value = \"lecturequestionsonly\", defaultValue = \"false\", required = false) final boolean lectureQuestionsOnly," + - "@RequestParam(value = \"preparationquestionsonly\", defaultValue = \"false\", required = false) final boolean preparationQuestionsOnly)" - ) + nickname = "setVotingAdmissionForAllQuestions") @RequestMapping(value = "/disablevote", method = RequestMethod.POST) public void setVotingAdmissionForAllQuestions( @RequestParam final String sessionkey, @@ -222,12 +200,7 @@ public class LecturerQuestionController extends PaginationController { } @ApiOperation(value = "Publish a question, identified by provided id and question in Request Body.", - nickname = "publishQuestion", - notes = "publishQuestion(" + - "@PathVariable final String questionId," + - "@RequestParam(required = false) final Boolean publish," + - "@RequestBody final Question question)" - ) + nickname = "publishQuestion") @RequestMapping(value = "/{questionId}/publish", method = RequestMethod.POST) public void publishQuestion( @PathVariable final String questionId, @@ -241,13 +214,7 @@ public class LecturerQuestionController extends PaginationController { } @ApiOperation(value = "Publish all questions", - nickname = "publishAllQuestions", - notes = "publishAllQuestions(" + - "@RequestParam final String sessionkey," + - "@RequestParam(required = false) final Boolean publish," + - "@RequestParam(value = \"lecturequestionsonly\", defaultValue = \"false\", required = false) final boolean lectureQuestionsOnly," + - "@RequestParam(value = \"preparationquestionsonly\", defaultValue = \"false\", required = false) final boolean preparationQuestionsOnly)" - ) + nickname = "publishAllQuestions") @RequestMapping(value = "/publish", method = RequestMethod.POST) public void publishAllQuestions( @RequestParam final String sessionkey, @@ -274,12 +241,7 @@ public class LecturerQuestionController extends PaginationController { } @ApiOperation(value = "Publish statistics from question with provided id", - nickname = "publishStatistics", - notes = "publishStatistics(" + - "@PathVariable final String questionId," + - "@RequestParam(required = false) final Boolean showStatistics," + - "@RequestBody final Question question)" - ) + nickname = "publishStatistics") @RequestMapping(value = "/{questionId}/publishstatistics", method = RequestMethod.POST) public void publishStatistics( @PathVariable final String questionId, @@ -293,12 +255,7 @@ public class LecturerQuestionController extends PaginationController { } @ApiOperation(value = "Publish correct answer from question with provided id", - nickname = "publishCorrectAnswer", - notes = "publishCorrectAnswer(" + - "@PathVariable final String questionId," + - "@RequestParam(required = false) final Boolean showCorrectAnswer," + - "@RequestBody final Question question)" - ) + nickname = "publishCorrectAnswer") @RequestMapping(value = "/{questionId}/publishcorrectanswer", method = RequestMethod.POST) public void publishCorrectAnswer( @PathVariable final String questionId, @@ -312,14 +269,7 @@ public class LecturerQuestionController extends PaginationController { } @ApiOperation(value = "Get skill questions", - nickname = "getSkillQuestions", - notes = "getSkillQuestions(" + - "@RequestParam final String sessionkey," + - "@RequestParam(value = \"lecturequestionsonly\", defaultValue = \"false\") final boolean lectureQuestionsOnly," + - "@RequestParam(value = \"flashcardsonly\", defaultValue = \"false\") final boolean flashcardsOnly," + - "@RequestParam(value = \"preparationquestionsonly\", defaultValue = \"false\") final boolean preparationQuestionsOnly," + - "final HttpServletResponse response)" - ) + nickname = "getSkillQuestions") @RequestMapping(value = "/", method = RequestMethod.GET) @Pagination public List<Question> getSkillQuestions( @@ -351,14 +301,7 @@ public class LecturerQuestionController extends PaginationController { } @ApiOperation(value = "Delete skill questions", - nickname = "deleteSkillQuestions", - notes = "deleteSkillQuestions(" + - "@RequestParam final String sessionkey," + - "@RequestParam(value = \"lecturequestionsonly\", defaultValue = \"false\") final boolean lectureQuestionsOnly," + - "@RequestParam(value = \"flashcardsonly\", defaultValue = \"false\") final boolean flashcardsOnly," + - "@RequestParam(value = \"preparationquestionsonly\", defaultValue = \"false\") final boolean preparationQuestionsOnly," + - "final HttpServletResponse response)" - ) + nickname = "deleteSkillQuestions") @RequestMapping(value = { "/" }, method = RequestMethod.DELETE) public void deleteSkillQuestions( @RequestParam final String sessionkey, @@ -379,12 +322,7 @@ public class LecturerQuestionController extends PaginationController { } @ApiOperation(value = "Get the amount of skill questions by the sessionkey", - nickname = "getSkillQuestionCount", - notes = "getSkillQuestionCount(" + - "@RequestParam final String sessionkey," + - "@RequestParam(value = \"lecturequestionsonly\", defaultValue = \"false\") final boolean lectureQuestionsOnly," + - "@RequestParam(value = \"flashcardsonly\", defaultValue = \"false\") final boolean flashcardsOnly," + - "@RequestParam(value = \"preparationquestionsonly\", defaultValue = \"false\") final boolean preparationQuestionsOnly)") + nickname = "getSkillQuestionCount") @DeprecatedApi @Deprecated @RequestMapping(value = "/count", method = RequestMethod.GET) @@ -406,10 +344,7 @@ public class LecturerQuestionController extends PaginationController { } @ApiOperation(value = "Delete answers and questions", - nickname = "deleteAnswersAndQuestion", - notes = "deleteAnswersAndQuestion(" + - "@PathVariable final String questionId)" - ) + nickname = "deleteAnswersAndQuestion") @RequestMapping(value = "/{questionId}", method = RequestMethod.DELETE) public void deleteAnswersAndQuestion( @PathVariable final String questionId @@ -418,12 +353,7 @@ public class LecturerQuestionController extends PaginationController { } @ApiOperation(value = "Get unanswered skill question ID by provided session ID", - nickname = "getUnAnsweredSkillQuestionIds", - notes = "getUnAnsweredSkillQuestionIds(" + - "@RequestParam final String sessionkey," + - "@RequestParam(value = \"lecturequestionsonly\", defaultValue = \"false\") final boolean lectureQuestionsOnly," + - "@RequestParam(value = \"preparationquestionsonly\", defaultValue = \"false\") final boolean preparationQuestionsOnly)" - ) + nickname = "getUnAnsweredSkillQuestionIds") @DeprecatedApi @Deprecated @RequestMapping(value = "/unanswered", method = RequestMethod.GET) @@ -463,11 +393,7 @@ public class LecturerQuestionController extends PaginationController { * if not logged in */ @ApiOperation(value = "Get my answer for a question, identified by provided question ID", - nickname = "getMyAnswer", - notes = "getMyAnswer(" + - "@PathVariable final String questionId," + - "final HttpServletResponse response)" - ) + nickname = "getMyAnswer") @DeprecatedApi @Deprecated @RequestMapping(value = "/{questionId}/myanswer", method = RequestMethod.GET) @@ -502,13 +428,7 @@ public class LecturerQuestionController extends PaginationController { * if not logged in */ @ApiOperation(value = "Get answers for a question, identified by provided question ID", - nickname = "getAnswers", - notes = "getAnswers(" + - "@PathVariable final String questionId," + - "@RequestParam(value = \"piround\", required = false) final Integer piRound," + - "@RequestParam(value = \"all\", required = false, defaultValue = \"false\") final Boolean allAnswers," + - "final HttpServletResponse response)" - ) + nickname = "getAnswers") @RequestMapping(value = "/{questionId}/answer/", method = RequestMethod.GET) public List<Answer> getAnswers( @PathVariable final String questionId, @@ -536,12 +456,7 @@ public class LecturerQuestionController extends PaginationController { } @ApiOperation(value = "Save answer, provided in the Request Body, for a question, identified by provided question ID", - nickname = "saveAnswer", - notes = "saveAnswer(" + - "@PathVariable final String questionId," + - "@RequestBody final de.thm.arsnova.entities.transport.Answer answer," + - "final HttpServletResponse response)" - ) + nickname = "saveAnswer") @RequestMapping(value = "/{questionId}/answer/", method = RequestMethod.POST) public Answer saveAnswer( @PathVariable final String questionId, @@ -552,13 +467,7 @@ public class LecturerQuestionController extends PaginationController { } @ApiOperation(value = "Update answer, provided in Request Body, identified by question ID and answer ID", - nickname = "updateAnswer", - notes = "updateAnswer(" + - "@PathVariable final String questionId," + - "@PathVariable final String answerId," + - "@RequestBody final Answer answer," + - "final HttpServletResponse response)" - ) + nickname = "updateAnswer") @RequestMapping(value = "/{questionId}/answer/{answerId}", method = RequestMethod.PUT) public Answer updateAnswer( @PathVariable final String questionId, @@ -570,12 +479,7 @@ public class LecturerQuestionController extends PaginationController { } @ApiOperation(value = "Get Image, identified by question ID and answer ID", - nickname = "getImage", - notes = "getImage(" + - "@PathVariable final String questionId," + - "@PathVariable final String answerId," + - "final HttpServletResponse response)" - ) + nickname = "getImage") @RequestMapping(value = "/{questionId}/answer/{answerId}/image", method = RequestMethod.GET) public String getImage( @PathVariable final String questionId, @@ -587,12 +491,7 @@ public class LecturerQuestionController extends PaginationController { } @ApiOperation(value = "Delete answer, identified by question ID and answer ID", - nickname = "deleteAnswer", - notes = "deleteAnswer(" + - "@PathVariable final String questionId," + - "@PathVariable final String answerId," + - "final HttpServletResponse response)" - ) + nickname = "deleteAnswer") @RequestMapping(value = "/{questionId}/answer/{answerId}", method = RequestMethod.DELETE) public void deleteAnswer( @PathVariable final String questionId, @@ -603,11 +502,7 @@ public class LecturerQuestionController extends PaginationController { } @ApiOperation(value = "Delete answers from a question, identified by question ID", - nickname = "deleteAnswers", - notes = "deleteAnswers(" + - "@PathVariable final String questionId," + - "final HttpServletResponse response)" - ) + nickname = "deleteAnswers") @RequestMapping(value = "/{questionId}/answer/", method = RequestMethod.DELETE) public void deleteAnswers( @PathVariable final String questionId, @@ -617,13 +512,7 @@ public class LecturerQuestionController extends PaginationController { } @ApiOperation(value = "Delete all answers and questions from a session, identified by sessionkey", - nickname = "deleteAllQuestionsAnswers", - notes = "deleteAllQuestionsAnswers(" + - "@RequestParam final String sessionkey," + - "@RequestParam(value = \"lecturequestionsonly\", defaultValue = \"false\") final boolean lectureQuestionsOnly," + - "@RequestParam(value = \"preparationquestionsonly\", defaultValue = \"false\") final boolean preparationQuestionsOnly," + - "final HttpServletResponse response)" - ) + nickname = "deleteAllQuestionsAnswers") @RequestMapping(value = "/answers", method = RequestMethod.DELETE) public void deleteAllQuestionsAnswers( @RequestParam final String sessionkey, @@ -654,9 +543,7 @@ public class LecturerQuestionController extends PaginationController { * if not logged in */ @ApiOperation(value = "Get the amount of answers for a question, identified by question ID", - nickname = "getAnswerCount", - notes = "getAnswerCount(@PathVariable final String questionId)" - ) + nickname = "getAnswerCount") @DeprecatedApi @Deprecated @RequestMapping(value = "/{questionId}/answercount", method = RequestMethod.GET) @@ -665,9 +552,7 @@ public class LecturerQuestionController extends PaginationController { } @ApiOperation(value = "Get the amount of answers for a question, identified by the question ID", - nickname = "getAllAnswerCount", - notes = "getAllAnswerCount(@PathVariable final String questionId)" - ) + nickname = "getAllAnswerCount") @RequestMapping(value = "/{questionId}/allroundanswercount", method = RequestMethod.GET) public List<Integer> getAllAnswerCount(@PathVariable final String questionId) { return Arrays.asList( @@ -677,18 +562,14 @@ public class LecturerQuestionController extends PaginationController { } @ApiOperation(value = "Get the total amount of answers by a question, identified by the question ID", - nickname = "getTotalAnswerCountByQuestion", - notes = "getTotalAnswerCountByQuestion(@PathVariable final String questionId)" - ) + nickname = "getTotalAnswerCountByQuestion") @RequestMapping(value = "/{questionId}/totalanswercount", method = RequestMethod.GET) public int getTotalAnswerCountByQuestion(@PathVariable final String questionId) { return questionService.getTotalAnswerCountByQuestion(questionId); } @ApiOperation(value = "Get the amount of answers and abstention answers by a question, identified by the question ID", - nickname = "getAnswerAndAbstentionCount", - notes = "getAnswerAndAbstentionCount(@PathVariable final String questionId)" - ) + nickname = "getAnswerAndAbstentionCount") @RequestMapping(value = "/{questionId}/answerandabstentioncount", method = RequestMethod.GET) public List<Integer> getAnswerAndAbstentionCount(@PathVariable final String questionId) { List<Integer> list = Arrays.asList( @@ -700,9 +581,7 @@ public class LecturerQuestionController extends PaginationController { } @ApiOperation(value = "Get all Freetext answers by a question, identified by the question ID", - nickname = "getFreetextAnswers", - notes = "getFreetextAnswers(@PathVariable final String questionId)" - ) + nickname = "getFreetextAnswers") @RequestMapping(value = "/{questionId}/freetextanswer/", method = RequestMethod.GET) @Pagination public List<Answer> getFreetextAnswers(@PathVariable final String questionId) { @@ -710,9 +589,7 @@ public class LecturerQuestionController extends PaginationController { } @ApiOperation(value = "Get my answers of an session, identified by the sessionkey", - nickname = "getMyAnswers", - notes = "getMyAnswers(@RequestParam final String sessionkey)" - ) + nickname = "getMyAnswers") @DeprecatedApi @Deprecated @RequestMapping(value = "/myanswers", method = RequestMethod.GET) @@ -721,12 +598,7 @@ public class LecturerQuestionController extends PaginationController { } @ApiOperation(value = "Get the total amount of answers of an session, identified by the sessionkey", - nickname = "getTotalAnswerCount", - notes = "getTotalAnswerCount(" + - "@RequestParam final String sessionkey," + - "@RequestParam(value = \"lecturequestionsonly\", defaultValue = \"false\") final boolean lectureQuestionsOnly," + - "@RequestParam(value = \"preparationquestionsonly\", defaultValue = \"false\") final boolean preparationQuestionsOnly)" - ) + nickname = "getTotalAnswerCount") @DeprecatedApi @Deprecated @RequestMapping(value = "/answercount", method = RequestMethod.GET) @@ -745,13 +617,7 @@ public class LecturerQuestionController extends PaginationController { } @ApiOperation(value = "Set the sort order of the subjects from a session, identified by the sessionkey", - nickname = "setSubjectSortOrder", - notes = "setSubjectSortOrder(" + - "@RequestParam(required = true) final String sessionkey," + - "@RequestParam(required = true) final String sorttype," + - "@RequestParam(required = true) final String ispreparation," + - "@RequestBody String[] sortOrder)" - ) + nickname = "setSubjectSortOrder") @ApiResponses(value = { @ApiResponse(code = 400, message = "Bad Request - The Api cannot or will not process the request due to something that is perceived to be a client error") }) @@ -768,13 +634,9 @@ public class LecturerQuestionController extends PaginationController { throw new BadRequestException(); } } - + @ApiOperation(value = "Get the sort order of the subjects from a session, identified by the sessionkey", - nickname = "getSubjectSortType", - notes = "getSubjectSortType(" + - "@RequestParam(required = true) final String sessionkey," + - "@RequestParam(required = true) final String ispreparation)" - ) + nickname = "getSubjectSortType") @RequestMapping(value = "/subjectsort", method = RequestMethod.GET) public String getSubjectSortType( @RequestParam(required = true) final String sessionkey, @@ -784,14 +646,7 @@ public class LecturerQuestionController extends PaginationController { } @ApiOperation(value = "Set the sort order of the questions from a subject in a session, identified by the sessionkey", - nickname = "setQuestionSortOrder", - notes = "setQuestionSortOrder(" + - "@RequestParam(required = true) final String sessionkey," + - "@RequestParam(required = true) final String subject," + - "@RequestParam(required = true) final String sorttype," + - "@RequestParam(required = true) final String ispreparation," + - "@RequestBody String[] sortOrder)" - ) + nickname = "setQuestionSortOrder") @ApiResponses(value = { @ApiResponse(code = 400, message = "Bad Request - The Api cannot or will not process the request due to something that is perceived to be a client error") }) @@ -811,12 +666,7 @@ public class LecturerQuestionController extends PaginationController { } @ApiOperation(value = "Get the sort order of the questions from a subject in a session, identified by the sessionkey", - nickname = "getQuestionSortType", - notes = "getQuestionSortType(" + - "@RequestParam(required = true) final String sessionkey," + - "@RequestParam(required = true) final String subject," + - "@RequestParam(required = true, defaultValue = \"false\") final boolean ispreparation)" - ) + nickname = "getQuestionSortType") @ApiResponses(value = { @ApiResponse(code = 204, message = "No Content - successfully processed the request") }) diff --git a/src/main/java/de/thm/arsnova/controller/SessionController.java b/src/main/java/de/thm/arsnova/controller/SessionController.java index 9cfb44727ab0c4ce4bff60602fed2ecbdc5cdcb0..0d7f2a5e4a82eb9a13ac190935fd9378389e1594 100644 --- a/src/main/java/de/thm/arsnova/controller/SessionController.java +++ b/src/main/java/de/thm/arsnova/controller/SessionController.java @@ -75,24 +75,21 @@ public class SessionController extends PaginationController { private IUserService userService; @ApiOperation(value = "Count all the questions in current session", - nickname = "joinSession", - notes = "Repsonse structure: none, encoding-type: application/json") + nickname = "joinSession") @RequestMapping(value = "/{sessionkey}", method = RequestMethod.GET) public Session joinSession(@ApiParam(value = "Session-Key from current session", required = true) @PathVariable final String sessionkey) { return Session.anonymizedCopy(sessionService.getSession(sessionkey)); } @ApiOperation(value = "deletes a session", - nickname = "deleteSession", - notes = "Repsonse structure: none, encoding-type: application/json") + nickname = "deleteSession") @RequestMapping(value = "/{sessionkey}", method = RequestMethod.DELETE) public void deleteSession(@ApiParam(value = "Session-Key from current session", required = true) @PathVariable final String sessionkey) { sessionService.deleteSession(sessionkey); } @ApiOperation(value = "count active users", - nickname = "countActiveUsers", - notes = "countActiveUsers(@ApiParam(value = \"Session-Key from current session\", required = true)") + nickname = "countActiveUsers") @DeprecatedApi @Deprecated @RequestMapping(value = "/{sessionkey}/activeusercount", method = RequestMethod.GET) @@ -101,8 +98,7 @@ public class SessionController extends PaginationController { } @ApiOperation(value = "Creates a new Session and returns the Session's data", - nickname = "postNewSession", - notes = "Repsonse structure: Session, encoding-type: application/json") + nickname = "postNewSession") @ApiResponses(value = { @ApiResponse(code = 201, message = "The request has been fulfilled and resulted in a new resource being created"), @ApiResponse(code = 503, message = "Service Unavailable - The Api is currently unavailable (because it is overloaded or down for maintenance)") @@ -134,8 +130,7 @@ public class SessionController extends PaginationController { } @ApiOperation(value = "updates a session", - nickname = "postNewSession", - notes = "Request encoding: none, Repsonse structure: Session, encoding-type: application/json") + nickname = "postNewSession") @RequestMapping(value = "/{sessionkey}", method = RequestMethod.PUT) public Session updateSession( @ApiParam(value = "session-key from current session", required = true) @PathVariable final String sessionkey, @@ -145,8 +140,7 @@ public class SessionController extends PaginationController { } @ApiOperation(value = "Retrieves a list of Sessions", - nickname = "getSessions", - notes = "Request encoding: Query string, Repsonse structure: Session[], encoding-type: application/json") + nickname = "getSessions") @ApiResponses(value = { @ApiResponse(code = 204, message = "No Content - successfully processed the request"), @ApiResponse(code = 501, message = "Not implemented - The Api either does not recognize the request method, or it lacks the ability to fulfil the request") @@ -196,8 +190,7 @@ public class SessionController extends PaginationController { * @return */ @ApiOperation(value = "Retrieves a Session", - nickname = "getMySessions", - notes = "Request encoding: none, Repsonse structure: Session, encoding-type: application/json") + nickname = "getMySessions") @ApiResponses(value = { @ApiResponse(code = 204, message = "No Content - successfully processed the request") }) @@ -229,8 +222,7 @@ public class SessionController extends PaginationController { } @ApiOperation(value = "Retrieves all public pool sessions for the current user", - nickname = "getMyPublicPoolSessions", - notes = "Request encoding: none, Repsonse structure: Session[], encoding-type: application/json") + nickname = "getMyPublicPoolSessions") @ApiResponses(value = { @ApiResponse(code = 204, message = "No Content - successfully processed the request") }) @@ -249,8 +241,7 @@ public class SessionController extends PaginationController { } @ApiOperation(value = "Retrieves all public pool sessions", - nickname = "getMyPublicPoolSessions", - notes = "Request encoding: none, Repsonse structure: Session[], encoding-type: application/json") + nickname = "getMyPublicPoolSessions") @ApiResponses(value = { @ApiResponse(code = 204, message = "No Content - successfully processed the request") }) @@ -269,8 +260,7 @@ public class SessionController extends PaginationController { } @ApiOperation(value = "imports a session", - nickname = "importSession", - notes = "Request encoding: none, Repsonse structure: Session[], encoding-type: application/json") + nickname = "importSession") @RequestMapping(value = "/import", method = RequestMethod.POST) public SessionInfo importSession( @ApiParam(value = "current session", required = true) @RequestBody final ImportExportSession session, @@ -280,8 +270,7 @@ public class SessionController extends PaginationController { } @ApiOperation(value = "Locks or unlocks a Session", - nickname = "lockSession", - notes = "Request encoding: Query string, Repsonse structure: Session, encoding-type: application/json") + nickname = "lockSession") @ApiResponses(value = { @ApiResponse(code = 404, message = "Not Found - The requested resource could not be found but may be available again in the future") }) @@ -299,8 +288,7 @@ public class SessionController extends PaginationController { } @ApiOperation(value = "retrieves a value for the learning progress", - nickname = "learningProgress", - notes = "Request encoding: none, Repsonse structure: LearningProgressValues[], encoding-type: application/json") + nickname = "learningProgress") @RequestMapping(value = "/{sessionkey}/learningprogress", method = RequestMethod.GET) public LearningProgressValues learningProgress( @ApiParam(value = "session-key from current session", required = true) @PathVariable final String sessionkey, @@ -312,8 +300,7 @@ public class SessionController extends PaginationController { } @ApiOperation(value = "retrieves a value for the learning progress for the current user", - nickname = "myLearningProgress", - notes = "Request encoding: none, Repsonse structure: LearningProgressValues, encoding-type: application/json") + nickname = "myLearningProgress") @RequestMapping(value = "/{sessionkey}/mylearningprogress", method = RequestMethod.GET) public LearningProgressValues myLearningProgress( @ApiParam(value = "session-key from current session", required = true) @PathVariable final String sessionkey, @@ -325,8 +312,7 @@ public class SessionController extends PaginationController { } @ApiOperation(value = "retrieves all session features", - nickname = "sessionFeatures", - notes = "Request encoding: none, Repsonse structure: SessionFeature, encoding-type: application/json") + nickname = "sessionFeatures") @RequestMapping(value = "/{sessionkey}/features", method = RequestMethod.GET) public SessionFeature sessionFeatures( @ApiParam(value = "session-key from current session", required = true) @PathVariable final String sessionkey, @@ -337,8 +323,7 @@ public class SessionController extends PaginationController { @RequestMapping(value = "/{sessionkey}/features", method = RequestMethod.PUT) @ApiOperation(value = "change all session features", - nickname = "changeSessionFeatures", - notes = "Request encoding: none, Repsonse structure: SessionFeature, encoding-type: application/json") + nickname = "changeSessionFeatures") public SessionFeature changeSessionFeatures( @ApiParam(value = "session-key from current session", required = true) @PathVariable final String sessionkey, @ApiParam(value = "session feature", required = true) @RequestBody final SessionFeature features, diff --git a/src/main/java/de/thm/arsnova/controller/SocketController.java b/src/main/java/de/thm/arsnova/controller/SocketController.java index 2714b915a20a8b559a974f60c49078815070824f..9dfcb13d7787ff665430e01124614d2f52d64d98 100644 --- a/src/main/java/de/thm/arsnova/controller/SocketController.java +++ b/src/main/java/de/thm/arsnova/controller/SocketController.java @@ -63,8 +63,7 @@ public class SocketController extends AbstractController { private static final Logger LOGGER = LoggerFactory.getLogger(SocketController.class); @ApiOperation(value = "requested to assign Websocket session", - nickname = "authorize", - notes = "Request encoding: none, Repsonse structure: none, encoding-type: application/json") + nickname = "authorize") @ApiResponses(value = { @ApiResponse(code = 204, message = "No Content - successfully processed the request"), @ApiResponse(code = 400, message = "Bad Request - The Api cannot or will not process the request due to something that is perceived to be a client error"), @@ -90,8 +89,7 @@ public class SocketController extends AbstractController { } @ApiOperation(value = "retrieves a socket url", - nickname = "getSocketUrl", - notes = "Request encoding: none, Repsonse structure: none, encoding-type: application/json") + nickname = "getSocketUrl") @RequestMapping(value = "/url", method = RequestMethod.GET) public String getSocketUrl(final HttpServletRequest request) { StringBuilder url = new StringBuilder(); diff --git a/src/main/java/de/thm/arsnova/controller/StatisticsController.java b/src/main/java/de/thm/arsnova/controller/StatisticsController.java index 24e2d0487369c41f42ac80b1ff1e6ae3de7bbc0e..417a0ffc48642bb36719ae8aff431d1a6ac4b0b4 100644 --- a/src/main/java/de/thm/arsnova/controller/StatisticsController.java +++ b/src/main/java/de/thm/arsnova/controller/StatisticsController.java @@ -41,8 +41,7 @@ public class StatisticsController extends AbstractController { private IStatisticsService statisticsService; @ApiOperation(value = "Retrieves global statistics", - nickname = "getStatistics", - notes = "getStatistics()") + nickname = "getStatistics") @RequestMapping(method = RequestMethod.GET, value = "/statistics") @CacheControl(maxAge = 60, policy = CacheControl.Policy.PUBLIC) public Statistics getStatistics() { @@ -50,8 +49,7 @@ public class StatisticsController extends AbstractController { } @ApiOperation(value = "Retrieves the amount of all active users", - nickname = "countActiveUsers", - notes = "countActiveUsers()") + nickname = "countActiveUsers") @DeprecatedApi @Deprecated @RequestMapping(method = RequestMethod.GET, value = "/statistics/activeusercount", produces = "text/plain") @@ -60,8 +58,7 @@ public class StatisticsController extends AbstractController { } @ApiOperation(value = "Retrieves the amount of all currently logged in users", - nickname = "countLoggedInUsers", - notes = "countLoggedInUsers()") + nickname = "countLoggedInUsers") @DeprecatedApi @Deprecated @RequestMapping(method = RequestMethod.GET, value = "/statistics/loggedinusercount", produces = "text/plain") @@ -70,8 +67,7 @@ public class StatisticsController extends AbstractController { } @ApiOperation(value = "Retrieves the total amount of all sessions", - nickname = "countSessions", - notes = "countSessions()") + nickname = "countSessions") @DeprecatedApi @Deprecated @RequestMapping(method = RequestMethod.GET, value = "/statistics/sessioncount", produces = "text/plain") diff --git a/src/main/java/de/thm/arsnova/entities/Statistics.java b/src/main/java/de/thm/arsnova/entities/Statistics.java index 7cf2b29d5ed7ded26baf517899b02ace295f860c..a3ea838fc71b8c820331d103c8e82c1c6d3af479 100644 --- a/src/main/java/de/thm/arsnova/entities/Statistics.java +++ b/src/main/java/de/thm/arsnova/entities/Statistics.java @@ -38,7 +38,7 @@ public class Statistics { private int interposedQuestions; private int conceptQuestions; - @ApiModelProperty(required = true, notes = "used to display Answers") + @ApiModelProperty(required = true, value = "used to display Answers") public int getAnswers() { return answers; } @@ -47,7 +47,7 @@ public class Statistics { this.answers = answers; } - @ApiModelProperty(required = true, notes = "used to display Lecture Questions") + @ApiModelProperty(required = true, value = "used to display Lecture Questions") public int getLectureQuestions() { return lectureQuestions; } @@ -56,7 +56,7 @@ public class Statistics { this.lectureQuestions = questions; } - @ApiModelProperty(required = true, notes = "used to display prepartion Questions") + @ApiModelProperty(required = true, value = "used to display prepartion Questions") public int getPreparationQuestions() { return preparationQuestions; } @@ -65,12 +65,12 @@ public class Statistics { this.preparationQuestions = questions; } - @ApiModelProperty(required = true, notes = "used to display Questions") + @ApiModelProperty(required = true, value = "used to display Questions") public int getQuestions() { return getLectureQuestions() + getPreparationQuestions(); } - @ApiModelProperty(required = true, notes = "used to display open Sessions") + @ApiModelProperty(required = true, value = "used to display open Sessions") public int getOpenSessions() { return openSessions; } @@ -79,7 +79,7 @@ public class Statistics { this.openSessions = openSessions; } - @ApiModelProperty(required = true, notes = "used to display closed Sessions") + @ApiModelProperty(required = true, value = "used to display closed Sessions") public int getClosedSessions() { return closedSessions; } @@ -88,12 +88,12 @@ public class Statistics { this.closedSessions = closedSessions; } - @ApiModelProperty(required = true, notes = "used to display Sessions") + @ApiModelProperty(required = true, value = "used to display Sessions") public int getSessions() { return getOpenSessions() + getClosedSessions(); } - @ApiModelProperty(required = true, notes = "used to display Active Users") + @ApiModelProperty(required = true, value = "used to display Active Users") public int getActiveUsers() { return activeUsers; } @@ -102,7 +102,7 @@ public class Statistics { this.activeUsers = activeUsers; } - @ApiModelProperty(required = true, notes = "used to display logged in Users") + @ApiModelProperty(required = true, value = "used to display logged in Users") public int getLoggedinUsers() { return loggedinUsers; } @@ -111,7 +111,7 @@ public class Statistics { this.loggedinUsers = loggedinUsers; } - @ApiModelProperty(required = true, notes = "used to display interposed Questions") + @ApiModelProperty(required = true, value = "used to display interposed Questions") public int getInterposedQuestions() { return interposedQuestions; } @@ -120,7 +120,7 @@ public class Statistics { this.interposedQuestions = interposedQuestions; } - @ApiModelProperty(required = true, notes = "used to display creators") + @ApiModelProperty(required = true, value = "used to display creators") public int getCreators() { return creators; } @@ -129,7 +129,7 @@ public class Statistics { this.creators = creators; } - @ApiModelProperty(required = true, notes = "used to display concept Questions") + @ApiModelProperty(required = true, value = "used to display concept Questions") public int getConceptQuestions() { return conceptQuestions; } @@ -138,7 +138,7 @@ public class Statistics { this.conceptQuestions = conceptQuestions; } - @ApiModelProperty(required = true, notes = "used to display active Students") + @ApiModelProperty(required = true, value = "used to display active Students") public int getActiveStudents() { return activeStudents; }