Exemplo n.º 1
0
  public List getEntries(int startIndex, int endIndex) {
    // User code starts here
    if (agentName.initTopo()) {
      ArrayList arrayList = new ArrayList();
      int noOfObj = getCount();
      String[] name = {""}; // No I18N

      for (int i = 0; i < noOfObj; i++) {
        if (name[0].trim().equals("")) // No I18N
        {
          getFirstMo(name);
        } else {
          getNextMo(name);
        }

        if ((i + 1 >= startIndex) && (i + 1 <= endIndex)) {
          Object[] indx = new Object[] {name[0]};
          arrayList.add(indx);
          if (i + 1 == endIndex) break;
        }
      }
      return arrayList;
    }

    // User code ends here
    return null;
  }
Exemplo n.º 2
0
  public List getEntries(int startIndex, int endIndex) {

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

    ArrayList arrayList = new ArrayList();

    boolean firstAlert = true;

    String[] keys = null;

    int totalAlerts = totalRows();

    for (int i = 0; i < totalAlerts; i++) {
      if (firstAlert) {
        firstAlert = false;

        keys = getFirstAlert();
      } else keys = getNextAlert(keys);

      // Checking the range
      if ((i + 1 >= startIndex) && (i + 1 <= endIndex)) {
        Object[] index = new Object[] {keys[0], keys[1]};

        arrayList.add(index);
      }

      // checking if the upper limit is exceeded, if so break
      if (i + 1 == endIndex) break;
    }

    return arrayList;
    // User code ends here
    //	return null;
  }