de.folt.models.applicationmodel.guimodel.editor.datasourceeditor
Class OpenTMSDataSourceTypes

java.lang.Object
  extended by de.folt.models.applicationmodel.guimodel.editor.datasourceeditor.OpenTMSDataSourceTypes

public class OpenTMSDataSourceTypes
extends java.lang.Object

This class contains several support functions for reading OpenTMs sql data sources.

Author:
klemens

Constructor Summary
OpenTMSDataSourceTypes()
           
 
Method Summary
 java.lang.String getPort(java.lang.String dataSourceConfigurationsFile)
          getPort get the port of an sql data source
 java.lang.String getServer(java.lang.String dataSourceConfigurationsFile)
          getServer get the server of an sql data source (e.g. hibernate.progress.cfg.xml)
<property name="OpenTMS.defaultserver">localhost</property>
 java.lang.String[] sqlDataSourceTypes()
          sqlDataSourceTypes gets all the SQL data source types supported by OpenTMS (OpenTMS.properties); read from getOpenTMSProperty("database.path") + "hibernate"
hibernateConfigurationsDirectory=%OpenTMS.dir%/hibernate
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OpenTMSDataSourceTypes

public OpenTMSDataSourceTypes()
Method Detail

sqlDataSourceTypes

public java.lang.String[] sqlDataSourceTypes()
sqlDataSourceTypes gets all the SQL data source types supported by OpenTMS (OpenTMS.properties); read from getOpenTMSProperty("database.path") + "hibernate"
hibernateConfigurationsDirectory=%OpenTMS.dir%/hibernate

Returns:
a string array of the available SQL data source types of OpenTMS

getPort

public java.lang.String getPort(java.lang.String dataSourceConfigurationsFile)
getPort get the port of an sql data source

Parameters:
dataSourceConfigurationsFile - the data source configuration file (e.g. hibernate.progress.cfg.xml)
<property name="OpenTMS.defaultport">5432</property>
Returns:
the port of the sql data source

getServer

public java.lang.String getServer(java.lang.String dataSourceConfigurationsFile)
getServer get the server of an sql data source (e.g. hibernate.progress.cfg.xml)
<property name="OpenTMS.defaultserver">localhost</property>

Parameters:
dataSourceConfigurationsFile -
Returns:
the server of the sql data source