com.partnersoft.v3x.apps.Staker.interfaces
Class ImprovedTextRecordInterfaceModule

java.lang.Object
  extended by com.partnersoft.v3x.apps.Staker.interfaces.ExternalInterfaceModule
      extended by com.partnersoft.v3x.apps.Staker.interfaces.ImprovedTextRecordInterfaceModule
All Implemented Interfaces:
java.io.Serializable

public class ImprovedTextRecordInterfaceModule
extends ExternalInterfaceModule

An abstract external interface that exchanges job file information with some external system using text records and has to translate between data models to do so.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class com.partnersoft.v3x.apps.Staker.interfaces.ExternalInterfaceModule
verbose
 
Constructor Summary
ImprovedTextRecordInterfaceModule()
           
 
Method Summary
 java.lang.Object createExternalJob(Job job)
          Create the specialized "Job" for this interface.
 void export(Job job)
          Writes a job update to the export file.
 java.lang.String formatOutputLine(java.util.HashMap data)
           
 java.lang.String generateReportFor(Job job)
          Generates a job report.
 java.lang.String getExportPath()
           
 TextRecordDef getExportRecordDef()
           
 java.lang.String getForeignExportProgram()
           
 int getForeignRunInterval()
           
 int getForeignRunLag()
           
 java.lang.String getImportPath()
           
 TextRecordDef getImportRecordDef()
           
 RecordTranslator getImportTransform()
           
 TextRecordDef getJobExportRecordDef()
           
 java.util.ArrayList getJobExportTransforms()
           
 boolean getSkipExistingUnits()
           
 TextRecordDef getUnitExportRecordDef()
           
 java.util.ArrayList getUnitExportTransforms()
           
 boolean isRunningForeignExport()
           
 void launchInterface(JobLibrarian librarian)
          Launches the foreign export command runner, if turned on.
 java.util.HashMap parseInputLine(java.lang.String line)
           
 void runForeignExportProgram()
          Runs the external interfaces' export program, if any.
 void runImport(JobLibrarian librarian)
          Slurps in the import file and updates jobs from it.
 void setExportPath(java.lang.String newPath)
           
 void setExportRecordDef(TextRecordDef newRecordDef)
           
 void setForeignExportProgram(java.lang.String newProg)
           
 void setForeignRunInterval(int newInterval)
           
 void setForeignRunLag(int newLag)
           
 void setImportPath(java.lang.String newPath)
           
 void setImportRecordDef(TextRecordDef newRecordDef)
           
 void setImportTransform(RecordTranslator newTransform)
           
 void setJobExportRecordDef(TextRecordDef newRecordDef)
           
 void setJobExportTransforms(java.util.ArrayList newList)
           
 void setRunningForeignExport(boolean tizit)
           
 void setSkipExistingUnits(boolean tizit)
           
 void setUnitExportRecordDef(TextRecordDef newRecordDef)
           
 void setUnitExportTransforms(java.util.ArrayList newList)
           
 
Methods inherited from class com.partnersoft.v3x.apps.Staker.interfaces.ExternalInterfaceModule
getDoNotExportField, getExportOnce, getExportOnceProperty, getHub, getLibrarian, getLog, getName, getRunInterval, getRunLag, getSynchronousExport, haltInterface, isExporting, isImporting, isInterfaceRunning, isVerbose, setDoNotExportField, setExporting, setExportOnce, setExportOnceProperty, setHub, setImporting, setLibrarian, setName, setRunInterval, setRunLag, setSynchronousExport, setVerbose, updateJob
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ImprovedTextRecordInterfaceModule

public ImprovedTextRecordInterfaceModule()
Method Detail

launchInterface

public void launchInterface(JobLibrarian librarian)
Launches the foreign export command runner, if turned on. Then calls super.launchInterface() to do usual stuff.

Overrides:
launchInterface in class ExternalInterfaceModule

runImport

public void runImport(JobLibrarian librarian)
Slurps in the import file and updates jobs from it.

Specified by:
runImport in class ExternalInterfaceModule

export

public void export(Job job)
Writes a job update to the export file.

Specified by:
export in class ExternalInterfaceModule

generateReportFor

public java.lang.String generateReportFor(Job job)
Description copied from class: ExternalInterfaceModule
Generates a job report. Not always applicable; if so use return "".

Specified by:
generateReportFor in class ExternalInterfaceModule

createExternalJob

public java.lang.Object createExternalJob(Job job)
Description copied from class: ExternalInterfaceModule
Create the specialized "Job" for this interface. Often this has some sort of subset or superset or disjoint set of the data actually stored by the staking system.

Specified by:
createExternalJob in class ExternalInterfaceModule

runForeignExportProgram

public void runForeignExportProgram()
Runs the external interfaces' export program, if any. For example, if a download program needs to be run to fetch the import file.


parseInputLine

public java.util.HashMap parseInputLine(java.lang.String line)

formatOutputLine

public java.lang.String formatOutputLine(java.util.HashMap data)

getImportPath

public java.lang.String getImportPath()

setImportPath

public void setImportPath(java.lang.String newPath)

getExportPath

public java.lang.String getExportPath()

setExportPath

public void setExportPath(java.lang.String newPath)

getImportRecordDef

public TextRecordDef getImportRecordDef()

setImportRecordDef

public void setImportRecordDef(TextRecordDef newRecordDef)

getExportRecordDef

public TextRecordDef getExportRecordDef()

setExportRecordDef

public void setExportRecordDef(TextRecordDef newRecordDef)

getJobExportRecordDef

public TextRecordDef getJobExportRecordDef()

setJobExportRecordDef

public void setJobExportRecordDef(TextRecordDef newRecordDef)

getUnitExportRecordDef

public TextRecordDef getUnitExportRecordDef()

setUnitExportRecordDef

public void setUnitExportRecordDef(TextRecordDef newRecordDef)

getImportTransform

public RecordTranslator getImportTransform()

setImportTransform

public void setImportTransform(RecordTranslator newTransform)

getJobExportTransforms

public java.util.ArrayList getJobExportTransforms()

setJobExportTransforms

public void setJobExportTransforms(java.util.ArrayList newList)

getUnitExportTransforms

public java.util.ArrayList getUnitExportTransforms()

setUnitExportTransforms

public void setUnitExportTransforms(java.util.ArrayList newList)

getForeignExportProgram

public java.lang.String getForeignExportProgram()

setForeignExportProgram

public void setForeignExportProgram(java.lang.String newProg)

isRunningForeignExport

public boolean isRunningForeignExport()

setRunningForeignExport

public void setRunningForeignExport(boolean tizit)

getForeignRunInterval

public int getForeignRunInterval()

setForeignRunInterval

public void setForeignRunInterval(int newInterval)

getForeignRunLag

public int getForeignRunLag()

setForeignRunLag

public void setForeignRunLag(int newLag)

getSkipExistingUnits

public boolean getSkipExistingUnits()

setSkipExistingUnits

public void setSkipExistingUnits(boolean tizit)