Examples of ForumTopic


Examples of com.apress.progwt.client.domain.forum.ForumTopic

        User author = commandService.get(User.class, authorID);

        commandService.assertUserIsAuthenticated(author);

        ForumTopic loadedTopic = commandService.get(forumPost
                .getTopicClass(), topicID);
        ForumPost threadP = commandService.get(ForumPost.class, threadID);

        Log.debug("SaveForumPostCommand" + toString());
View Full Code Here

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

    public void testUpdateForumTopic() {
        String updatedTitle = "Updated Title - " + System.currentTimeMillis();
        String updatedContent = "Updated Content - " + System.currentTimeMillis();
       
      String title = createForumTopicName();
      ForumTopic forumTopic = createForumTopic(forum, title, title);
        addSnippetParam("ForumService.topicUuid", forumTopic.getTopicUuid());
        addSnippetParam("ForumService.topicTitle", updatedTitle);
        addSnippetParam("ForumService.topicContent", updatedContent);
       
        JavaScriptPreviewPage previewPage = executeSnippet(SNIPPET_ID);
        JsonJavaObject json = previewPage.getJson();
        Assert.assertNull("Unexpected error detected on page", json.getString("code"));
       
        forumTopic = getForumTopic(forumTopic.getTopicUuid(), true);
        Assert.assertEquals(forumTopic.getTopicUuid(), json.getString("getTopicUuid"));
        Assert.assertEquals(updatedTitle, forumTopic.getTitle());
        Assert.assertEquals(updatedContent, StringUtil.trim(forumTopic.getContent()));
    }
View Full Code Here

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

    }

    @Test
    public void testGetForumReply() {
      String title = createForumTopicName();
      ForumTopic forumTopic = createForumTopic(forum, title, title);
      ForumReply forumReply = createForumReply(forumTopic, title, title);
        addSnippetParam("ForumService.replyUuid", forumReply.getReplyUuid());
       
        JavaScriptPreviewPage previewPage = executeSnippet(SNIPPET_ID);
        JsonJavaObject json = previewPage.getJson();
View Full Code Here

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

    }

    @Test
    public void testCreateForumReply() {
      String title = createForumTopicName();
      ForumTopic forumTopic = createForumTopic(forum, title, title);
     
      addSnippetParam("ForumService.topicUuid", forumTopic.getTopicUuid());
     
        JavaScriptPreviewPage previewPage = executeSnippet(SNIPPET_ID);
        JsonJavaObject json = previewPage.getJson();
        Assert.assertNull("Unexpected error detected on page", json.getString("code"));
        assertForumReplyProperties(json);
View Full Code Here

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

    static final String SNIPPET_ID = "Social_Forums_API_DeleteForumReply";

    @Test
    public void testDeleteForumReply() {
      String title = createForumTopicName();
      ForumTopic forumTopic = createForumTopic(forum, title, title);
      ForumReply forumReply = createForumReply(forumTopic, title, title);
        addSnippetParam("ForumService.replyUuid", forumReply.getReplyUuid());
       
        JavaScriptPreviewPage previewPage = executeSnippet(SNIPPET_ID);
        JsonJavaObject json = previewPage.getJson();
View Full Code Here

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

    static final String SNIPPET_ID = "Social_Forums_API_DeleteForumTopic";

    @Test
    public void testDeleteForumTopic() {
      String title = createForumTopicName();
      ForumTopic forumTopic = createForumTopic(forum, title, title);
        addSnippetParam("ForumService.topicUuid", forumTopic.getTopicUuid());
       
        JavaScriptPreviewPage previewPage = executeSnippet(SNIPPET_ID);
        JsonJavaObject json = previewPage.getJson();
        Assert.assertNull("Unexpected error detected on page", json.getString("code"));
        Assert.assertEquals(forumTopic.getTopicUuid(), json.getString("topicUuid"));
       
        forumTopic = getForumTopic(forumTopic.getTopicUuid(), false);
        Assert.assertNull("Deleted forum topic is still available", forumTopic);
    }
View Full Code Here

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

    public void testUpdateForumReply() {
        String updatedTitle = "Updated Title - " + System.currentTimeMillis();
        String updatedContent = "Updated Content - " + System.currentTimeMillis();
       
      String title = createForumTopicName();
      ForumTopic forumTopic = createForumTopic(forum, title, title);
      ForumReply forumReply = createForumReply(forumTopic, title, title);
        addSnippetParam("ForumService.replyUuid", forumReply.getReplyUuid());
        addSnippetParam("ForumService.replyTitle", updatedTitle);
        addSnippetParam("ForumService.replyContent", updatedContent);
       
View Full Code Here

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

    }

    @Test
    public void testGetForumTopic() {
      String title = createForumTopicName();
      ForumTopic forumTopic = createForumTopic(forum, title, title);
        addSnippetParam("ForumService.topicUuid", forumTopic.getTopicUuid());
       
        JavaScriptPreviewPage previewPage = executeSnippet(SNIPPET_ID);
        JsonJavaObject json = previewPage.getJson();
        assertForumTopicValid(forumTopic, (JsonJavaObject)json);
    }
View Full Code Here

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

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

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

  protected Element locked() {
    if (!isForumTopic()) {
      return null;
    }
    ForumTopic topic = (ForumTopic) entity;
    return topic.isLocked() ? element(CATEGORY,
        attribute(SCHEME, Namespace.FLAGS.getUrl()),
        attribute(TERM, LOCKED)) : null;
  }
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.