Exemplo n.º 1
0
  /**
   * We fill in the values for the alert in the composite data. Forming the composite data for each
   * alert and returning it
   */
  private CompositeData makeComData(Alert alert) {

    values = new Object[names.length];

    values[0] = alert.getSource();

    /*values[1] = alert.getOwnerName();
    if(values[1] == null)
    {
        values[1] = "NULL";//No I18N
    }*/

    values[1] = alert.getEntity();

    values[2] = new Integer(alert.getSeverity());

    values[3] = new Integer(alert.getPreviousSeverity());

    values[4] = new Long(alert.getCreateTime());

    values[5] = new Long(alert.getModTime());

    values[6] = alert.getCategory();

    values[7] = alert.getWho();
    if (values[7] == null) {
      values[7] = " "; // No I18N
    }

    values[8] = agentName.getPropValues(alert.getUserProperties(), agentName.alertUserPropNames);

    try {
      return new CompositeData(null, names, values);
    } catch (Exception e) {
      return null;
    }
  }