public AdeExtConfigProperties(String propertyFile) throws AdeException {
  final ConfigPropertiesWrapper m_props=new ConfigPropertiesWrapper(ADE_EXT_PREFIX);
  m_props.addPropertyFile(propertyFile);
  m_props.addProperties(System.getProperties(),"system property");
  m_rmiPort=m_props.getIntProperty(RMI_PORT_PARAM,0);
  m_rmiServerCodeBase=m_props.getStringProperty(RMI_CODE_BASE_PARAM,null);
  m_trainingScriptFilePath=m_props.getStringProperty(TRAINING_SCRIPT_FILE_PARAM,null);
  if (m_props.containsKey(PARSE_ERROR_TO_KEEP)) {
    m_parseErrorsToKeep=m_props.getIntProperty(PARSE_ERROR_TO_KEEP);
  }
 else {
    m_parseErrorsToKeep=-1;
  }
  if (m_props.containsKey(PARSE_ERROR_DAYS_TO_TOLERATE)) {
    m_parseErrorDaysToTolerate=m_props.getIntProperty(PARSE_ERROR_DAYS_TO_TOLERATE);
  }
 else {
    m_parseErrorDaysToTolerate=-1;
  }
  if (m_props.containsKey(PARSE_ERROR_TRACK_NULL_COMPONENT)) {
    m_parseErrorTrackNullComponent=m_props.getBooleanProperty(PARSE_ERROR_TRACK_NULL_COMPONENT);
  }
 else {
    m_parseErrorTrackNullComponent=false;
  }
  if (m_props.containsKey(MSG_RATE_MSG_TO_KEEP)) {
    m_msgRateMsgToKeep=m_props.getIntProperty(MSG_RATE_MSG_TO_KEEP);
  }
 else   m_msgRateMsgToKeep=-1;
  if (m_props.containsKey(MSG_RATE_10MIN_SLOTS_TO_KEEP)) {
    m_msgRate10MinIntervalToKeep=(short)m_props.getIntProperty(MSG_RATE_10MIN_SLOTS_TO_KEEP);
  }
 else {
    m_msgRate10MinIntervalToKeep=-1;
  }
  if (m_props.containsKey(MSG_RATE_MERGE_SOURCE)) {
    m_isMsgRateMergeSource=m_props.getBooleanProperty(MSG_RATE_MERGE_SOURCE);
  }
 else {
    m_isMsgRateMergeSource=false;
  }
  if (m_props.containsKey(RUNTIME_MODEL_DATA_STORE_AT_SOURCE)) {
    m_isRuntimeModelDataStoreAtSource=m_props.getBooleanProperty(RUNTIME_MODEL_DATA_STORE_AT_SOURCE);
  }
 else {
    m_isRuntimeModelDataStoreAtSource=null;
  }
  if (m_props.containsKey(MSG_RATE_10MIN_SUBINTERVAL_LIST)) {
    final String subIntervalList=m_props.getStringProperty(MSG_RATE_10MIN_SUBINTERVAL_LIST);
    final StringTokenizer tokenizer=new StringTokenizer(subIntervalList,",");
    m_msgRate10MinSubIntervalList=new short[tokenizer.countTokens()];
    for (int i=0; i < m_msgRate10MinSubIntervalList.length; i++) {
      m_msgRate10MinSubIntervalList[i]=Short.parseShort(tokenizer.nextToken());
    }
  }
 else {
    m_msgRate10MinSubIntervalList=null;
  }
  if (m_props.containsKey(MSG_RATE_REPORT_FREQ)) {
    m_msgRateReportReq=m_props.getStringProperty(MSG_RATE_REPORT_FREQ);
    boolean isNumber=false;
    try {
      Integer.parseInt(m_msgRateReportReq);
      isNumber=true;
    }
 catch (    Exception e) {
    }
    if (!m_msgRateReportReq.equalsIgnoreCase("MONTHLY") && !isNumber) {
      throw new AdeUsageException(MSG_RATE_REPORT_FREQ + " must be either \"MONTHLY\" or number");
    }
  }
 else {
    m_msgRateReportReq="";
  }
  if (m_props.containsKey(STATS_ROOT_DIR)) {
    m_statsRootDir=m_props.getStringProperty(STATS_ROOT_DIR);
  }
 else {
    m_statsRootDir=DEFAULT_STATS_ROOT_DIR;
  }
  m_props.verifyAllPropertiesUsed();
}

public AdeExtConfigProperties ( String propertyFile ) throws AdeException { final ConfigPropertiesWrapper m_props = new ConfigPropertiesWrapper ( ADE_EXT_PREFIX ) ; m_props . addPropertyFile ( propertyFile ) ; m_props . addProperties ( System . getProperties ( ) , "system property" ) ; m_rmiPort = m_props . getIntProperty ( RMI_PORT_PARAM , 0 ) ; m_rmiServerCodeBase = m_props . getStringProperty ( RMI_CODE_BASE_PARAM , null ) ; m_trainingScriptFilePath = m_props . getStringProperty ( TRAINING_SCRIPT_FILE_PARAM , null ) ; if ( m_props . containsKey ( PARSE_ERROR_TO_KEEP ) ) { m_parseErrorsToKeep = m_props . getIntProperty ( PARSE_ERROR_TO_KEEP ) ; } else { m_parseErrorsToKeep = - 1 ; } if ( m_props . containsKey ( PARSE_ERROR_DAYS_TO_TOLERATE ) ) { m_parseErrorDaysToTolerate = m_props . getIntProperty ( PARSE_ERROR_DAYS_TO_TOLERATE ) ; } else { m_parseErrorDaysToTolerate = - 1 ; } if ( m_props . containsKey ( PARSE_ERROR_TRACK_NULL_COMPONENT ) ) { m_parseErrorTrackNullComponent = m_props . getBooleanProperty ( PARSE_ERROR_TRACK_NULL_COMPONENT ) ; } else { m_parseErrorTrackNullComponent = false ; } if ( m_props . containsKey ( MSG_RATE_MSG_TO_KEEP ) ) { m_msgRateMsgToKeep = m_props . getIntProperty ( MSG_RATE_MSG_TO_KEEP ) ; } else m_msgRateMsgToKeep = - 1 ; if ( m_props . containsKey ( MSG_RATE_10MIN_SLOTS_TO_KEEP ) ) { m_msgRate10MinIntervalToKeep = ( short ) m_props . getIntProperty ( MSG_RATE_10MIN_SLOTS_TO_KEEP ) ; } else { m_msgRate10MinIntervalToKeep = - 1 ; } if ( m_props . containsKey ( MSG_RATE_MERGE_SOURCE ) ) { m_isMsgRateMergeSource = m_props . getBooleanProperty ( MSG_RATE_MERGE_SOURCE ) ; } else { m_isMsgRateMergeSource = false ; } if ( m_props . containsKey ( RUNTIME_MODEL_DATA_STORE_AT_SOURCE ) ) { m_isRuntimeModelDataStoreAtSource = m_props . getBooleanProperty ( RUNTIME_MODEL_DATA_STORE_AT_SOURCE ) ; } else { m_isRuntimeModelDataStoreAtSource = null ; } if ( m_props . containsKey ( MSG_RATE_10MIN_SUBINTERVAL_LIST ) ) { final String subIntervalList = m_props . getStringProperty ( MSG_RATE_10MIN_SUBINTERVAL_LIST ) ; final StringTokenizer tokenizer = new StringTokenizer ( subIntervalList , "," ) ; m_msgRate10MinSubIntervalList = new short [ tokenizer . countTokens ( ) ] ; for ( int i = 0 ; i < m_msgRate10MinSubIntervalList . length ; i ++ ) { m_msgRate10MinSubIntervalList [ i ] = Short . parseShort ( tokenizer . nextToken ( ) ) ; } } else { m_msgRate10MinSubIntervalList = null ; } if ( m_props . containsKey ( MSG_RATE_REPORT_FREQ ) ) { m_msgRateReportReq = m_props . getStringProperty ( MSG_RATE_REPORT_FREQ ) ; boolean isNumber = false ; try { Integer . parseInt ( m_msgRateReportReq ) ; isNumber = true ; } catch ( Exception e ) { } if ( ! m_msgRateReportReq . equalsIgnoreCase ( "MONTHLY" ) && ! isNumber ) { throw new AdeUsageException ( MSG_RATE_REPORT_FREQ + " must be either \"MONTHLY\" or number" ) ; } } else { m_msgRateReportReq = "" ; } if ( m_props . containsKey ( STATS_ROOT_DIR ) ) { m_statsRootDir = m_props . getStringProperty ( STATS_ROOT_DIR ) ; } else { m_statsRootDir = DEFAULT_STATS_ROOT_DIR ; } m_props . verifyAllPropertiesUsed ( ) ; }
set the adeextconfigproperties from the specified property file .
