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

Examples of com.ibm.sbt.services.client.connections.blogs.serializers.BlogPostSerializer


   */
  public BlogPost createBlogPost(BlogPost post, String blogHandle) throws ClientServicesException {
    if (null == post){
      throw new ClientServicesException(null,"null post");
    }
    BlogPostSerializer serializer = new BlogPostSerializer(post);
    String payload = serializer.createPayload();

    String createPostUrl = BlogUrls.CREATE_BLOG_POST.format(this, BlogUrlParts.blogHandle.get(blogHandle));
    Response response = createData(createPostUrl, null, getAtomHeaders(), payload);
    checkResponseCode(response, HTTPCode.CREATED);
    post = getBlogPostFeedHandler().createEntity(response);
View Full Code Here


    if(post.getFieldsMap().get(AtomXPath.content)== null)
      post.setContent(post.getContent());
    if(!post.getFieldsMap().toString().contains(BlogXPath.tags.toString()))
      post.setTags(post.getTags());
     
    BlogPostSerializer serializer = new BlogPostSerializer(post);
    String payload = serializer.updatePayload();
     
    String updatePostUrl = BlogUrls.UPDATE_REMOVE_POST.format(this, BlogUrlParts.blogHandle.get(blogHandle), BlogUrlParts.entryAnchor.get(post.getUid()));
    Response response = updateData(updatePostUrl, null, payload, null);
    checkResponseCode(response, HTTPCode.OK);
    post = getBlogPostFeedHandler().createEntity(response);
View Full Code Here

TOP

Related Classes of com.ibm.sbt.services.client.connections.blogs.serializers.BlogPostSerializer

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.