/** @see com.ixora.rms.client.model.DashboardModelHelper#getAllCommittedDashboards(int) */ @SuppressWarnings("unchecked") public Collection<DashboardId> getAllCommittedDashboards(int flag) { Collection<DashboardId> ret = new LinkedList<DashboardId>(); Enumeration<SessionModelTreeNode> e = model.getSessionNode().breadthFirstEnumeration(); while (e.hasMoreElements()) { SessionModelTreeNode sn = (SessionModelTreeNode) e.nextElement(); Collection<DashboardInfo> dashboards = sn.getArtefactInfoContainer().getDashboardInfo(); if (!Utils.isEmptyCollection(dashboards)) { for (DashboardInfo di : dashboards) { if (di.isCommitted() && di.getFlag(flag)) { ret.add(new DashboardId(sn.getResourceId(), di.getDashboard().getName())); } } } } return ret; }
/** @see com.ixora.rms.client.model.DashboardModelHelper#getAllDashboardsToUnRealize() */ @SuppressWarnings("unchecked") public Map<ResourceId, Collection<DashboardInfo>> getAllDashboardsToUnRealize() { Map<ResourceId, Collection<DashboardInfo>> ret = new HashMap<ResourceId, Collection<DashboardInfo>>(); SessionNode sn = model.getSessionNode(); Enumeration<ResourceNode> e = sn.breadthFirstEnumeration(); ResourceNode rn; while (e.hasMoreElements()) { rn = e.nextElement(); // get the unrealizable dashboards Collection<DashboardInfo> col = sn.getArtefactInfoContainer().getDashboardsToUnRealize(); if (col != null) { ResourceId rid = rn.getResourceId(); ret.put(rid, col); } } return ret; }