Package net.sf.collabreview.reputation

Examples of net.sf.collabreview.reputation.ReputationMetricManager


  }

  public void configureReputationMetricManager(ConfigurationConfigurableCollabReview collabReview, ConfigurationData config) throws Exception {
    ReputationMetricManagerFactory factory = (ReputationMetricManagerFactory) getFactory(config);
    factory.setCollabReview(collabReview);
    ReputationMetricManager reputationMetricManager = factory.create();
    collabReview.setReputationMetricManager(reputationMetricManager);
  }
View Full Code Here


      Thread.sleep(15000);
    } catch (InterruptedException e) {
    }


    ReputationMetricManager rmm = collabReview.getReputationMetricManager();
    ReputationMetric qualities = rmm.findReputationMetric("quality");
    for (String name : qualities.listContributors()) {
      logger.info(qualities.getAuthorRank(name) + ": " + name + " " + qualities.getAuthorScore(name));
    }

    logger.info("Sending terminate signal to agents...");
View Full Code Here

    head.addElement("protocol").addElement("version").addText("1.0");
    head.addElement("server").addElement("name").addText(request.getServerName());
  }

  private void getOverallStats(Element root) {
    ReputationMetricManager reputationMetricManager = CollabReviewSingleton.get().getReputationMetricManager();
    Element scores = root.addElement("totals");
    Collection<String> contributors = reputationMetricManager.listAllContributors();
    if (!reputationMetricManager.isUptodate()) {
      root.element("head").addElement("warning").addAttribute("info", "out-of-date").addText("Some of the metric results were cached and are possibly out of date.");
    }
    for (String authorName : contributors) {
      Element element = scores.addElement("contributor");
      element.addAttribute("name", authorName);
      for (ReputationMetric reputationMetric : reputationMetricManager.listReputationMetrics()) {
        Float score = reputationMetric.getAuthorScore(authorName);
        if (score == null) {
          score = 0f;
        }
        Element scoreElement = element.addElement("score");
View Full Code Here

TOP

Related Classes of net.sf.collabreview.reputation.ReputationMetricManager

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.