com.ptc.windchill.upgrade.directives.dataload
Class LoadCsvData.DataOutputter

java.lang.Object
  extended bycom.ptc.windchill.upgrade.directives.dataload.LoadCsvData.DataOutputter
Enclosing class:
LoadCsvData

private final class LoadCsvData.DataOutputter
extends Object

Encapsulates the conditional writing of the data records to the data file. Also, this inner class is used as a technique for not having to pass around the directive services to four or five methods. This is known as "Replace Method with Method Object" in Fowler's Refactoring book.


Field Summary
private  DirectiveServices directiveServices_
           
 
Constructor Summary
LoadCsvData.DataOutputter(DirectiveServices directive_services)
          Creates a new DataOutputter object.
 
Method Summary
private  File addDataFromThis()
          Adding data from the Incremental Update that is currently being executed, into the mig file of data to be added to the new version.
private  void clearOutDataFile(File data_file)
           
private  DirectiveServices getDirectiveServices()
           
 void outputDataAsNecessary()
          Loads the new data that has been added since the release the customer was on.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

directiveServices_

private DirectiveServices directiveServices_
Constructor Detail

LoadCsvData.DataOutputter

public LoadCsvData.DataOutputter(DirectiveServices directive_services)
Creates a new DataOutputter object.

Parameters:
directive_services -
Throws:
IllegalArgumentException
Method Detail

getDirectiveServices

private DirectiveServices getDirectiveServices()

outputDataAsNecessary

public final void outputDataAsNecessary()
                                 throws DirectiveExecutionException
Loads the new data that has been added since the release the customer was on.

Throws:
DirectiveExecutionException - If their are problems loading wt.properties or problems with the files, or importing the data.

clearOutDataFile

private void clearOutDataFile(File data_file)
                       throws IOException
Throws:
IOException

addDataFromThis

private File addDataFromThis()
                      throws DirectiveExecutionException
Adding data from the Incremental Update that is currently being executed, into the mig file of data to be added to the new version.

Throws:
DirectiveExecutionException