Examples of ReportHelper


Examples of com.buschmais.jqassistant.core.report.api.ReportHelper

        } finally {
            IOUtils.closeQuietly(xmlReportFileWriter);
        }
        store.beginTransaction();
        try {
            final ReportHelper reportHelper = new ReportHelper(getLog());
            reportHelper.verifyConceptResults(inMemoryReportWriter);
            reportHelper.verifyConstraintViolations(inMemoryReportWriter);
        } catch (AnalysisListenerException e) {
            throw new RuntimeException("Cannot print report.", e);
        } finally {
            store.commitTransaction();
        }
View Full Code Here

Examples of com.buschmais.jqassistant.core.report.api.ReportHelper

        return "effective-rules";
    }

    @Override
    public Continuation execute(AppCommandParser parser, Session session, Output out) throws Exception {
        new ReportHelper(new ShellConsole(out)).printRuleSet(getEffectiveRuleSet(parser));
        return Continuation.INPUT_COMPLETE;
    }
View Full Code Here

Examples of com.buschmais.jqassistant.core.report.api.ReportHelper

        return "available-rules";
    }

    @Override
    public Continuation execute(AppCommandParser parser, Session session, Output out) throws Exception {
        new ReportHelper(new ShellConsole(out)).printRuleSet(getAvailableRules());
        return Continuation.INPUT_COMPLETE;
    }
View Full Code Here

Examples of com.buschmais.jqassistant.core.report.api.ReportHelper

        Store store = getStore();
        store.start(getScannerPluginRepository().getDescriptorTypes());
        ShellConsole console = new ShellConsole(out);
        Analyzer analyzer = new AnalyzerImpl(store, reportWriter, console);
        analyzer.execute(effectiveRuleSet);
        ReportHelper reportHelper = new ReportHelper(console);
        reportHelper.verifyConceptResults(reportWriter);
        reportHelper.verifyConstraintViolations(reportWriter);
        store.stop();
        return Continuation.INPUT_COMPLETE;
    }
View Full Code Here

Examples of com.buschmais.jqassistant.core.report.api.ReportHelper

        RuleSet effectiveRuleSet = getEffectiveRuleSet(conceptNames, constraintNames, groupNames);
        InMemoryReportWriter reportWriter = new InMemoryReportWriter();
        Slf4jConsole console = new Slf4jConsole();
        Analyzer analyzer = new AnalyzerImpl(store, reportWriter, console);
        analyzer.execute(effectiveRuleSet);
        ReportHelper reportHelper = new ReportHelper(console);
        reportHelper.verifyConceptResults(reportWriter);
        reportHelper.verifyConstraintViolations(reportWriter);
        return reportWriter;
    }
View Full Code Here

Examples of com.buschmais.jqassistant.core.report.api.ReportHelper

        try {
            analyzer.execute(ruleSet);
        } catch (AnalysisException e) {
            throw new MojoExecutionException("Analysis failed.", e);
        }
        ReportHelper reportHelper = new ReportHelper(console);
        store.beginTransaction();
        try {
            reportHelper.verifyConceptResults(inMemoryReportWriter);
            int violations = reportHelper.verifyConstraintViolations(inMemoryReportWriter);
            if (failOnConstraintViolations && violations > 0) {
                throw new MojoFailureException(violations + " constraints have been violated!");
            }
        } catch (AnalysisListenerException e) {
            throw new MojoExecutionException("Cannot print report.", e);
View Full Code Here

Examples of com.buschmais.jqassistant.core.report.api.ReportHelper

    @Override
    public void aggregate(MavenProject baseProject, Set<MavenProject> projects, Store store) throws MojoExecutionException, MojoFailureException {
        getLog().info("Available rules for '" + baseProject.getName() + "'.");
        RuleSet ruleSet = readRules(baseProject);
        ReportHelper reportHelper = new ReportHelper(new MavenConsole(getLog()));
        reportHelper.printRuleSet(ruleSet);
    }
View Full Code Here

Examples of com.buschmais.jqassistant.core.report.api.ReportHelper

    @Override
    public void aggregate(MavenProject baseProject, Set<MavenProject> projects, Store store) throws MojoExecutionException, MojoFailureException {
        getLog().info("Effective rules for '" + baseProject.getName() + "'.");
        RuleSet targetRuleSet = resolveEffectiveRules(baseProject);
        ReportHelper reportHelper = new ReportHelper(new MavenConsole(getLog()));
        reportHelper.printRuleSet(targetRuleSet);
    }
View Full Code Here

Examples of com.errplane.util.ReportHelper

        List<ReportHelper> udpReports = new ArrayList<ReportHelper>();
        List<ReportHelper> udpAggregates = new ArrayList<ReportHelper>();
        List<ReportHelper> udpSums = new ArrayList<ReportHelper>();

        while (!reportQueue.isEmpty() && (numRemoved < 200)) {
          ReportHelper rh = reportQueue.remove();
          numRemoved++;

          // System.out.printf("type: %s, report type: %s\n", rh.getType(), rh.getReportType());

          switch (rh.getType()) {
          case HTTP:
            httpReports.add(rh);
            break;
          case UDP:
            if (rh.getReportType().equals("r"))
              udpReports.add(rh);
            else if (rh.getReportType().equals("t"))
              udpAggregates.add(rh);
            else if (rh.getReportType().equals("c"))
              udpSums.add(rh);
            else
              throw new IllegalArgumentException("Invalid report type " + rh.getReportType());
            break;
          default:
            throw new IllegalArgumentException("Unkown type " + rh.getType());
          }
        }

        if (httpReports.size() > 0) {
          sendHttpReport(httpReports);
View Full Code Here

Examples of com.errplane.util.ReportHelper

  public static ExceptionData getExceptionData(String c, String a, String u) {
    return new ExceptionData(c, a, u, "");
  }

  private static void addReportHelper(String name, double val, String context, Map<String, String> dimensions) {
    ReportHelper rh = new ReportHelper(name, "", ReportHelper.ReportType.HTTP, database, api);
    rh.setReportValue(val);
    rh.setContext(context);
    rh.setDimensions(dimensions);
    reportQueue.add(rh);
    reportCount.addAndGet(1);
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.