Package com.ibm.sbt.services.client.connections.forums

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


    try {
      loginConnections();
    } catch (AuthenticationException e) {
      e.printStackTrace();
    }
    forumService = new ForumService();
    Forum forum = new Forum(forumService);
    forum.setTitle("Test forum 1ab" + System.currentTimeMillis());
    forum.setContent("Test forum created by Create Forum Java snippet");
    List<String> tags = new ArrayList<String>();
    tags.add("tag1");
View Full Code Here


      forum = null;
      destroyContext();
    }
   
    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);
      }
     
      return null;
View Full Code Here

     
      return null;
    }
   
    protected ForumTopic getForumTopic(String topicUuid, boolean failOnError) {
      ForumService forumService = getForumService();
     
      try {
        return forumService.getForumTopic(topicUuid);
      } catch (Exception fse) {
        if (failOnError) {
          fail("Error retrieving forum topic", fse);
        }
      }
View Full Code Here

     
      return null;
    }
   
    protected ForumReply getForumReply(String replyUuid, boolean failOnError) {
      ForumService forumService = getForumService();
     
      try {
        return forumService.getForumReply(replyUuid);
      } catch (Exception fse) {
        if (failOnError) {
          fail("Error retrieving forum reply", fse);
        }
      }
View Full Code Here

     
      return null;
    }
   
    protected ForumReply createForumReply(ForumTopic forumTopic, String title, String content) {
      ForumService forumService = getForumService();
     
      ForumReply forumReply = new ForumReply(forumService);
      forumReply.setTopicUuid(forumTopic.getTopicUuid());
      forumReply.setTitle(title);
      forumReply.setContent(content);
     
      try {
        return forumService.createForumReply(forumReply);
      } catch (Exception fse) {
        fail("Error creating forum reply", fse);
      }
     
      return null;
View Full Code Here

     
      return null;
    }
   
    protected ForumReply getForumReply(String replyUuid) {
      ForumService forumService = getForumService();
     
      try {
        return forumService.getForumReply(replyUuid);
      } catch (Exception fse) {
        fail("Error retrieving forum reply", fse);
      }
     
      return null;
View Full Code Here

      return this.getClass().getName() + "#" + this.hashCode() + " Forum Topic - " + System.currentTimeMillis();
    }
   
    protected ForumService getForumService() {
        if (forumService == null) {
            forumService = new ForumService(getEndpointName());
        }
        return forumService;
    }
View Full Code Here

    protected Forum getLastCreatedForum() {
        Forum forum = null;
        try {
            loginConnections();
           
            ForumService forumService = getForumService();
            EntityList<Forum> forums = forumService.getMyForums();
            forum = (Forum)forums.iterator().next();
            Trace.log("Last created forum: "+forum.getForumUuid());
            Trace.log("Last created forum: "+forum.getPublished());
            Iterator<Forum> i = forums.iterator();
            while (i.hasNext()) {
View Full Code Here

    protected Forum getForum(String forumUuid, boolean failOnCse) {
        Forum forum = null;
        try {
            loginConnections();
           
            ForumService forumService = getForumService();
            forum = forumService.getForum(forumUuid);
            Trace.log("Got forum: "+forum.getForumUuid());
        } catch (AuthenticationException pe) {
          if (pe.getCause() != null) {
            pe.getCause().printStackTrace();
          }
View Full Code Here

   
    protected Forum createForum(String title, String type, String content, String tags, boolean retry) {
        Forum forum = null;
        try {
            loginConnections();
            ForumService forumService = getForumService();
           
          long start = System.currentTimeMillis();
            forum = new Forum(forumService, "");
            forum.setTitle(title);
            forum.setContent(content);
            forum.setTags(tags);
            forum = forumService.createForum(forum);
            forum = forumService.getForum(forum.getForumUuid());
           
            long duration = System.currentTimeMillis() - start;
            Trace.log("Created test forum: "+forum.getForumUuid() + " took "+duration+"(ms)");
        } catch (AuthenticationException pe) {
          if (pe.getCause() != null) {
View Full Code Here

TOP

Related Classes of com.ibm.sbt.services.client.connections.forums.ForumService

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.