Package com.ibm.sbt.services.client

Examples of com.ibm.sbt.services.client.ClientServicesException


   * @return Response
   * @throws ClientServicesException
   */
  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()));

View Full Code Here


   * @return ForumTopic
   * @throws ClientServicesException
   */
  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());
View Full Code Here

   * @param ForumTopic
   * @throws ClientServicesException
   */
  public void updateForumTopic(ForumTopic topic) throws ClientServicesException {
    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);
View Full Code Here

   * @return void
   * @throws ClientServicesException
   */
  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);
View Full Code Here

   * @return Topic
   * @throws ClientServicesException
   */
  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());
View Full Code Here

   ****************************************************************/

  protected void checkVersion() throws ClientServicesException{
    if (!getApiVersion().isAtLeast(v4_5)){
      UnsupportedOperationException ex = new UnsupportedOperationException("This API is only supported on connections 4.5 or above");
      throw new ClientServicesException(ex);
    }
  }
View Full Code Here

   * @throws ClientServicesException
   */
  public Blog createBlog(Blog blog, Map<String, String> parameters) throws ClientServicesException {
    String requestUrl = BlogUrls.MY_BLOGS.format(this, BlogUrlParts.blogHandle.get(defaultHomepageHandle));
    if (null == blog) {
      throw new ClientServicesException(null,"null blog");
    }
    BlogSerializer serializer = new BlogSerializer(blog);
    String payload = serializer.createPayload();
    Response response = createData(requestUrl, parameters, getAtomHeaders(), payload);
    checkResponseCode(response, HTTPCode.CREATED);
View Full Code Here

   * @param Blog
   * @throws ClientServicesException
   */
  public void updateBlog(Blog blog) throws ClientServicesException {
    if (null == blog){
      throw new ClientServicesException(null,"null blog");
    }
    if(blog.getFieldsMap().get(AtomXPath.title)== null)
      blog.setTitle(blog.getTitle());
    if(blog.getFieldsMap().get(AtomXPath.summary)== null)
      blog.setSummary(blog.getSummary());
View Full Code Here

   * @return BlogPost
   * @throws ClientServicesException
   */
  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));
View Full Code Here

   * @param response
   * @param msg
   * @param params
   */
  public BssException(Response response, String msg, Object...params) {
    super(new ClientServicesException(response.getResponse(), response.getRequest()), msg, params);
  }
View Full Code Here

TOP

Related Classes of com.ibm.sbt.services.client.ClientServicesException

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.