Package com.ibm.sbt.services.client

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


        return getCommentEntityList(requestUri, params, null);
    }

    public File getFlaggedFile(String fileId) throws ClientServicesException {
        if (StringUtil.isEmpty(fileId)) {
            throw new ClientServicesException(null, Messages.Invalid_FileId);
        }
        String requestUri = getModerationUri(fileId, Categories.REVIEW.get(),
                ModerationContentTypes.DOCUMENTS.get());
        return getFileEntity(requestUri, null);
    }
View Full Code Here


     * @param fileId - fileId of the file to be locked.
     * @throws ClientServicesException
     */
    public void lock(String fileId) throws ClientServicesException {
        if (StringUtil.isEmpty(fileId)) {
            throw new ClientServicesException(null, Messages.Invalid_FileId);
        }
        String accessType = AccessType.AUTHENTICATED.getText();
        String requestUri = FileUrls.LOCK_FILE.format(this, FileUrlParts.accessType.get(accessType),
                FileUrlParts.fileId.get(fileId));
        Map<String, String> params = new HashMap<String, String>();
View Full Code Here

     * @param fileId
     * @throws ClientServicesException
     */
    public void pinFile(String fileId) throws ClientServicesException {
        if (StringUtil.isEmpty(fileId)) {
            throw new ClientServicesException(null, Messages.Invalid_FileId);
        }
        String accessType = AccessType.AUTHENTICATED.getText();
        String requestUri = FileUrls.MYFAVORITES_DOCUMENTS_FEED.format(this,
                FileUrlParts.accessType.get(accessType), FileUrlParts.fileId.get(fileId));
        Map<String, String> params = new HashMap<String, String>();
View Full Code Here

     * @throws ClientServicesException
     */
    public File updateCommunityFileMetadata(File fileEntry, String communityLibraryId,
            Map<String, String> params) throws ClientServicesException {
        if (fileEntry == null) {
            throw new ClientServicesException(null, Messages.Invalid_File);
        }
        if (StringUtil.isEmpty(fileEntry.getFileId())) {
            throw new ClientServicesException(null, Messages.Invalid_FileId);
        }
        String accessType = AccessType.AUTHENTICATED.getText();
        String requestUri = FileUrls.COMMUNITY_FILE_METADATA.format(this,
                FileUrlParts.accessType.get(accessType), FileUrlParts.communityLibraryId.get(communityLibraryId),
                FileUrlParts.fileId.get(fileEntry.getFileId()));
View Full Code Here

    // comment updations here can be done on comment content and on label. But what is the label of the
    // comment ? Need to check this.
    public void updateFlaggedComment(String commentId, String updatedComment) throws ClientServicesException,
            TransformerException {
        if (StringUtil.isEmpty(commentId)) {
            throw new ClientServicesException(null, Messages.Invalid_CommentId);
        }
        String requestUri = getModerationUri(commentId, Categories.REVIEW.get(),
                ModerationContentTypes.COMMENT.get());
        // File File = (File) executeGet(requestUri, null, ClientService.FORMAT_XML,
        // null).get(0);
View Full Code Here

    }

    public void updateFlaggedFile(File file)
            throws ClientServicesException, TransformerException {
        if (file == null) {
            throw new ClientServicesException(null, Messages.Invalid_FileId);
        }
        String requestUri = getModerationUri(file.getFileId(), Categories.REVIEW.get(),
                ModerationContentTypes.DOCUMENTS.get());

        HashMap<String, String> headers = new HashMap<String, String>();
View Full Code Here

     * @throws ClientServicesException
     */
    public File uploadCommunityFile(InputStream iStream, String communityId, final String title, long length)
            throws ClientServicesException {
        if (iStream == null) {
            throw new ClientServicesException(null, "null stream");
        }
        if (title == null) {
            throw new ClientServicesException(null, "null name");
        }
        String accessType = AccessType.AUTHENTICATED.getText();
        String requestUri = FileUrls.COMMUNITYLIBRARY_FEED.format(this,
                FileUrlParts.accessType.get(accessType), FileUrlParts.communityId.get(communityId));
        Content contentFile = getContentObject(title, iStream, length);
View Full Code Here

     */
    public File uploadNewVersionCommunityFile(InputStream iStream, String fileId, String title,
            String communityId, Map<String, String> params)
            throws ClientServicesException {
        if (StringUtil.isEmpty(fileId)) {
            throw new ClientServicesException(null, Messages.Invalid_FileId);
        }
        if (iStream == null) {
            throw new ClientServicesException(null, Messages.Invalid_Stream);
        }
        if (title == null) {
            throw new ClientServicesException(null, Messages.Invalid_Name);
        }
        String accessType = AccessType.AUTHENTICATED.getText();
        String requestUri = FileUrls.UPLOAD_NEW_VERSION_COMMUNITY_FILE.format(this,
                FileUrlParts.accessType.get(accessType), FileUrlParts.communityId.get(communityId),
                FileUrlParts.fileId.get(fileId));
View Full Code Here

     */
    public File uploadNewVersionFile(InputStream iStream, String fileId, String title,
            Map<String, String> params)
            throws ClientServicesException {
        if (iStream == null) {
            throw new ClientServicesException(null, Messages.Invalid_Stream);
        }
        if (StringUtil.isEmpty(title)) {
            throw new ClientServicesException(null, Messages.Invalid_Name);
        }
        String accessType = AccessType.AUTHENTICATED.getText();
        String requestUri = FileUrls.MYUSERLIBRARY_DOCUMENT_ENTRY.format(this,
                FileUrlParts.accessType.get(accessType), FileUrlParts.fileId.get(fileId));

View Full Code Here

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