Package com.ibm.sbt.services.client

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


     */
    public File updateFileMetadata(File file, Map<String, String> params)
            throws ClientServicesException {
        String accessType = AccessType.AUTHENTICATED.getText();
        if (file==null) {
            throw new ClientServicesException(null, Messages.Invalid_File);
        }
        String payload = new FileSerializer(file).generateFileUpdatePayload();
        String requestUri = FileUrls.MYUSERLIBRARY_DOCUMENT_ENTRY.format(this,
                FileUrlParts.accessType.get(accessType), FileUrlParts.fileId.get(file.getFileId()));
        Response response = updateData(requestUri, params, new ClientService.ContentString(
View Full Code Here


     * @param userId
     * @throws ClientServicesException
     */
    public void deleteFileShare(String fileId, String userId) throws ClientServicesException {
        if (StringUtil.isEmpty(fileId)) {
            throw new ClientServicesException(null, Messages.Invalid_FileId);
        }
        String accessType = AccessType.AUTHENTICATED.getText();
        String requestUri = FileUrls.DELETE_FILE_SHARE.format(this, FileUrlParts.accessType.get(accessType));

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

     */
    public Comment addCommentToFile(String fileId, Comment comment, String userId,
            Map<String, String> params) throws ClientServicesException, TransformerException {
        //FIX: DUPLICATE METHOD see createComment()
        if (StringUtil.isEmpty(fileId)) {
            throw new ClientServicesException(null, Messages.Invalid_FileId);
        }
        String accessType = AccessType.AUTHENTICATED.getText();
        String requestUri;
        if (StringUtil.isEmpty(userId)) {
            requestUri = FileUrls.MYUSERLIBRARY_DOCUMENT_FEED.format(this,
View Full Code Here

     */
    public Comment addCommentToCommunityFile(String fileId, String comment, String communityId,
            Map<String, String> params) throws ClientServicesException, TransformerException {

        if (StringUtil.isEmpty(fileId)) {
            throw new ClientServicesException(null, Messages.Invalid_FileId);
        }
        if (StringUtil.isEmpty(communityId) || StringUtil.equalsIgnoreCase(communityId, null)) {
            throw new ClientServicesException(null, Messages.Invalid_CommunityId);
        }

        String accessType = AccessType.AUTHENTICATED.getText();
        String requestUri = FileUrls.COMMUNITY_FILE_COMMENT.format(this,
                FileUrlParts.accessType.get(accessType), FileUrlParts.communityId.get(communityId),
View Full Code Here

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



    public void deleteFileAwaitingApproval(String fileId) throws ClientServicesException {
        if (StringUtil.isEmpty(fileId)) {
            throw new ClientServicesException(null, Messages.Invalid_FileId);
        }
        String requestUri = getModerationUri(fileId, Categories.APPROVAL.get(),
                ModerationContentTypes.DOCUMENTS.get());
        deleteData(requestUri, null, null);
    }
View Full Code Here

    }


    public void deleteFlaggedComment(String commentId) throws ClientServicesException {
        if (StringUtil.isEmpty(commentId)) {
            throw new ClientServicesException(null, Messages.Invalid_CommentId);
        }
        String requestUri = getModerationUri(commentId, Categories.REVIEW.get(),
                ModerationContentTypes.COMMENT.get());
        if (StringUtil.isEmpty(requestUri)) {
            return;
View Full Code Here

        deleteData(requestUri, null, null);
    }

    public void deleteFlaggedFiles(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());
        if (StringUtil.isEmpty(requestUri)) {
            return;
View Full Code Here



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

     * @throws ClientServicesException
     */
    public EntityList<Comment> getFileComment(String fileId, String commentId,
            Map<String, String> parameters, Map<String, String> headers) throws ClientServicesException {
        if (StringUtil.isEmpty(fileId)) {
            throw new ClientServicesException(null, Messages.Invalid_FileId);
        }
        if (StringUtil.isEmpty(commentId)) {
            throw new ClientServicesException(null, Messages.Invalid_CommentId);
        }

        String accessType = AccessType.AUTHENTICATED.getText();
        String requestUri = FileUrls.MYUSERLIBRARY_DOCUMENT_COMMENT_ENTRY.format(this,
                FileUrlParts.accessType.get(accessType), FileUrlParts.fileId.get(fileId),
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.