appli.sqlplayer.util
Class AppProperties

java.lang.Object
  extended byappli.sqlplayer.util.AppProperties

public class AppProperties
extends java.lang.Object

Reads a configuration file

Version:
2.0 June 2003 adaptation to CDS tools
Author:
Alexander Schatten (T.U. Wien), Marc Wenger/CDS

Field Summary
private  Parameters confProperties
           
private  java.util.ArrayList databasesAL
           
private  Parameters dbProperties
           
private  java.lang.String dbPropFile
           
private static java.lang.String DEFAULT_CONF_PROP
           
private static java.lang.String DEFAULT_DB_PROP
           
private  Mediator med
           
private  java.lang.StringBuffer paramError
           
private  boolean paramsOK
           
 
Constructor Summary
AppProperties(java.lang.String dbPropFile)
          Constructor
 
Method Summary
private  void addError(java.lang.String errorText)
          Build an error message
 Parameters getConfProperties()
          Get the runtime configuration properties
 Database getDatabase(int pos)
           
 Parameters getDbProperties()
          Get the database list properties
 int getNumberOfDatabases()
           
 boolean isParamsOK()
           
 void readConfProp()
          read the runtime configuration properties
private  void readDbProp()
          Parses the configuration file and stores data
 java.lang.String toString()
           
 void writeConfProp()
          write the runtime configuration properties
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

DEFAULT_DB_PROP

private static final java.lang.String DEFAULT_DB_PROP
See Also:
Constant Field Values

DEFAULT_CONF_PROP

private static final java.lang.String DEFAULT_CONF_PROP
See Also:
Constant Field Values

med

private Mediator med

dbProperties

private Parameters dbProperties

confProperties

private Parameters confProperties

dbPropFile

private java.lang.String dbPropFile

paramsOK

private boolean paramsOK

paramError

private java.lang.StringBuffer paramError

databasesAL

private java.util.ArrayList databasesAL
Constructor Detail

AppProperties

public AppProperties(java.lang.String dbPropFile)
Constructor

Parameters:
dbPropFile - Filename of a configuration file.
Method Detail

addError

private void addError(java.lang.String errorText)
Build an error message

Parameters:
errorText - error text to add to the message.

readDbProp

private void readDbProp()
Parses the configuration file and stores data


readConfProp

public void readConfProp()
read the runtime configuration properties


writeConfProp

public void writeConfProp()
write the runtime configuration properties


getDbProperties

public Parameters getDbProperties()
Get the database list properties

Returns:
the dbProp Parameters object

getConfProperties

public Parameters getConfProperties()
Get the runtime configuration properties

Returns:
the confProp Parameters object

isParamsOK

public boolean isParamsOK()
Returns:
true if the reading of the parameters is o.k.

getNumberOfDatabases

public int getNumberOfDatabases()
Returns:
number of database connections defined

getDatabase

public Database getDatabase(int pos)
Parameters:
pos - database # in the array list
Returns:
connection data of one database connection as Database Object

toString

public java.lang.String toString()