Package org.netbeans.modules.exceptions.entity

Examples of org.netbeans.modules.exceptions.entity.Report


            id = idstring == null ? null : Integer.valueOf(idstring);
        } catch (NumberFormatException e) {
        }
        try {
            if (id != null) {
                Report report = PersistenceUtils.getInstance().getEntity(Report.class, id);
                IssuezillaHandler.generateHTML(out, report);
            }
        } finally {
            out.close();
        }
View Full Code Here


        }
        final int id = tempId;
        Utils.processPersistable(new Persistable.Transaction() {

            public TransactionResult runQuery(EntityManager em) throws Exception {
                Report report = em.getReference(Report.class, id);
                if (!PersistenceUtils.isExistingComponent(report.getComponent(), report.getSubcomponent())) {
                    errors.add("This report has incorrect component or subcomponent, please update it before reporting.");
                    return TransactionResult.ROLLBACK;
                }
                Integer issuezillaId = report.getIssueId();
                if ((issuezillaId == null) || (issuezillaId.intValue() == 0)) {
                    report.preloadSubmitCollection(em);
                    List<Submit> submts = report.getSubmitCollection();
                    TreeSet<Submit> ts = new TreeSet<Submit>(IssuezillaRedirect.this);
                    ts.addAll(submts);
                    Submit last = ts.last();
                    AuthToken token = null;
                    try {
                        token = getUserAuthToken(last.getLogfileId());
                    } catch (IOException ioe) {
                        LOG.log(Level.SEVERE, "Unable to open source file", ioe);
                    }
                    String message = "This issue was reported manually by " + principal.getName() +".\n";
                    message += "It already has " + report.getDuplicates(em) + " duplicates \n";
                    new IZInsertion(last, token, principal.getName(), message).startForceInsert(em);
                }
                return TransactionResult.COMMIT;
            }
        });
View Full Code Here

            return null;
        }
        //do cheap checking for duplicity with report #173645
        if(checkIs173645(em, thrown)){
            LOG.log(Level.INFO, "checkIs173645=TRUE for thrown:" + thrown.toString());
            Report report173645 = getReport(em, 173645);
            if(report173645!= null) {
                LOG.log(Level.INFO, "Since checkIs173645=TRUE, its duplicate of:"+ report173645.getId());
                return report173645;
            }
        }
        if (filters == null) {
            filters = new LinkedList<CheckingFilter>();
View Full Code Here

        public Submit process(EntityManager em) {
            actual = em.merge(excParam);
            BugReporter.LOG.log(Level.INFO, "reopening issue based on exception {0} from {1}",
                    new Object[]{actual.getId().toString(), actual.getReportId().getId().toString()});
            Report openDuplicateCandidate = Utils.checkOpenIssues(em, actual.getMockThrowable());
            if (openDuplicateCandidate != null) {
                actual.setReportId(openDuplicateCandidate);
                return em.merge(actual);
               
            }
            Report newReport = new Report();
            newReport.setId(Utils.getNextId(Report.class));
            Component comp = Matcher.getDefault().match(em, actual.getMockThrowable());
            newReport.setComponent(comp);
            em.persist(newReport);

            moveSimilarExceptions(em, actual.getReportId(), actual, newReport);

            actual.setReportId(newReport);
View Full Code Here

        public Submit process(EntityManager em) {
            actual = em.merge(slownParam);
            BugReporter.LOG.log(Level.INFO, "reopening issue based on slowness{0} from {1}",
                    new Object[]{actual.getId().toString(), actual.getReportId().getId().toString()});
            Report newReport = new Report();
            newReport.setId(Utils.getNextId(Report.class));
            Component comp = recountComponent(em);
            newReport.setComponent(comp);
            em.persist(newReport);

            actual.setReportId(newReport);
            return em.merge(actual);
        }
View Full Code Here

        Integer id = Utils.getInteger(request.getParameter("id"));

        EntityManager em = PersistenceUtils.getInstance().createEntityManager();
        try {
            if (id != null) {
                Report report = em.find(Report.class, id);
                if (report != null) {
                    if (component == null && subcomponent == null && issueId == null) {
                        printReport(out, report);
                    } else {
                        updateReport(em, report, component, subcomponent, issueId);
View Full Code Here

                    request.setAttribute("inIssuezilla", false);
                }
                org.netbeans.web.Utils.processPersistable(new Persistable.Query() {

                    public TransactionResult runQuery(EntityManager em) throws Exception {
                        Report r = em.getReference(Report.class, getReportId());
                        Collection<ReportComment> comments = r.getCommentCollection();
                        if (comments.isEmpty()){
                            return TransactionResult.NONE;
                        }
                        String[] commentArr = new String[comments.size()];
                        int i = 0;
View Full Code Here

        Integer issueId = (Integer) excData.getSubmitId();
        int issuezillaId = 110;
        org.netbeans.modules.exceptions.entity.Exceptions exc =
                em.find(org.netbeans.modules.exceptions.entity.Exceptions.class, issueId);
        Report report = exc.getReportId();
        report.setIssueId(issuezillaId);
        em.merge(report);
        Issue issue = BugReporterFactory.getDefaultReporter().getIssue(issuezillaId);
        issue.setIssueStatus("NEW");
        issue.setLastResolutionChange(new Date());
        for (int i = 1; i < 3; i++) {
View Full Code Here

        Integer issueId = (Integer) excData.getSubmitId();
        int issuezillaId = 11;
        org.netbeans.modules.exceptions.entity.Exceptions exc =
                em.find(org.netbeans.modules.exceptions.entity.Exceptions.class, issueId);
        Report report = exc.getReportId();
        report.setIssueId(issuezillaId);
        em.merge(report);
        Issue issue = BugReporterFactory.getDefaultReporter().getIssue(issuezillaId);
        issue.setIssueStatus("NEW");
        issue.setLastResolutionChange(new Date());
        for (int i = 1; i < 3; i++) {
View Full Code Here

        EntityManager em = perUtils.createEntityManager();
        em.getTransaction().begin();
        Exceptions exc = new Exceptions(++id);

        exc.setReportdate(date);
        Report report = null;
        if (duplicateOf != null) {
            report = duplicateOf.getReportId();
        } else {
            report = new Report(id);
            em.persist(report);
        }
        exc.setReportId(report);
        if (issuezillaId != null) {
            report.setIssueId(issuezillaId);
            em.merge(report);
        }
        em.persist(exc);
        em.getTransaction().commit();
        em.close();
View Full Code Here

TOP

Related Classes of org.netbeans.modules.exceptions.entity.Report

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.