Package com.j2bugzilla.rpc

Examples of com.j2bugzilla.rpc.GetBug


    private BugzillaConnector bzConnector = new BugzillaConnector();

    @Override
    public String resolve(String bugIdentifier) {
        int bugId = Integer.valueOf(bugIdentifier);
        GetBug getBug = new GetBug(bugId);
        try {
            bzConnector.executeMethod(getBug);
        } catch (Exception e) {
            bzConnector = new BugzillaConnector();
            try {
                bzConnector.connectTo("https://bugzilla.redhat.com");
            } catch (ConnectionException e2) {
                e2.printStackTrace();
                return "Failed to access BZ " + bugId + ": " + e2.getMessage();
            }
            try {
                bzConnector.executeMethod(getBug);
            } catch (BugzillaException e1) {
                //e1.printStackTrace();
                Throwable cause = e1.getCause();
                String details = (cause instanceof XmlRpcException) ? cause.getMessage() : e1.getMessage();
                return "Failed to access BZ " + bugId + ": " + details;
            }
        }
        Bug bug = getBug.getBug();
        if (bug != null) {
            String product = bug.getProduct();
            if (product.equals("RHQ Project")) {
                product = "RHQ";
            } else if (product.equals("JBoss Operations Network")) {
View Full Code Here

TOP

Related Classes of com.j2bugzilla.rpc.GetBug

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.