frequency = frequency * 1000;
if((periodString != null) && (!(periodString.trim().equals("")))) { try { period = (new Long(periodString)).longValue(); } catch(Exception e) { period = -1; } } else {  period = 24 * 60 * 60; period = period * 1000; }
  private HashMap readParameters() {    final String errorString = "DemandGeneratorPlugin requires 2 parameters, Supply Type and Gemerate Frequency (secs).  Generate Frequency must be in whole days or whole hours (< 24)";    Collection p = getParameters();    if (p.isEmpty()) {      if (logger.isErrorEnabled()) {        logger.error(errorString);      }      return null;    }    HashMap map = new HashMap();    int idx;    for (Iterator i = p.iterator(); i.hasNext();) {      String s = (String) i.next();      if ((idx = s.indexOf('=')) != -1) {        String key = new String(s.substring(0, idx));        String value = new String(s.substring(idx + 1, s.length()));        map.put(key.trim(), value.trim());      }    }    supplyType = (String) map.get(SUPPLY_TYPE);    //frequency = (new Long((String)map.get(GENERATE_FREQUENCY))).longValue();    frequency = 24 * 60 * 60;    frequency = frequency * 1000;    if (!isLegalFrequency(frequency)) {      logger.error("Illegal Frequency - not in days or hours");      frequency = -1;    }    if (((supplyType == null) ||        (frequency <= 0) &&        logger.isErrorEnabled())) {      logger.error(errorString);    }    return map;  }