Ejemplo n.º 1
0
 @Override
 public void visitEntry(Entry entry) {
   String type = entry.getType();
   String status = entry.getStatus();
   status = m_aggregationManger.handle(AggregationConfigManager.PROBLEM_TYPE, m_domain, status);
   m_currentEntry = findOrCreatEntry(m_currentMachine, type, status);
   super.visitEntry(entry);
 }
Ejemplo n.º 2
0
  protected Entry findOrCreatEntry(Machine machine, String type, String status) {
    List<Entry> entries = machine.getEntries();

    for (Entry entry : entries) {
      if (entry.getType().equals(type) && entry.getStatus().equals(status)) {
        return entry;
      }
    }
    Entry entry = new Entry();
    entry.setStatus(status);
    entry.setType(type);
    entries.add(entry);
    return entry;
  }