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

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


    public boolean isStatOK(String source) throws ReviewboardException {
        try {
            JSONObject jsonStat = new JSONObject(source);
            return jsonStat.getString("stat").equals("ok");
        } catch (Exception e) {
            throw new ReviewboardException(e.getMessage(), e);
        }
    }
View Full Code Here


                        jsonError.getString("code") + ")!";
            } else {
                throw new IllegalStateException("Request didn't fail!");
            }
        } catch (Exception e) {
            throw new ReviewboardException(e.getMessage(), e);
        }
    }
View Full Code Here

                return jsonError.getString("code");
            } else {
                throw new IllegalStateException("Request didn't fail!");
            }
        } catch (Exception e) {
            throw new ReviewboardException(e.getMessage(), e);
        }
    }
View Full Code Here

                diffUploadErrorBean.setRevision(jsonStat.getString("revision"));
            } else {
                throw new IllegalStateException("Request didn't fail!");
            }
        } catch (Exception e) {
            throw new ReviewboardException(e.getMessage(), e);
        }
        return diffUploadErrorBean;
    }
View Full Code Here

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

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

            JSONObject jsonReviewRequests = new JSONObject(source);
            List<ModelReviewRequest> reviewRequests = JsonUtil.parseModelList(ModelReviewRequest.class,
                    jsonReviewRequests.getJSONArray("review_requests"));
            return reviewRequests;
        } catch (Exception e) {
            throw new ReviewboardException(e.getMessage(), e);
        }
    }
View Full Code Here

            JSONObject jsonReviewRequests = new JSONObject(source);
            List<ModelReviewRequest> reviewRequests = JsonUtil.parseModelList(ModelReviewRequest.class,
                    jsonReviewRequests.getJSONArray("review_requests"));
            return reviewRequests;
        } catch (Exception e) {
            throw new ReviewboardException(e.getMessage(), e);
        }
    }
View Full Code Here

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

    public ModelReviewRequest readReviewRequest(String source) throws ReviewboardException {
        try {
            JSONObject jsonReviewRequest = new JSONObject(source);
            return JsonUtil.parseModel(ModelReviewRequest.class, jsonReviewRequest.getJSONObject("review_request"));
        } catch (Exception e) {
            throw new ReviewboardException(e.getMessage(), 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.