Examples of ForumPost


Examples of com.mossle.forum.domain.ForumPost

    @RequestMapping("forum-post-input")
    public String input(@RequestParam(value = "id", required = false) Long id,
            Model model) {
        if (id != null) {
            ForumPost forumPost = forumPostManager.get(id);
            model.addAttribute("model", forumPost);
        }

        return "forum/forum-post-input";
    }
View Full Code Here

Examples of com.mossle.forum.domain.ForumPost

    @RequestMapping("forum-post-save")
    public String save(@ModelAttribute ForumPost forumPost,
            @RequestParam Map<String, Object> parameterMap,
            RedirectAttributes redirectAttributes) {
        ForumPost dest = null;
        Long id = forumPost.getId();

        if (id != null) {
            dest = forumPostManager.get(id);
            beanMapper.copy(forumPost, dest);
        } else {
            dest = forumPost;

            String userId = SpringSecurityUtils.getCurrentUserId();
            dest.setUserId(Long.parseLong(userId));
            dest.setCreateTime(new Date());
        }

        forumPostManager.save(dest);

        messageHelper.addFlashMessage(redirectAttributes, "core.success.save",
View Full Code Here

Examples of org.focusns.model.forum.ForumPost

    @Autowired
    private ForumPostService forumPostService;

    @Test
    public void createForumPost() {
        ForumPost post = new ForumPost();
        post.setTitle("post title");
        post.setContent("post content");
        post.setCreatedAt(new Date());
        post.setModifiedAt(new Date());
        post.setCreatedById(1);
        post.setModifiedById(1);
        post.setProjectId(1);
        post.setTopicId(1);
        //
        forumPostService.createForumPost(post);
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.