Package org.jtalks.jcommune.web.dto.json

Examples of org.jtalks.jcommune.web.dto.json.FailValidationJsonResponse


    public JsonResponse addComment(
            @Valid @ModelAttribute CodeReviewCommentDto commentDto,
            BindingResult bindingResult,
            @RequestParam("reviewId") Long reviewId) throws NotFoundException {
        if (bindingResult.hasErrors()) {
            return new FailValidationJsonResponse(bindingResult.getAllErrors());
        }
        CodeReviewComment addedComment = codeReviewService.addComment(
                reviewId, commentDto.getLineNumber(), commentDto.getBody());
        CodeReviewCommentDto addedCommentDto = new CodeReviewCommentDto(addedComment);
        return new JsonResponse(JsonResponseStatus.SUCCESS, addedCommentDto);
View Full Code Here


    public JsonResponse editComment(
            @Valid @ModelAttribute CodeReviewCommentDto commentDto,
            BindingResult bindingResult,
            @RequestParam("branchId") long branchId) throws NotFoundException {
        if (bindingResult.hasErrors()) {
            return new FailValidationJsonResponse(bindingResult.getAllErrors());
        }
        CodeReviewComment editedComment = codeReviewCommentService.updateComment(
                commentDto.getId(), commentDto.getBody(), branchId);
        CodeReviewCommentDto editedCommentDto = new CodeReviewCommentDto(editedComment);
        return new JsonResponse(JsonResponseStatus.SUCCESS, editedCommentDto);
View Full Code Here

TOP

Related Classes of org.jtalks.jcommune.web.dto.json.FailValidationJsonResponse

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.