wt.effectivity
Class LoadEffectivity

java.lang.Object
  extended bywt.effectivity.LoadEffectivity

public class LoadEffectivity
extends Object

Creates and persists effectivity objects based on input from a comma seperated value (csv) file. Method names and parameters are defined in csvmapfile.txt. wt.load.StandardLoadService.load reads records from a .csv file and passes the fields in a hashtable to methods defined in this class. These methods then create and persist effectivity objects.

See Also:
StandardLoadService

Field Summary
private static String CURRENT_PART
           
private static ResourceBundle rb
          Resource bundle object for localizing message text
private static String RESOURCE
           
private static boolean VERBOSE
          Verbose flag.
 
Constructor Summary
LoadEffectivity()
           
 
Method Summary
static boolean createConfigurationItem(Hashtable fileFields, Hashtable cmd_line, Vector return_objects)
          Processes "ConfigurationItem" lines from a csv load file.
static boolean createWTDatedEffectivity(Hashtable fileFields, Hashtable cmd_line, Vector return_objects)
          Processes "WTDatedEffectivity" lines from a csv load file.
static boolean createWTLotEffectivity(Hashtable fileFields, Hashtable cmd_line, Vector return_objects)
          Processes "WTLotEffectivity" lines from a csv load file.
static boolean createWTSerialNumberedEffectivity(Hashtable fileFields, Hashtable cmd_line, Vector return_objects)
          Processes "WTSerialNumberedEffectivity" lines from a csv load file.
static String getStringValue(Hashtable fileFields, Hashtable cmd_line, String fieldName, boolean nullValueOk)
          Obtains string value from input file.
protected static void printException(String methodName, Exception e)
          Helper method to print stack trace of exception to Method Server log.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CURRENT_PART

private static String CURRENT_PART

RESOURCE

private static String RESOURCE

VERBOSE

private static final boolean VERBOSE
Verbose flag.


rb

private static final ResourceBundle rb
Resource bundle object for localizing message text

Constructor Detail

LoadEffectivity

public LoadEffectivity()
Method Detail

createConfigurationItem

public static boolean createConfigurationItem(Hashtable fileFields,
                                              Hashtable cmd_line,
                                              Vector return_objects)
Processes "ConfigurationItem" lines from a csv load file. Creates a new Configuration Items using the attributes contained in the Hashtable parameter.

Parameters:
cmd_line - command line argument that can contain supplemental load data
return_objects - Vector of the object(s) created by this method. Used by wt.load.StandardLoadService for accurate user feedback messages.

createWTDatedEffectivity

public static boolean createWTDatedEffectivity(Hashtable fileFields,
                                               Hashtable cmd_line,
                                               Vector return_objects)
Processes "WTDatedEffectivity" lines from a csv load file. Creates a new WTDatedEffectivity object using the attributes contained in the Hashtable parameter. This method assumes that the cache value for CURRENT_PART is is populated with the part to which this effectivity will apply.

Parameters:
cmd_line - command line argument that can contain supplemental load data
return_objects - Vector of the object(s) created by this method. Used by wt.load.StandardLoadService for accurate user feedback messages.

createWTLotEffectivity

public static boolean createWTLotEffectivity(Hashtable fileFields,
                                             Hashtable cmd_line,
                                             Vector return_objects)
Processes "WTLotEffectivity" lines from a csv load file. Creates a new WTLotEffectivity object using the attributes contained in the Hashtable parameter. This method assumes that the cache value for CURRENT_PART is is populated with the part to which this effectivity will apply.

Parameters:
cmd_line - command line argument that can contain supplemental load data
return_objects - Vector of the object(s) created by this method. Used by wt.load.StandardLoadService for accurate user feedback messages.

createWTSerialNumberedEffectivity

public static boolean createWTSerialNumberedEffectivity(Hashtable fileFields,
                                                        Hashtable cmd_line,
                                                        Vector return_objects)
Processes "WTSerialNumberedEffectivity" lines from a csv load file. Creates a new WTSerialNumberedEffectivity object using the attributes contained in the Hashtable parameter. This method assumes that the cache value for CURRENT_PART is populated with the part to which this effectivity will apply.

Parameters:
cmd_line - command line argument that can contain supplemental load data
return_objects - Vector of the object(s) created by this method. Used by wt.load.StandardLoadService for accurate user feedback messages.

getStringValue

public static String getStringValue(Hashtable fileFields,
                                    Hashtable cmd_line,
                                    String fieldName,
                                    boolean nullValueOk)
                             throws EffectivityException
Obtains string value from input file. Used by the createXXXX methods of this class.

Parameters:
fileFields - Hashtable containing the values read from the input file.
fieldName - Name of the input field
nullValueOk - true if a null value for the parameter is acceptable, false otherwise
Returns:
Data field obtained from the file
Throws:
EffectivityException - if a null value is not acceptable and was discovered
See Also:
wt.load.StandardLoadService.load

printException

protected static void printException(String methodName,
                                     Exception e)
Helper method to print stack trace of exception to Method Server log.

Parameters:
methodName - Name of the calling method.