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

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

public class TextRecordInterfaceModule
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
TextRecordInterfaceModule()
           
 
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()
           
 FixedLengthRecordDef getExportRecordDef()
           
 GraphTranslator getExportTranslator()
           
static java.lang.Object getFileLockObject(java.lang.String exportPath)
           
 java.lang.String getForeignExportProgram()
           
 int getForeignRunInterval()
           
 int getForeignRunLag()
           
 java.lang.String getImportPath()
           
 FixedLengthRecordDef getImportRecordDef()
           
 RecordTranslator getImportTranslator()
           
 java.util.ArrayList getJobExportTransforms()
           
 TextReportEngine getReportEngine()
           
 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(FixedLengthRecordDef newRecordDef)
           
 void setExportTranslator(GraphTranslator newTranslator)
           
 void setForeignExportProgram(java.lang.String newProg)
           
 void setForeignRunInterval(int newInterval)
           
 void setForeignRunLag(int newLag)
           
 void setImportPath(java.lang.String newPath)
           
 void setImportRecordDef(FixedLengthRecordDef newRecordDef)
           
 void setImportTranslator(RecordTranslator newTranslator)
           
 void setJobExportTransforms(java.util.ArrayList newTransforms)
           
 void setReportEngine(TextReportEngine newEngine)
           
 void setRunningForeignExport(boolean tizit)
           
 
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

TextRecordInterfaceModule

public TextRecordInterfaceModule()
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 FixedLengthRecordDef getImportRecordDef()

setImportRecordDef

public void setImportRecordDef(FixedLengthRecordDef newRecordDef)

getExportRecordDef

public FixedLengthRecordDef getExportRecordDef()

setExportRecordDef

public void setExportRecordDef(FixedLengthRecordDef newRecordDef)

getImportTranslator

public RecordTranslator getImportTranslator()

setImportTranslator

public void setImportTranslator(RecordTranslator newTranslator)

getExportTranslator

public GraphTranslator getExportTranslator()

setExportTranslator

public void setExportTranslator(GraphTranslator newTranslator)

getJobExportTransforms

public java.util.ArrayList getJobExportTransforms()

setJobExportTransforms

public void setJobExportTransforms(java.util.ArrayList newTransforms)

getReportEngine

public TextReportEngine getReportEngine()

setReportEngine

public void setReportEngine(TextReportEngine newEngine)

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)

getFileLockObject

public static java.lang.Object getFileLockObject(java.lang.String exportPath)