From ed9ed22d02c409c6e7d8fa7e59d29f8edb332630 Mon Sep 17 00:00:00 2001 From: Daniel Gerhardt <code@dgerhardt.net> Date: Wed, 5 Aug 2015 19:36:57 +0200 Subject: [PATCH] Clean up code * Fix inconsistent whitespaces * Remove unused imports --- .../AudienceQuestionController.java | 30 +++++----- .../arsnova/controller/CourseController.java | 18 +++--- .../controller/FeedbackController.java | 28 ++++----- .../LecturerQuestionController.java | 4 +- .../arsnova/controller/SessionController.java | 60 +++++++++---------- .../arsnova/controller/SocketController.java | 8 +-- .../controller/StatisticsController.java | 16 ++--- .../java/de/thm/arsnova/entities/Answer.java | 2 +- .../arsnova/entities/InterposedQuestion.java | 15 ++--- .../entities/InterposedReadingCount.java | 2 +- .../entities/LearningProgressOptions.java | 2 +- .../thm/arsnova/entities/PossibleAnswer.java | 2 +- .../de/thm/arsnova/entities/Question.java | 3 +- .../java/de/thm/arsnova/entities/Session.java | 6 +- .../thm/arsnova/entities/SessionFeature.java | 2 +- .../de/thm/arsnova/entities/SessionInfo.java | 2 +- .../de/thm/arsnova/entities/Statistics.java | 2 +- .../arsnova/entities/transport/Answer.java | 3 +- .../transport/ImportExportSession.java | 4 +- .../transport/InterposedQuestion.java | 17 ++---- .../transport/LearningProgressValues.java | 2 +- 21 files changed, 112 insertions(+), 116 deletions(-) diff --git a/src/main/java/de/thm/arsnova/controller/AudienceQuestionController.java b/src/main/java/de/thm/arsnova/controller/AudienceQuestionController.java index e4961a79..0e5fd0ce 100644 --- a/src/main/java/de/thm/arsnova/controller/AudienceQuestionController.java +++ b/src/main/java/de/thm/arsnova/controller/AudienceQuestionController.java @@ -36,8 +36,6 @@ import com.wordnik.swagger.annotations.ApiOperation; import com.wordnik.swagger.annotations.ApiParam; import com.wordnik.swagger.annotations.ApiResponse; import com.wordnik.swagger.annotations.ApiResponses; -import com.wordnik.swagger.annotations.Authorization; -import com.wordnik.swagger.annotations.AuthorizationScope; import de.thm.arsnova.entities.InterposedReadingCount; import de.thm.arsnova.entities.transport.InterposedQuestion; @@ -60,8 +58,8 @@ 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", + notes = "getInterposedCount(String sessionkey, String user)") @RequestMapping(value = "/count", method = RequestMethod.GET) @DeprecatedApi @Deprecated @@ -70,8 +68,8 @@ public class AudienceQuestionController extends PaginationController { } @ApiOperation(value = "count all unread interposed questions", - nickname = "getUnreadInterposedCount", - notes = "getUnreadInterposedCount(String sessionkey, String user)") + nickname = "getUnreadInterposedCount", + notes = "getUnreadInterposedCount(String sessionkey, String user)") @RequestMapping(value = "/readcount", method = RequestMethod.GET) @DeprecatedApi @Deprecated @@ -80,8 +78,8 @@ 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", + notes = "Repsonse structure: InterposedQuestion[], encoding-type: application/json") @RequestMapping(value = "/", method = RequestMethod.GET) @Pagination public List<InterposedQuestion> getInterposedQuestions(@ApiParam(value = "Session-Key from current session", required = true) @RequestParam final String sessionkey) { @@ -89,19 +87,19 @@ public class AudienceQuestionController extends PaginationController { } @ApiOperation(value = "Retrieves an InterposedQuestion", - nickname = "getInterposedQuestion", - notes = "Repsonse structure: InterposedQuestion, encoding-type: application/json") + nickname = "getInterposedQuestion", + notes = "Repsonse structure: InterposedQuestion, encoding-type: application/json") @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", + notes = "Repsonse structure: InterposedQuestion, encoding-type: application/json") @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") - }) + @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") + }) @RequestMapping(value = "/", method = RequestMethod.POST) @ResponseStatus(HttpStatus.CREATED) public void postInterposedQuestion( @@ -116,8 +114,8 @@ public class AudienceQuestionController extends PaginationController { } @ApiOperation(value = "Deletes an InterposedQuestion", - nickname = "deleteInterposedQuestion", - notes = "Repsonse structure: none, encoding-type: application/json") + nickname = "deleteInterposedQuestion", + notes = "Repsonse structure: none, encoding-type: application/json") @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 771f4e7b..26e72709 100644 --- a/src/main/java/de/thm/arsnova/controller/CourseController.java +++ b/src/main/java/de/thm/arsnova/controller/CourseController.java @@ -58,17 +58,18 @@ public class CourseController extends AbstractController { @Autowired 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)") - @ApiResponses(value = { - @ApiResponse(code = 200, message = "successful API requests") - }) + nickname = "myCourses", + 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") + }) @RequestMapping(value = "/mycourses", method = RequestMethod.GET) public List<Course> myCourses( - @ApiParam(value="sort my courses by name", required=true) + @ApiParam(value="sort my courses by name", required=true) @RequestParam(value = "sortby", defaultValue = "name") final String sortby ) { @@ -120,4 +121,3 @@ public class CourseController extends AbstractController { } } } - diff --git a/src/main/java/de/thm/arsnova/controller/FeedbackController.java b/src/main/java/de/thm/arsnova/controller/FeedbackController.java index dde0485f..b2e3c11e 100644 --- a/src/main/java/de/thm/arsnova/controller/FeedbackController.java +++ b/src/main/java/de/thm/arsnova/controller/FeedbackController.java @@ -59,8 +59,8 @@ 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", + notes = "getFeedback(@PathVariable final String sessionkey)") @DeprecatedApi @Deprecated @RequestMapping(value = "/session/{sessionkey}/feedback", method = RequestMethod.GET) @@ -69,10 +69,10 @@ public class FeedbackController extends AbstractController { } @ApiOperation(value = "Get own feedback from a session", - nickname = "getMyFeedback", - notes = "getMyFeedback(@PathVariable final String sessionkey)") + nickname = "getMyFeedback", + notes = "getMyFeedback(@PathVariable final String sessionkey)") @ApiResponses(value = { - @ApiResponse(code = 404, message = "Not Found - The requested resource could not be found but may be available again in the future.") + @ApiResponse(code = 404, message = "Not Found - The requested resource could not be found but may be available again in the future.") }) @DeprecatedApi @Deprecated @@ -86,8 +86,8 @@ public class FeedbackController extends AbstractController { } @ApiOperation(value = "Get amout of feedback from a session", - nickname = "getFeedbackCount", - notes = "getFeedbackCount(@PathVariable final String sessionkey)") + nickname = "getFeedbackCount", + notes = "getFeedbackCount(@PathVariable final String sessionkey)") @DeprecatedApi @Deprecated @RequestMapping(value = "/session/{sessionkey}/feedbackcount", method = RequestMethod.GET) @@ -96,8 +96,8 @@ 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", + notes = "getAverageFeedbackRounded(@PathVariable final String sessionkey)") @DeprecatedApi @Deprecated @RequestMapping(value = "/session/{sessionkey}/roundedaveragefeedback", method = RequestMethod.GET) @@ -113,12 +113,12 @@ 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", + notes = "postFeedback(" + + "@PathVariable final String sessionkey," + + "@RequestBody final int value)") @ApiResponses(value = { - @ApiResponse(code = 404, message = "Not Found - The requested resource could not be found but may be available again in the future.") + @ApiResponse(code = 404, message = "Not Found - The requested resource could not be found but may be available again in the future.") }) @DeprecatedApi @Deprecated diff --git a/src/main/java/de/thm/arsnova/controller/LecturerQuestionController.java b/src/main/java/de/thm/arsnova/controller/LecturerQuestionController.java index d89cddc0..2e7d6448 100644 --- a/src/main/java/de/thm/arsnova/controller/LecturerQuestionController.java +++ b/src/main/java/de/thm/arsnova/controller/LecturerQuestionController.java @@ -758,8 +758,8 @@ public class LecturerQuestionController extends PaginationController { @RequestMapping(value = "/subjectsort", method = RequestMethod.POST) public void setSubjectSortOrder( @RequestParam(required = true) final String sessionkey, - @RequestParam(required = true) final String sorttype, - @RequestParam(required = true) final String ispreparation, + @RequestParam(required = true) final String sorttype, + @RequestParam(required = true) final String ispreparation, @RequestBody String[] sortOrder ) { try { diff --git a/src/main/java/de/thm/arsnova/controller/SessionController.java b/src/main/java/de/thm/arsnova/controller/SessionController.java index 15fd8a52..9cfb4472 100644 --- a/src/main/java/de/thm/arsnova/controller/SessionController.java +++ b/src/main/java/de/thm/arsnova/controller/SessionController.java @@ -75,24 +75,24 @@ 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", + notes = "Repsonse structure: none, encoding-type: application/json") @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", + notes = "Repsonse structure: none, encoding-type: application/json") @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", + notes = "countActiveUsers(@ApiParam(value = \"Session-Key from current session\", required = true)") @DeprecatedApi @Deprecated @RequestMapping(value = "/{sessionkey}/activeusercount", method = RequestMethod.GET) @@ -101,8 +101,8 @@ 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", + notes = "Repsonse structure: Session, encoding-type: application/json") @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 +134,8 @@ 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", + notes = "Request encoding: none, Repsonse structure: Session, encoding-type: application/json") @RequestMapping(value = "/{sessionkey}", method = RequestMethod.PUT) public Session updateSession( @ApiParam(value = "session-key from current session", required = true) @PathVariable final String sessionkey, @@ -145,8 +145,8 @@ 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", + notes = "Request encoding: Query string, Repsonse structure: Session[], encoding-type: application/json") @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 +196,8 @@ 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", + notes = "Request encoding: none, Repsonse structure: Session, encoding-type: application/json") @ApiResponses(value = { @ApiResponse(code = 204, message = "No Content - successfully processed the request") }) @@ -229,8 +229,8 @@ 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", + notes = "Request encoding: none, Repsonse structure: Session[], encoding-type: application/json") @ApiResponses(value = { @ApiResponse(code = 204, message = "No Content - successfully processed the request") }) @@ -249,8 +249,8 @@ 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", + notes = "Request encoding: none, Repsonse structure: Session[], encoding-type: application/json") @ApiResponses(value = { @ApiResponse(code = 204, message = "No Content - successfully processed the request") }) @@ -269,8 +269,8 @@ 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", + notes = "Request encoding: none, Repsonse structure: Session[], encoding-type: application/json") @RequestMapping(value = "/import", method = RequestMethod.POST) public SessionInfo importSession( @ApiParam(value = "current session", required = true) @RequestBody final ImportExportSession session, @@ -280,8 +280,8 @@ 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", + notes = "Request encoding: Query string, Repsonse structure: Session, encoding-type: application/json") @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 +299,8 @@ 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", + notes = "Request encoding: none, Repsonse structure: LearningProgressValues[], encoding-type: application/json") @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 +312,8 @@ 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", + notes = "Request encoding: none, Repsonse structure: LearningProgressValues, encoding-type: application/json") @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 +325,8 @@ 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", + notes = "Request encoding: none, Repsonse structure: SessionFeature, encoding-type: application/json") @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 +337,8 @@ 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", + notes = "Request encoding: none, Repsonse structure: SessionFeature, encoding-type: application/json") 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 15eea690..2714b915 100644 --- a/src/main/java/de/thm/arsnova/controller/SocketController.java +++ b/src/main/java/de/thm/arsnova/controller/SocketController.java @@ -63,8 +63,8 @@ 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", + notes = "Request encoding: none, Repsonse structure: none, encoding-type: application/json") @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 +90,8 @@ 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", + notes = "Request encoding: none, Repsonse structure: none, encoding-type: application/json") @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 01492ebc..24e2d048 100644 --- a/src/main/java/de/thm/arsnova/controller/StatisticsController.java +++ b/src/main/java/de/thm/arsnova/controller/StatisticsController.java @@ -41,8 +41,8 @@ public class StatisticsController extends AbstractController { private IStatisticsService statisticsService; @ApiOperation(value = "Retrieves global statistics", - nickname = "getStatistics", - notes = "getStatistics()") + nickname = "getStatistics", + notes = "getStatistics()") @RequestMapping(method = RequestMethod.GET, value = "/statistics") @CacheControl(maxAge = 60, policy = CacheControl.Policy.PUBLIC) public Statistics getStatistics() { @@ -50,8 +50,8 @@ public class StatisticsController extends AbstractController { } @ApiOperation(value = "Retrieves the amount of all active users", - nickname = "countActiveUsers", - notes = "countActiveUsers()") + nickname = "countActiveUsers", + notes = "countActiveUsers()") @DeprecatedApi @Deprecated @RequestMapping(method = RequestMethod.GET, value = "/statistics/activeusercount", produces = "text/plain") @@ -60,8 +60,8 @@ public class StatisticsController extends AbstractController { } @ApiOperation(value = "Retrieves the amount of all currently logged in users", - nickname = "countLoggedInUsers", - notes = "countLoggedInUsers()") + nickname = "countLoggedInUsers", + notes = "countLoggedInUsers()") @DeprecatedApi @Deprecated @RequestMapping(method = RequestMethod.GET, value = "/statistics/loggedinusercount", produces = "text/plain") @@ -70,8 +70,8 @@ public class StatisticsController extends AbstractController { } @ApiOperation(value = "Retrieves the total amount of all sessions", - nickname = "countSessions", - notes = "countSessions()") + nickname = "countSessions", + notes = "countSessions()") @DeprecatedApi @Deprecated @RequestMapping(method = RequestMethod.GET, value = "/statistics/sessioncount", produces = "text/plain") diff --git a/src/main/java/de/thm/arsnova/entities/Answer.java b/src/main/java/de/thm/arsnova/entities/Answer.java index d95a074f..77356921 100644 --- a/src/main/java/de/thm/arsnova/entities/Answer.java +++ b/src/main/java/de/thm/arsnova/entities/Answer.java @@ -26,7 +26,7 @@ import com.wordnik.swagger.annotations.ApiModelProperty; * * This class has additional fields to transport generated answer statistics. */ -@ApiModel( value = "Answer" , description = "the Answer API") +@ApiModel(value = "Answer", description = "the Answer API") public class Answer { private String _id; diff --git a/src/main/java/de/thm/arsnova/entities/InterposedQuestion.java b/src/main/java/de/thm/arsnova/entities/InterposedQuestion.java index c046e135..ca70a85c 100644 --- a/src/main/java/de/thm/arsnova/entities/InterposedQuestion.java +++ b/src/main/java/de/thm/arsnova/entities/InterposedQuestion.java @@ -24,7 +24,7 @@ import com.wordnik.swagger.annotations.ApiModelProperty; /** * A question the user is asking the teacher. Also known as feedback or audience question. */ -@ApiModel( value = "audiencequestion" , description = "the Interposed Question API") +@ApiModel(value = "audiencequestion", description = "the Interposed Question API") public class InterposedQuestion { private String _id; @@ -49,6 +49,7 @@ public class InterposedQuestion { public void set_id(String _id) { this._id = _id; } + @ApiModelProperty(required = true, value = "used to display rev") public String get_rev() { return _rev; @@ -56,7 +57,7 @@ public class InterposedQuestion { public void set_rev(String _rev) { this._rev = _rev; } - + @ApiModelProperty(required = true, value = "is read") public boolean isRead() { return read; @@ -64,7 +65,7 @@ public class InterposedQuestion { public void setRead(boolean read) { this.read = read; } - + @ApiModelProperty(required = true, value = "used to display The type") public String getType() { return type; @@ -72,7 +73,7 @@ public class InterposedQuestion { public void setType(String type) { this.type = type; } - + @ApiModelProperty(required = true, value = "used to display Subject") public String getSubject() { return subject; @@ -80,7 +81,7 @@ public class InterposedQuestion { public void setSubject(String subject) { this.subject = subject; } - + @ApiModelProperty(required = true, value = "used to display Text") public String getText() { return text; @@ -88,7 +89,7 @@ public class InterposedQuestion { public void setText(String text) { this.text = text; } - + @ApiModelProperty(required = true, value = "used to display Session id") public String getSessionId() { return sessionId; @@ -96,7 +97,7 @@ public class InterposedQuestion { public void setSessionId(String sessionId) { this.sessionId = sessionId; } - + @ApiModelProperty(required = true, value = "used to display Timetamp") public long getTimestamp() { return timestamp; diff --git a/src/main/java/de/thm/arsnova/entities/InterposedReadingCount.java b/src/main/java/de/thm/arsnova/entities/InterposedReadingCount.java index bb6d36bc..31d4b54b 100644 --- a/src/main/java/de/thm/arsnova/entities/InterposedReadingCount.java +++ b/src/main/java/de/thm/arsnova/entities/InterposedReadingCount.java @@ -23,7 +23,7 @@ import com.wordnik.swagger.annotations.ApiModelProperty; /** * Wrapper class for counting read and unread interposed questions for a session or a single user. */ -@ApiModel(value = "audiencequestion/readcount" , description = "the Interposed reading count API") +@ApiModel(value = "audiencequestion/readcount", description = "the Interposed reading count API") public class InterposedReadingCount { private int read; diff --git a/src/main/java/de/thm/arsnova/entities/LearningProgressOptions.java b/src/main/java/de/thm/arsnova/entities/LearningProgressOptions.java index d5340d70..d363f0db 100644 --- a/src/main/java/de/thm/arsnova/entities/LearningProgressOptions.java +++ b/src/main/java/de/thm/arsnova/entities/LearningProgressOptions.java @@ -22,7 +22,7 @@ import com.wordnik.swagger.annotations.ApiModelProperty; /** * A session's settings regarding the calculation of the learning progress. */ -@ApiModel( value = "learning progress options" , description = "the learning progress API") +@ApiModel(value = "learning progress options", description = "the learning progress API") public class LearningProgressOptions { private String type = "questions"; diff --git a/src/main/java/de/thm/arsnova/entities/PossibleAnswer.java b/src/main/java/de/thm/arsnova/entities/PossibleAnswer.java index bb79c6a4..cdb3cf09 100644 --- a/src/main/java/de/thm/arsnova/entities/PossibleAnswer.java +++ b/src/main/java/de/thm/arsnova/entities/PossibleAnswer.java @@ -23,7 +23,7 @@ import com.wordnik.swagger.annotations.ApiModelProperty; /** * This class represents an answer option of a question. */ -@ApiModel( value = "session/answer" , description = "the Possible Answer API") +@ApiModel(value = "session/answer", description = "the Possible Answer API") public class PossibleAnswer { private String id; diff --git a/src/main/java/de/thm/arsnova/entities/Question.java b/src/main/java/de/thm/arsnova/entities/Question.java index e2cec597..9fc623e2 100644 --- a/src/main/java/de/thm/arsnova/entities/Question.java +++ b/src/main/java/de/thm/arsnova/entities/Question.java @@ -25,7 +25,7 @@ import com.wordnik.swagger.annotations.ApiModelProperty; /** * A question the teacher is asking. */ -@ApiModel( value = "lecturerquestion" , description = "the Question API") +@ApiModel(value = "lecturerquestion", description = "the Question API") public class Question { private String type; @@ -109,6 +109,7 @@ public class Question { public final void setQuestionVariant(final String questionVariant) { this.questionVariant = questionVariant; } + @ApiModelProperty(required = true, value = "used to display subject") public final String getSubject() { return subject; diff --git a/src/main/java/de/thm/arsnova/entities/Session.java b/src/main/java/de/thm/arsnova/entities/Session.java index 9601de4e..bc0e41d6 100644 --- a/src/main/java/de/thm/arsnova/entities/Session.java +++ b/src/main/java/de/thm/arsnova/entities/Session.java @@ -27,7 +27,7 @@ import com.fasterxml.jackson.annotation.JsonIgnore; /** * Represents an ARSnova session. */ -@ApiModel( value = "session" , description = "the Session API") +@ApiModel(value = "session", description = "the Session API") public class Session implements Serializable { private static final long serialVersionUID = 1L; @@ -221,7 +221,7 @@ public class Session implements Serializable { public void setCreationTime(long creationTime) { this.creationTime = creationTime; } - + @ApiModelProperty(required = true, value = "used to display learnin progress options") public LearningProgressOptions getLearningProgressOptions() { return learningProgressOptions; @@ -257,7 +257,7 @@ public class Session implements Serializable { public void setPpAuthorMail(final String ppAuthorMail) { this.ppAuthorMail = ppAuthorMail; } - + @ApiModelProperty(required = true, value = "used to display university") public String getPpUniversity() { return ppUniversity; diff --git a/src/main/java/de/thm/arsnova/entities/SessionFeature.java b/src/main/java/de/thm/arsnova/entities/SessionFeature.java index a1dca40c..dd0b5549 100644 --- a/src/main/java/de/thm/arsnova/entities/SessionFeature.java +++ b/src/main/java/de/thm/arsnova/entities/SessionFeature.java @@ -22,7 +22,7 @@ import com.wordnik.swagger.annotations.ApiModelProperty; /** * Contains fields that describe which specific feature is activated for a session. */ -@ApiModel( value = "session feature" , description = "the Session feature API") +@ApiModel(value = "session feature", description = "the Session feature API") public class SessionFeature { private boolean jitt = true; diff --git a/src/main/java/de/thm/arsnova/entities/SessionInfo.java b/src/main/java/de/thm/arsnova/entities/SessionInfo.java index 14d95a04..559de935 100644 --- a/src/main/java/de/thm/arsnova/entities/SessionInfo.java +++ b/src/main/java/de/thm/arsnova/entities/SessionInfo.java @@ -26,7 +26,7 @@ import com.wordnik.swagger.annotations.ApiModelProperty; * Summary information of a specific session. For example, this is used to display list entries of 'my sessions' as well * as 'my visited sessions'. */ -@ApiModel( value = "session/import" , description = "the session info API") +@ApiModel(value = "session/import", description = "the session info API") public class SessionInfo { private String name; diff --git a/src/main/java/de/thm/arsnova/entities/Statistics.java b/src/main/java/de/thm/arsnova/entities/Statistics.java index 572a9819..7cf2b29d 100644 --- a/src/main/java/de/thm/arsnova/entities/Statistics.java +++ b/src/main/java/de/thm/arsnova/entities/Statistics.java @@ -23,7 +23,7 @@ import com.wordnik.swagger.annotations.ApiModelProperty; /** * Collection of several statistics about ARSnova. */ -@ApiModel(value = "statistics" , description = "the Statistic API") +@ApiModel(value = "statistics", description = "the Statistic API") public class Statistics { private int answers; diff --git a/src/main/java/de/thm/arsnova/entities/transport/Answer.java b/src/main/java/de/thm/arsnova/entities/transport/Answer.java index 3875c414..50979d4f 100644 --- a/src/main/java/de/thm/arsnova/entities/transport/Answer.java +++ b/src/main/java/de/thm/arsnova/entities/transport/Answer.java @@ -30,7 +30,7 @@ import de.thm.arsnova.entities.User; * A user's answer to a question. */ @JsonInclude(JsonInclude.Include.NON_DEFAULT) -@ApiModel( value = "session/answer" , description = "the Answer API") +@ApiModel(value = "session/answer", description = "the Answer API") public class Answer { private String answerSubject; @@ -49,6 +49,7 @@ public class Answer { public void setAnswerText(String answerText) { this.answerText = answerText; } + @ApiModelProperty(required = true, value = "used to display subject answer") public String getAnswerSubject() { return answerSubject; diff --git a/src/main/java/de/thm/arsnova/entities/transport/ImportExportSession.java b/src/main/java/de/thm/arsnova/entities/transport/ImportExportSession.java index 390787f9..f9cb68ba 100644 --- a/src/main/java/de/thm/arsnova/entities/transport/ImportExportSession.java +++ b/src/main/java/de/thm/arsnova/entities/transport/ImportExportSession.java @@ -29,7 +29,7 @@ import com.wordnik.swagger.annotations.ApiModelProperty; /** * This class is used to allow the import and export of a session. */ -@ApiModel( value = "session/import and export" , description = "the import export session API") +@ApiModel(value = "session/import and export", description = "the import export session API") public class ImportExportSession { private ImportExportSesssion session; @@ -199,7 +199,7 @@ public class ImportExportSession { this.ppAuthorMail = ppAuthorMail; } - @ApiModelProperty( required = true, value = "used to display university") + @ApiModelProperty(required = true, value = "used to display university") public String getPpUniversity() { return ppUniversity; } diff --git a/src/main/java/de/thm/arsnova/entities/transport/InterposedQuestion.java b/src/main/java/de/thm/arsnova/entities/transport/InterposedQuestion.java index da14011e..35f97b13 100644 --- a/src/main/java/de/thm/arsnova/entities/transport/InterposedQuestion.java +++ b/src/main/java/de/thm/arsnova/entities/transport/InterposedQuestion.java @@ -25,14 +25,14 @@ import com.wordnik.swagger.annotations.ApiModelProperty; /** * A question a student is asking. Also known as feedback or audience question. */ -@ApiModel(value = "audiencequestion/{questionId}" , description = "the Interposed Question API") +@ApiModel(value = "audiencequestion/{questionId}", description = "the Interposed Question API") public class InterposedQuestion { - private String id; - private String subject; - private String text; - private long timestamp; - private boolean read; + private String id; + private String subject; + private String text; + private long timestamp; + private boolean read; public static List<InterposedQuestion> fromList(List<de.thm.arsnova.entities.InterposedQuestion> questions) { ArrayList<InterposedQuestion> interposedQuestions = new ArrayList<InterposedQuestion>(); @@ -43,15 +43,10 @@ public class InterposedQuestion { } public InterposedQuestion(de.thm.arsnova.entities.InterposedQuestion question) { - this.id = question.get_id(); - this.subject = question.getSubject(); - this.text = question.getText(); - this.timestamp = question.getTimestamp(); - this.read = question.isRead(); } diff --git a/src/main/java/de/thm/arsnova/entities/transport/LearningProgressValues.java b/src/main/java/de/thm/arsnova/entities/transport/LearningProgressValues.java index 8b641b99..10f79605 100644 --- a/src/main/java/de/thm/arsnova/entities/transport/LearningProgressValues.java +++ b/src/main/java/de/thm/arsnova/entities/transport/LearningProgressValues.java @@ -23,7 +23,7 @@ import com.wordnik.swagger.annotations.ApiModelProperty; /** * The calculated learning progress along with meta-data. */ -@ApiModel( value = "session/{sessionkey}/learningprogress" , description = "the learning progress API") +@ApiModel(value = "session/{sessionkey}/learningprogress", description = "the learning progress API") public class LearningProgressValues { private int courseProgress; -- GitLab