private ScoreWeight getDashboardScoreFromWidgets ( List < ScoreWeight > widgetScores ) { if ( null == widgetScores ) { return getDashboardScore ( new ScoreTypeValue ( Constants . ZERO_SCORE ) , widgetScores ) ; } try { //Calculate score return getDashboardScore ( ScoreCalculationUtils . calculateComponentScoreTypeValue ( widgetScores , PropagateType . dashboard ) , widgetScores ) ; } catch ( PropagateScoreException ex ) { ScoreWeight scoreDashboard = new ScoreWeight ( ) ; scoreDashboard . setScore ( ex . getScore ( ) ) ; scoreDashboard . setMessage ( ex . getMessage ( ) ) ; scoreDashboard . setState ( ex . getState ( ) ) ; scoreDashboard . setChildren ( widgetScores ) ; return scoreDashboard ; } }
Calculate dashboard score from widget score settings