Package org.jtalks.jcommune.plugin.api.web.dto

Examples of org.jtalks.jcommune.plugin.api.web.dto.TopicDto


    public ModelAndView editTopicPage(@PathVariable(TOPIC_ID) Long topicId) throws NotFoundException {
        Topic topic = topicFetchService.get(topicId);
        if (topic.getCodeReview() != null) {
            throw new AccessDeniedException("Edit page for code review");
        }
        TopicDto topicDto = new TopicDto(topic);

        return new ModelAndView(TOPIC_VIEW)
                .addObject(BRANCH_ID, topic.getBranch().getId())
                .addObject(TOPIC_DTO, topicDto)
                .addObject(POLL, topic.getPoll())
View Full Code Here


    @RequestMapping(value = "/reviews/new", method = RequestMethod.GET)
    public ModelAndView showNewCodeReviewPage(@RequestParam(BRANCH_ID) Long branchId) throws NotFoundException {
        Branch branch = branchService.get(branchId);
        Topic topic = new Topic();
        topic.setBranch(branch);
        TopicDto dto = new TopicDto(topic);
        return new ModelAndView(CODE_REVIEW_VIEW)
                .addObject(TOPIC_DTO, dto)
                .addObject(BRANCH_ID, branchId)
                .addObject(SUBMIT_URL, "/reviews/new?branchId=" + branchId)
                .addObject(BREADCRUMB_LIST, breadcrumbBuilder.getNewTopicBreadcrumb(branch));
View Full Code Here

        VelocityEngine engine = new VelocityEngine(getProperties());
        engine.init();
        Branch branch = TransactionalPluginBranchService.getInstance().get(branchId);
        Topic topic = new Topic();
        topic.setBranch(branch);
        TopicDto dto = new TopicDto(topic);
        Map<String, Object> data = getDefaultModel(request);
        data.put("breadcrumbList", breadcrumbBuilder.getForumBreadcrumb(topic));
        data.put("topicDto", dto);
        model.addAttribute("content", VelocityEngineUtils.mergeTemplateIntoString(engine,
                "org/jtalks/jcommune/plugin/questionsandanswers/template/questionForm.vm", "UTF-8", data));
View Full Code Here

TOP

Related Classes of org.jtalks.jcommune.plugin.api.web.dto.TopicDto

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.