Package com.sonymobile.tools.gerrit.gerritevents

Examples of com.sonymobile.tools.gerrit.gerritevents.GerritQueryHandler


                            if (isServerInteresting(event)
                                 && p.isInteresting(changeBasedEvent.getChange().getProject(),
                                                    changeBasedEvent.getChange().getBranch(),
                                                    changeBasedEvent.getChange().getTopic(),
                                                    changeBasedEvent.getFiles(
                                                        new GerritQueryHandler(getServerConfig(event))))) {
                                logger.trace("According to {} the event is interesting.", p);
                                return true;
                            }
                        } else {
                            logger.trace("According to {} the event is interesting.", p);
View Full Code Here


    private List<JSONObject> getCurrentPatchesFromGerrit(String project) throws IOException {
        final String queryString = "project:" + project + " is:open";
        List<JSONObject> changeList = new ArrayList<JSONObject>();
        try {
            IGerritHudsonTriggerConfig config = getConfig();
            GerritQueryHandler handler = new GerritQueryHandler(config);
            changeList = handler.queryJava(queryString, false, true, false);
        } catch (GerritQueryException gqe) {
            logger.debug("Bad query. ", gqe);
        } catch (Exception ex) {
            logger.warn("Could not query Gerrit for [" + queryString + "]", ex);
        }
View Full Code Here

        }
        Hudson.getInstance().checkPermission(PluginImpl.MANUAL_TRIGGER);
        IGerritHudsonTriggerConfig config = getServerConfig(selectedServer);

        if (config != null) {
            GerritQueryHandler handler = new GerritQueryHandler(config);
            clearSessionData(session);
            session.setAttribute("queryString", queryString);

            try {
                List<JSONObject> json = handler.queryJava(queryString, allPatchSets, true, false);
                if (!allPatchSets) {
                    for (JSONObject j : json) {
                        if (j.containsKey("id")) {
                            JSONArray jsonArray = new JSONArray();
                            jsonArray.add(j.getJSONObject("currentPatchSet"));
View Full Code Here

TOP

Related Classes of com.sonymobile.tools.gerrit.gerritevents.GerritQueryHandler

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.