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

Examples of com.ibm.sbt.services.client.connections.forums.serializers.ForumSerializer


   */
  public Forum createForum(Forum forum) throws ClientServicesException {
    if (null == forum){
      throw new ClientServicesException(null,"null forum");
    }
    ForumSerializer serializer = new ForumSerializer(forum);

    String url = ForumUrls.FORUMS.format(this);
    Response response = createData(url, null, getAtomHeaders(), serializer.generateCreate());
    checkResponseCode(response, HTTPCode.CREATED);
    forum = getForumFeedHandler(false).createEntity(response);

    return forum;
  }
View Full Code Here


  public void updateForum(Forum forum) throws ClientServicesException {
    if (null == forum){
      throw new ClientServicesException(null,"null forum");
    }

    ForumSerializer serializer = new ForumSerializer(forum);
    String url = ForumUrls.FORUM.format(this, ForumUrls.forumPart(forum.getForumUuid()));

    Response response = updateData(url, null, serializer.generateUpdate(), null);
    checkResponseCode(response, HTTPCode.OK);
  }
View Full Code Here

   */
  public ForumTopic createForumTopic(ForumTopic topic, String forumUuid) throws ClientServicesException {
    if (null == topic){
      throw new ClientServicesException(null,"Topic object passed was null");
    }
    ForumSerializer serializer = new ForumSerializer(topic);

    String url = ForumUrls.FORUM_TOPICS.format(this, ForumUrls.forumPart(forumUuid));
    Response response = createData(url, null, getAtomHeaders(), serializer.generateCreate());
    checkResponseCode(response, HTTPCode.CREATED);
    topic = getForumTopicFeedHandler(false).createEntity(response);

    return topic;
  }
View Full Code Here

    if (null == topic || StringUtil.isEmpty(topic.getUid())) {
      throw new ClientServicesException(null,"Topic object passed was null");
    }
    String url = ForumUrls.TOPIC.format(this, ForumUrls.topicPart(topic.getUid()));
   
    ForumSerializer serializer = new ForumSerializer(topic);
    Response response = getClientService().put(url, null, getAtomHeaders(), serializer.generateUpdate(),ClientService.FORMAT_NULL);
    checkResponseCode(response, HTTPCode.OK);
  }
View Full Code Here

   */
  public ForumReply createForumReply(String topicUuid, ForumReply reply) throws ClientServicesException {
    if(StringUtil.isEmpty(reply.getTopicUuid())){
      reply.setTopicUuid(topicUuid);
    }
    ForumSerializer serializer = new ForumSerializer(reply);
    String url = ForumUrls.TOPIC_REPLIES.format(this, ForumUrls.topicPart(topicUuid));
    Response response = createData(url, null, getAtomHeaders(), serializer.generateCreate());
    checkResponseCode(response, HTTPCode.CREATED);
    reply = getForumReplyFeedHandler(false).createEntity(response);

    return reply;
  }
View Full Code Here

  public void updateForumReply(ForumReply reply) throws ClientServicesException {
    if (null == reply){
      throw new ClientServicesException(null,"Reply object passed was null");
    }
   
    ForumSerializer serializer = new ForumSerializer(reply);
    String url = ForumUrls.REPLY.format(this, ForumUrls.replyPart(reply.getReplyUuid()));
    Response response = updateData(url, null, getAtomHeaders(), serializer.generateUpdate(), null);
    checkResponseCode(response, HTTPCode.OK);
  }
View Full Code Here

   */
  public ForumTopic createCommunityForumTopic(ForumTopic topic, String communityUuid) throws ClientServicesException {
    if (null == topic){
      throw new ClientServicesException(null,"Topic object passed was null");
    }
    ForumSerializer serializer = new ForumSerializer(topic);

    String postUrl = ForumUrls.COMMUNITY_TOPICS.format(this, ForumUrls.communityPart(communityUuid));
    Response response = createData(postUrl, null, getAtomHeaders(), serializer.generateCreate());
    checkResponseCode(response, HTTPCode.CREATED);
    topic = getForumTopicFeedHandler().createEntity(response);

    return topic;
  }
View Full Code Here

TOP

Related Classes of com.ibm.sbt.services.client.connections.forums.serializers.ForumSerializer

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.