wt.load
Class StandardLoadService

java.lang.Object
  extended bywt.services.StandardManager
      extended bywt.load.StandardLoadService
All Implemented Interfaces:
LoadService, Manager, NetFactor, Serializable

public class StandardLoadService
extends StandardManager
implements LoadService, Serializable

Provides the standard implementation of server-side functionality for the loading of test data into the system.

Use the newStandardLoadService static factory method(s), not the StandardLoadService constructor, to construct instances of this class. Instances must be constructed using the static factory(s), in order to ensure proper initialization of the instance.



Supported API: false

Extendable: false

See Also:
Serialized Form

Nested Class Summary
private  class StandardLoadService.ImportHandler
           
 
Field Summary
private static String CLASSNAME
           
private static boolean DEBUG
           
private static boolean ONE_TRANSACTION
           
private static String RESOURCE
           
private static String SERVICE_NAME
           
private static boolean VERBOSE
           
 
Fields inherited from class wt.services.StandardManager
 
Fields inherited from interface wt.services.Manager
MANAGER_SERVICE, STARTUP_AUTOMATIC, STARTUP_MANUAL, STATUS_EMERGENCY_SHUTDOWN, STATUS_EMERGENCY_SHUTTING_DOWN, STATUS_SHUTDOWN, STATUS_SHUTDOWN_ERRORS, STATUS_SHUTDOWN_FAILURE, STATUS_SHUTTING_DOWN, STATUS_STARTED, STATUS_STARTED_ERRORS, STATUS_STARTING_UP, STATUS_STARTUP_FAILURE
 
Constructor Summary
StandardLoadService()
           
 
Method Summary
 String getConceptualClassname()
          Deprecated.  
 void importData(String dataFilename, String outFilename, String method, String user, Hashtable cmdLine, IXBStreamer ruleFile)
          Provides the functionality to load test data using xml files to the client side.
 void importData(String dataFilename, String mapFilename, String outFilename, String token, String method, String user, Hashtable cmdLine)
          Provides the load test data functionality to the client side.
private  void initializeUser(String user)
           
private  void initiateCache()
           
 void load(String dataFilename, String outFilename, String method, String user, Hashtable cmdLine, IXBStreamer ruleFile)
          Provides the functionality to load test data using xml files to the client side.
 void load(String dataFilename, String mapFilename, String outFilename, String token, String method, String user, Hashtable cmdLine)
          Deprecated.  
 void load(String dataFilename, String mapFilename, String outFilename, String token, String method, String user, Hashtable cmdLine, boolean oneTransaction)
          Deprecated.  
static StandardLoadService newStandardLoadService()
          Default factory for the class.
static Hashtable populateInputs(IxbElement elem)
           
private static void printLoadData(boolean success, Hashtable nv, String classname, String method, String methodCall, int line_number, Vector return_objects)
           
private static void printStackTrace(Throwable e)
           
private  void removeCache()
           
private  void setBypassRecent(boolean flag)
           
private static String stripKey(String orig)
           
 
Methods inherited from class wt.services.StandardManager
emergencyShutdown, emergencyShutdownComplete, emergencyShuttingDown, getClassInfo, getManagerService, getManagerStatus, getName, getStartupType, init, initialize, initialize, isStarted, newStandardManager, newStandardManager, performEmergencyShutdownProcess, performShutdownProcess, performStartupProcess, registerEvents, setManagerService, shutdown, shutdownFailure, shutdownSuccess, shuttingDown, started, startedErrors, startingUp, startup, startupFailure, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

RESOURCE

private static final String RESOURCE
See Also:
Constant Field Values

CLASSNAME

private static final String CLASSNAME

VERBOSE

private static final boolean VERBOSE

ONE_TRANSACTION

private static final boolean ONE_TRANSACTION

SERVICE_NAME

private static final String SERVICE_NAME
See Also:
Constant Field Values

DEBUG

private static boolean DEBUG
Constructor Detail

StandardLoadService

public StandardLoadService()
Method Detail

getConceptualClassname

public String getConceptualClassname()
Deprecated.  

Returns the conceptual (modeled) name for the class.

Supported API: false

Specified by:
getConceptualClassname in interface NetFactor
Overrides:
getConceptualClassname in class StandardManager
Returns:
String

newStandardLoadService

public static StandardLoadService newStandardLoadService()
                                                  throws WTException
Default factory for the class.

Supported API: false

Returns:
StandardLoadService
Throws:
WTException

load

public void load(String dataFilename,
                 String mapFilename,
                 String outFilename,
                 String token,
                 String method,
                 String user,
                 Hashtable cmdLine)
          throws WTException
Deprecated.  

Provides the load test data functionality to the client side.

Supported API: false

Specified by:
load in interface LoadService
Parameters:
dataFilename - Full pathname of file with data to be loaded.
mapFilename - Full pathname of file with mapping of attribute names to sequence of data in the data file.
outFilename - Not currently implemented. To be a trace or recovery file.
token - The token used to delimit fields of data in the data file.
method - A string used with the object name (the first field) from the data file to key into the mapdata file. The line in the map data file will then contain the method name to pass this information to and the ordered list of fieldnames to match with the line in the data file.
user - The user to execute the method, if no user is given in the line from the data file.
cmdLine - Command line parameters that can be used inside to substitute in the text file input.
Throws:
WTException

importData

public void importData(String dataFilename,
                       String mapFilename,
                       String outFilename,
                       String token,
                       String method,
                       String user,
                       Hashtable cmdLine)
                throws WTException
Provides the load test data functionality to the client side. This method is different from the 'load' method, in that it throws an exception for any error messaging.

Supported API: false

Specified by:
importData in interface LoadService
Parameters:
dataFilename - Full pathname of file with data to be loaded.
mapFilename - Full pathname of file with mapping of attribute names to sequence of data in the data file.
outFilename - Not currently implemented. To be a trace or recovery file.
token - The token used to delimit fields of data in the data file.
method - A string used with the object name (the first field) from the data file to key into the mapdata file. The line in the map data file will then contain the method name to pass this information to and the ordered list of fieldnames to match with the line in the data file.
user - The user to execute the method, if no user is given in the line from the data file.
cmdLine - Command line parameters that can be used inside to substitute in the text file input.
Throws:
WTException

load

public void load(String dataFilename,
                 String mapFilename,
                 String outFilename,
                 String token,
                 String method,
                 String user,
                 Hashtable cmdLine,
                 boolean oneTransaction)
          throws WTException
Deprecated.  

Provides the load test data functionality to the client side.

Supported API: false

Specified by:
load in interface LoadService
Parameters:
dataFilename - Full pathname of file with data to be loaded.
mapFilename - Full pathname of file with mapping of attribute names to sequence of data in the data file.
outFilename - Not currently implemented. To be a trace or recovery file.
token - The token used to delimit fields of data in the data file.
method - A string used with the object name (the first field) from the data file to key into the mapdata file. The line in the map data file will then contain the method name to pass this information to and the ordered list of fieldnames to match with the line in the data file.
user - The user to execute the method, if no user is given in the line from the data file.
cmdLine - Command line parameters that can be used inside to substitute in the text file input.
oneTransaction - boolean value letting the load method know that the transaction should be committed after it was successful or rollbacked if was not successful
Throws:
WTException

load

public void load(String dataFilename,
                 String outFilename,
                 String method,
                 String user,
                 Hashtable cmdLine,
                 IXBStreamer ruleFile)
          throws WTException
Provides the functionality to load test data using xml files to the client side.

Supported API: false

Specified by:
load in interface LoadService
Parameters:
dataFilename - Full pathname of file with data to be loaded.
outFilename - Not currently implemented. To be a trace or recovery file.
method - A string used with the object name (the first field) from the data file to key into the mapdata file. The line in the map data file will then contain the method name to pass this information to and the ordered list of fieldnames to match with the line in the data file.
user - The user to execute the method, if no user is given in the line from the data file.
cmdLine - Command line parameters that can be used inside to substitute in the text file input.
ruleFile - rule file
Throws:
WTException

importData

public void importData(String dataFilename,
                       String outFilename,
                       String method,
                       String user,
                       Hashtable cmdLine,
                       IXBStreamer ruleFile)
                throws WTException
Provides the functionality to load test data using xml files to the client side. This method is different from the 'load' method, in that it does not catch exception.

Supported API: false

Specified by:
importData in interface LoadService
Parameters:
dataFilename -
outFilename -
method -
user -
cmdLine -
ruleFile -
Throws:
WTException

populateInputs

public static Hashtable populateInputs(IxbElement elem)
                                throws WTException
Throws:
WTException

stripKey

private static String stripKey(String orig)

printLoadData

private static void printLoadData(boolean success,
                                  Hashtable nv,
                                  String classname,
                                  String method,
                                  String methodCall,
                                  int line_number,
                                  Vector return_objects)

printStackTrace

private static void printStackTrace(Throwable e)

initiateCache

private void initiateCache()
                    throws WTException
Throws:
WTException

removeCache

private void removeCache()
                  throws WTException
Throws:
WTException

setBypassRecent

private void setBypassRecent(boolean flag)

initializeUser

private void initializeUser(String user)
                     throws WTException
Throws:
WTException