/** {@inheritDoc} */ public Map<BusinessTheme, AFTime> formatThemeBindings(Project proj) { Map<BusinessTheme, Collection<BacklogThemeBinding>> tmp = new HashMap<BusinessTheme, Collection<BacklogThemeBinding>>(); if (proj.getIterations().size() > 0) { List<BacklogThemeBinding> bindings = projectDAO.getProjectThemeData(proj); // iteration themes for (BacklogThemeBinding bind : bindings) { if (tmp.get(bind.getBusinessTheme()) == null) { tmp.put(bind.getBusinessTheme(), new ArrayList<BacklogThemeBinding>()); } tmp.get(bind.getBusinessTheme()).add(bind); } } // project themes if (proj.getBusinessThemeBindings() != null) { for (BacklogThemeBinding bind : proj.getBusinessThemeBindings()) { if (tmp.get(bind.getBusinessTheme()) == null) { tmp.put(bind.getBusinessTheme(), new ArrayList<BacklogThemeBinding>()); } tmp.get(bind.getBusinessTheme()).add(bind); } } Map<BusinessTheme, AFTime> ret = new HashMap<BusinessTheme, AFTime>(); // format for (BusinessTheme theme : tmp.keySet()) { AFTime sum = new AFTime(0); for (BacklogThemeBinding bin : tmp.get(theme)) { sum.add(bin.getBoundEffort()); } ret.put(theme, sum); } return ret; }