Exemplo n.º 1
0
  public CompositeData getNextEntry(Object[] indexObjects) {

    // User code starts here
    if (!agentName.initAlert()) return null;

    String previousKeys[] = {indexObjects[0].toString(), indexObjects[1].toString()};
    String keys[] = getNextAlert(previousKeys);

    if (keys == null) return null;

    String source = keys[0];

    // String ownerName = keys[1];

    String entity = keys[1];

    Alert alert1 = new Alert();

    alert1.setSource(source);

    //	alert1.setOwnerName(ownerName);

    alert1.setEntity(entity);

    Alert alert2 = new Alert();

    alert2.setModTime(System.currentTimeMillis());

    Vector alerts = null;

    try {
      alerts = agentName.alertAPI.getAlerts(alert1, alert2);

      if (alerts != null) return makeComData((Alert) alerts.elementAt(0));
    } catch (Exception e) {
      return null;
    }

    // User code ends here
    return null;
  }