Package com.taobao.eclipse.plugin.reviewboard.core.exception

Examples of com.taobao.eclipse.plugin.reviewboard.core.exception.ReviewboardException


    public ModelReviewRequestDraft readReviewRequestDraft(String source) throws ReviewboardException {
        try {
            JSONObject jsonReviewRequest = new JSONObject(source);
            return JsonUtil.parseModel(ModelReviewRequestDraft.class, jsonReviewRequest.getJSONObject("draft"));
        } catch (Exception e) {
            throw new ReviewboardException(e.getMessage(), e);
        }
    }
View Full Code Here


    public List<ModelReview> readReviews(String source) throws ReviewboardException {
        try {
            JSONObject jsonReviewRequest = new JSONObject(source);
            return JsonUtil.parseModelList(ModelReview.class, jsonReviewRequest.getJSONArray("reviews"));
        } catch (Exception e) {
            throw new ReviewboardException(e.getMessage(), e);
        }
    }
View Full Code Here

    public List<ModelReview> readReplies(String source) throws ReviewboardException {
        try {
            JSONObject jsonReviewRequest = new JSONObject(source);
            return JsonUtil.parseModelList(ModelReview.class, jsonReviewRequest.getJSONArray("replies"));
        } catch (Exception e) {
            throw new ReviewboardException(e.getMessage(), e);
        }
    }
View Full Code Here

        try {
            String uri = MessageFormat.format(URI_NEW_DIFF, new Object[]{ String.valueOf(reviewRequestId) });
            resultContent = httpClient.executePost( uri, parameters, fileParameters, monitor);
            isSuccess = reviewboardReader.isStatOK(resultContent);
        } catch (Exception e) {
            throw new ReviewboardException(e);
        }finally{
            if( null != fileDiff && fileDiff.exists() ){
                try {
                    fileDiff.delete();
                } catch (Exception e) {
View Full Code Here

                }
            }
            IOUtils.saveFile(diffFileTmp, diffContentSBTmp.toString(), charsetName);
            this.uploadDiff(review_request_id, baseUrlDir, diffFileTmp, parentDiffFile, monitor);
        } catch (ReviewboardException e) {
            throw new ReviewboardException(e);
        }finally{
            if( null != diffFileTmp && diffFileTmp.exists() ){
                try {
                    diffFileTmp.delete();
                } catch (Exception e) {
View Full Code Here

        try {
            diffFileTmp = IOUtils.generateTmpFile( FOLDER_TMP_DIFF, DIFF_SUFFIX);
            IOUtils.saveFile(diffFileTmp, diffContent, charsetName);
            this.uploadDiff(review_request_id, baseUrlDir, diffFileTmp, null, monitor);
        } catch (ReviewboardException e) {
            throw new ReviewboardException(e);
        }finally{
            if( null != diffFileTmp && diffFileTmp.exists() ){
                try {
                    diffFileTmp.delete();
                } catch (Exception e) {
View Full Code Here

TOP

Related Classes of com.taobao.eclipse.plugin.reviewboard.core.exception.ReviewboardException

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.