code: public ScoreMetric getScoreForApplication(ScoreCollectorItem scoreApplication, ScoreCriteriaSettings scoreCriteriaSettings) {
      Dashboard dashboard = getDashboard(scoreApplication.getDashboardId());
  
      if (null == dashboard) {
        LOGGER.info("Dashboard with id " + scoreApplication.getDashboardId() + " is null!");
        return null;
      }
  
      LOGGER.info("Dashboard title:" + dashboard.getTitle() + ", type:" + dashboard.getType() + ", owner:" + dashboard.getOwner());
  
      if (null == dashboard.getType() || !dashboard.getType().equals(DashboardType.Team)) {
        return null;
      }
  
      LOGGER.info("dashboard.getTitle():" + dashboard.getTitle() + " " + dashboard.getOwner());
  
      ScoreWeight dashboardScore = getDashboardScoreFromWidgets(
        processWidgetScores(dashboard.getWidgets(), scoreCriteriaSettings)
        );
  
      LOGGER.info("dashboardScore: {}" + dashboardScore);
      ScoreMetric scoreMetric = ScoreCalculationUtils.generateScoreMetric(
        dashboardScore,
        scoreCriteriaSettings.getMaxScore(),
        scoreApplication.getId(),
        dashboard.getId()
        );
  
      LOGGER.info("ScoreMetric scoreMetric " + scoreMetric.toString());
  
      return scoreMetric;
    }
docs: Calculate score for a {@link ScoreCollectorItem}
  
  @param scoreApplication Score Application collector item for a dashboard
  @param scoreCriteriaSettings Score Criteria Settings
  @return Score for dashboard