de.folt.rpc.messages
Class ImportOpenTMSDataSource

java.lang.Object
  extended by de.folt.rpc.messages.ImportOpenTMSDataSource
All Implemented Interfaces:
RPCMessage

public class ImportOpenTMSDataSource
extends java.lang.Object
implements RPCMessage

Author:
Klemens Waldhör

Constructor Summary
ImportOpenTMSDataSource()
           
 
Method Summary
 java.util.Vector execute(java.util.Hashtable message)
          ImportOpenTMSDataSource imports a file into an OpenTMS Datasource.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ImportOpenTMSDataSource

public ImportOpenTMSDataSource()
Method Detail

execute

public java.util.Vector execute(java.util.Hashtable message)
ImportOpenTMSDataSource imports a file into an OpenTMS Datasource. Parameters are provided through a hash table. The hashtable contains the following keys:

dataSourceName - the name of the data source
dataSourceType - the type of the data source; any defined database, e.g. MySQl
dataSourceServer - the name of the server, e.g. localhost or IP address
dataSourcePort - the port of the data source, e.g. 1433
dataSourceUser - the user of the data source, e.g. sa
dataSourcePassword - the name of the data source, e.g. folt
dataModel - either TMX or TBX depending on the data source
importFile - the file name where the file to be imported

It returns:

vec.add(de.folt.constants.OpenTMSConstants.OpenTMS_ID_SUCCESS +"");
vec.add(dataSourceName + " successfully imported!");

or

vec.add(de.folt.constants.OpenTMSConstants.OpenTMS_ID_FAILURE +"");
vec.add(ex.getMessage());

Specified by:
execute in interface RPCMessage
Parameters:
message - a hash table containing the message specific parameters
Returns:
a Vector containing the results of executing the method.
See Also:
RPCMessage.execute(java.util.Hashtable)