Package play.mvc

Examples of play.mvc.Call


        Project project = Project.findByOwnerAndProjectName(ownerName, projectName);
        Issue issue = Issue.findByNumber(project, issueNumber);

        issue.removeVoter(UserApp.currentUser());

        Call call = routes.IssueApp.issue(ownerName, projectName, issueNumber);

        return redirect(call);
    }
View Full Code Here


    public static Result deleteComment(String ownerName, String projectName, String commitId,
                                       Long id) {
        CommitComment codeComment = CommitComment.find.byId(id);
        codeComment.delete();

        Call toView = routes.CodeHistoryApp.show(ownerName, projectName, commitId);

        return redirect(toView);
    }
View Full Code Here

        if (post.readme) {
            post.setAuthor(UserApp.currentUser());
            commitReadmeFile(project, post);
            unmarkAnotherReadmePostingIfExists(project, number);
        }
        Call redirectTo = routes.BoardApp.post(project.owner, project.name, number);
        Runnable updatePostingBeforeUpdate = new Runnable() {
            @Override
            public void run() {
                post.comments = original.comments;
            }
View Full Code Here

    @Transactional
    @IsAllowed(value = Operation.DELETE, resourceType = ResourceType.BOARD_POST)
    public static Result deletePost(String owner, String projectName, Long number) {
        Project project = Project.findByOwnerAndProjectName(owner, projectName);
        Posting posting = Posting.findByNumber(project, number);
        Call redirectTo = routes.BoardApp.posts(project.owner, project.name, 1);

        return delete(posting, posting.asResource(), redirectTo);
    }
View Full Code Here

    @IsAllowed(value = Operation.READ, resourceType = ResourceType.BOARD_POST)
    @With(NullProjectCheckAction.class)
    public static Result newComment(String owner, String projectName, Long number) throws IOException {
        Project project = Project.findByOwnerAndProjectName(owner, projectName);
        final Posting posting = Posting.findByNumber(project, number);
        Call redirectTo = routes.BoardApp.post(project.owner, project.name, number);
        Form<PostingComment> commentForm = new Form<>(PostingComment.class)
                .bindFromRequest();

        if (commentForm.hasErrors()) {
            return badRequest(ErrorViews.BadRequest.render("error.validation", project, MenuType.BOARD));
View Full Code Here

    @Transactional
    @With(NullProjectCheckAction.class)
    public static Result deleteComment(String userName, String projectName, Long number, Long commentId) {
        Comment comment = PostingComment.find.byId(commentId);
        Project project = comment.asResource().getProject();
        Call redirectTo = routes.BoardApp.post(project.owner, project.name, number);

        return delete(comment, comment.asResource(), redirectTo);
    }
View Full Code Here

      M model = filledForm.get();
      dao.create(model);
      if (log.isDebugEnabled())
        log.debug("entity created");

      Call index = toIndex();
      if (log.isDebugEnabled())
        log.debug("index : " + index);
      return redirect(index);
    }
  }
View Full Code Here

        log.debug("model : " + model);
      dao.update(model);
      if (log.isDebugEnabled())
        log.debug("entity updated");

      Call index = toIndex();
      if (log.isDebugEnabled())
        log.debug("index : " + index);
      return redirect(index);
    }
  }
View Full Code Here

      if (log.isDebugEnabled())
        log.debug("entity not found for key:" + key);
      flash("error", "entity not found for key:" + key);
    }

    Call index = toIndex();
    if (log.isDebugEnabled())
      log.debug("index : " + index);
    return redirect(index);
  }
View Full Code Here

TOP

Related Classes of play.mvc.Call

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.