Examples of ForumTopic


Examples of com.ibm.sbt.services.client.connections.forums.ForumTopic

  protected Element pinned() {
    if (!isForumTopic()) {
      return null;
    }
    ForumTopic topic = (ForumTopic) entity;
    return topic.isPinned() ? element(CATEGORY,
        attribute(SCHEME, Namespace.FLAGS.getUrl()),
        attribute(TERM, PINNED)) : null;
  }
View Full Code Here

Examples of com.ibm.sbt.services.client.connections.forums.ForumTopic

  protected Element question() {
    if (!isForumTopic()) {
      return null;
    }
    ForumTopic topic = (ForumTopic) entity;
    return topic.isQuestion() ? element(CATEGORY,
        attribute(SCHEME, Namespace.FLAGS.getUrl()),
        attribute(TERM, QUESTION)) : null;
  }
View Full Code Here

Examples of com.ibm.sbt.services.client.connections.forums.ForumTopic

    }
   
    protected ForumTopic createForumTopic(Forum forum, String title, String content) {
      ForumService forumService = getForumService();
     
      ForumTopic forumTopic = new ForumTopic(forumService);
      forumTopic.setForumUuid(forum.getForumUuid());
      forumTopic.setTitle(title);
      forumTopic.setContent(content);
     
      try {
        return forumService.createForumTopic(forumTopic);
      } catch (Exception fse) {
        fail("Error creating forum topic", fse);
View Full Code Here

Examples of com.mossle.forum.domain.ForumTopic

    }

    @RequestMapping("forum-post-view")
    public String view(@RequestParam("id") Long id, Model model)
            throws Exception {
        ForumTopic forumTopic = forumTopicManager.get(id);
        model.addAttribute("forumTopic", forumTopic);

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

Examples of com.mossle.forum.domain.ForumTopic

    @RequestMapping("forum-topic-input")
    public String input(@RequestParam(value = "id", required = false) Long id,
            Model model) {
        if (id != null) {
            ForumTopic forumTopic = forumTopicManager.get(id);
            model.addAttribute("model", forumTopic);
        }

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

Examples of com.mossle.forum.domain.ForumTopic

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

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

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

        forumTopicManager.save(dest);

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

Examples of org.focusns.model.forum.ForumTopic

    @Autowired
    private ForumTopicService forumTopicService;

    @Test
    public void createForumTopic() {
        ForumTopic topic = new ForumTopic();
        topic.setTitle("forum title");
        topic.setContent("forum content");
        topic.setCreatedAt(new Date());
        topic.setModifiedAt(new Date());
        topic.setCreatedById(1);
        topic.setModifiedById(1);
        topic.setProjectId(1);
        topic.setCategoryId(1);
        //
        forumTopicService.createForumTopic(topic);
    }
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.