public void updateReport(MonitorItem monItem, BackgroundStatus bgStat) { if (monItem.isComposite()) { for (MonitorItem mi : monItem.getCompositeList()) { if (ComparisonUtil.equals(mi.getID(), bgStat.getID())) { mi.setStatus(bgStat); CompositeJob cR = monItem.getCompositeJob(); CompositeJob newComposite = cR.makeDeltaJob(mi.getStatus()); monItem.setCompositeJob(newComposite); break; } } } else { monItem.setStatus(bgStat); } }
public void setStatus(BackgroundStatus bgStat) { MonitorItem monItem = _monitorMap.get(bgStat.getID()); if (monItem != null) { monItem.setStatus(bgStat); } else { // look for composite for (Map.Entry<String, MonitorItem> entry : _monitorMap.entrySet()) { monItem = entry.getValue(); if (monItem.isComposite()) { for (MonitorItem m : monItem.getCompositeList()) { if (m.getID().equals(bgStat.getID())) { m.setStatus(bgStat); CompositeJob cR = monItem.getCompositeJob(); CompositeJob newComposite = cR.makeDeltaJob(bgStat); monItem.setCompositeJob(newComposite); break; } } } } } }