Package com.ibm.sbt.services.client

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


      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


      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

        String accessType = AccessType.AUTHENTICATED.getText();

        String requestUri = FileUrls.COLLECTIONS_FEED.format(this, FileUrlParts.accessType.get(accessType));
        String payload = new FileSerializer(folder).generateFileUpdatePayload();

        Response response = createData(requestUri, null, new ClientService.ContentString(payload,
                CommonConstants.APPLICATION_ATOM_XML));
        checkResponseCode(response, HTTPCode.CREATED);
        File r = getFileFeedHandler().createEntity(response);
        folder.clearFieldsMap();
        folder.setDataHandler(r.getDataHandler());
View Full Code Here

   *         topicUuid which is to be deleted
   * @throws ClientServicesException
   */
  public void deleteForumTopic(String topicUuid) throws ClientServicesException {
    String deleteTopicUrl = ForumUrls.TOPIC.format(this, ForumUrls.topicPart(topicUuid));
    Response response = deleteData(deleteTopicUrl, null, null);
    checkResponseCode(response, HTTPCode.NO_CONTENT);
  }
View Full Code Here

     */
    public void deleteFolder(String folderId) throws ClientServicesException {
        String accessType = AccessType.AUTHENTICATED.getText();
        String requestUri = FileUrls.COLLECTION_ENTRY.format(this, FileUrlParts.accessType.get(accessType),
                FileUrlParts.folderId.get(folderId));
        Response response = deleteData(requestUri, null, null);
        checkResponseCode(response, HTTPCode.NO_CONTENT);
    }
View Full Code Here

    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

                FileUrlParts.folderId.get(folder.getFileId()));
        String payload = new FileSerializer(folder).generateFileUpdatePayload();
        Map<String, String> headers = new HashMap<String, String>();
        headers.put(Headers.ContentType, Headers.ATOM);

        Response response = updateData(requestUri, null, headers, payload, null);
        checkResponseCode(response, HTTPCode.OK);
        File r = getFileFeedHandler().createEntity(response);
        folder.clearFieldsMap();
        folder.setDataHandler(r.getDataHandler());
        return folder;
View Full Code Here

      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

   *         replyUuid which is to be deleted
   * @throws ClientServicesException
   */
  public void deleteForumReply(String replyUuid) throws ClientServicesException {
    String deleteReplyUrl = ForumUrls.REPLY.format(this, ForumUrls.replyPart(replyUuid));
    Response response = deleteData(deleteReplyUrl, null, null);
    checkResponseCode(response, HTTPCode.NO_CONTENT);
  }
View Full Code Here

        Map<String, String> params = new HashMap<String, String>();
        params.put(FileRequestParams.SHAREDWHAT.getFileRequestParams(), fileId);
        if (!StringUtil.isEmpty(userId)) {
            params.put(FileRequestParams.SHAREDWITH.getFileRequestParams(), userId);
        }
        Response response = deleteData(requestUri, params, null);
        checkResponseCode(response, HTTPCode.NO_CONTENT);
    }
View Full Code Here

TOP

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

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.