private void setAccumulatorAttributes ( List < String > accumulatorIds , HttpServletRequest request ) throws APIException { if ( accumulatorIds == null || accumulatorIds . isEmpty ( ) ) { return ; } request . setAttribute ( "accumulatorsPresent" , Boolean . TRUE ) ; //create multiple graphs with one line each. List < AccumulatedSingleGraphAO > singleGraphDataBeans = getAccumulatorAPI ( ) . getChartsForMultipleAccumulators ( accumulatorIds ) ; request . setAttribute ( "singleGraphData" , singleGraphDataBeans ) ; request . setAttribute ( "accumulatorsColors" , AccumulatorUtility . accumulatorsColorsToJSON ( singleGraphDataBeans ) ) ; List < String > accumulatorsNames = new LinkedList <> ( ) ; for ( AccumulatedSingleGraphAO ao : singleGraphDataBeans ) { accumulatorsNames . add ( ao . getName ( ) ) ; } request . setAttribute ( "accNames" , accumulatorsNames ) ; request . setAttribute ( "accNamesConcat" , net . anotheria . util . StringUtils . concatenateTokens ( accumulatorsNames , "," ) ) ; }
Sets accumulator specific attributes required to show accumulator charts on page .