psdi.iface.load

Class ErrorExtractor

  • java.lang.Object
    • psdi.iface.load.ErrorExtractor


  • public class ErrorExtractor
    extends java.lang.Object
    Class that extracts transactions in error for reprocessing as per the MEA System Administrator Guide document
    • Constructor Summary

      Constructors 
      Constructor and Description
      ErrorExtractor() 
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method and Description
      static void addToMasterDoc(org.jdom2.Document masterDoc, org.jdom2.Element element, java.lang.String mosName, java.lang.String operation)
      Add a transaction element to a master document.
      static void deleteErrorFiles(java.lang.String extractFileID, java.lang.String extSysName, java.lang.String esName, java.sql.Connection connection)
      Delete error files related to Extract File ID.
      static java.lang.String extractData(java.lang.String extractFileID, java.lang.String extSysName, java.lang.String esName, java.lang.String fileFormat, java.lang.String sourceFile, java.lang.String delimiter, java.lang.String textQualifier, java.lang.String fileAttributes, java.util.Date importDate)
      Retrieve transactions in error related to a Extract File ID and write them to a single output file so user can edit and reprocess them.
      static java.lang.String mergeFiles(java.util.List tempFiles, java.lang.String extSysName, java.lang.String fileFormat, java.lang.String sourceFile, java.util.Date importDate, java.lang.String mosName, java.lang.String operation)
      Merge all temporary files in to a single export file.
      static java.lang.String writeExtractData(org.jdom2.Document doc, java.lang.String extSysName, java.lang.String esName, java.lang.String fileFormat, java.lang.String sourceFile, java.lang.String delimiter, java.lang.String textQualifier, java.lang.String fileAttributes, java.util.Date importDate)
      Write document to a output file.
      static java.lang.String writeExtractData(org.jdom2.Document doc, java.lang.String extSysName, java.lang.String esName, java.lang.String fileFormat, java.lang.String sourceFile, java.lang.String delimiter, java.lang.String textQualifier, java.lang.String fileAttributes, java.util.Date importDate, boolean tempFile)
      Write document to a output file.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ErrorExtractor

        public ErrorExtractor()
    • Method Detail

      • extractData

        public static java.lang.String extractData(java.lang.String extractFileID,
                                                   java.lang.String extSysName,
                                                   java.lang.String esName,
                                                   java.lang.String fileFormat,
                                                   java.lang.String sourceFile,
                                                   java.lang.String delimiter,
                                                   java.lang.String textQualifier,
                                                   java.lang.String fileAttributes,
                                                   java.util.Date importDate)
                                            throws MXException
        Retrieve transactions in error related to a Extract File ID and write them to a single output file so user can edit and reprocess them. Returns the name of the output file. Returns null if no output file is generated.
        Parameters:
        extractFileID - Extract File ID
        extSysName - External System Name
        esName - Enterprise Service Name
        fileFormat - File format of output file: FLAT or XML
        sourceFile - Original file name
        delimiter - Field delimiter used in flat file
        textQualifier - Character used in flat files to mark start and end of text fields.
        fileAttributes - Name of attributes, separated by delimiter, to include in flat file output
        importDate - Original import date.
        Returns:
        Output file name
        Throws:
        MXException
      • writeExtractData

        public static java.lang.String writeExtractData(org.jdom2.Document doc,
                                                        java.lang.String extSysName,
                                                        java.lang.String esName,
                                                        java.lang.String fileFormat,
                                                        java.lang.String sourceFile,
                                                        java.lang.String delimiter,
                                                        java.lang.String textQualifier,
                                                        java.lang.String fileAttributes,
                                                        java.util.Date importDate)
                                                 throws MXException
        Write document to a output file. Returns the name of the output file.
        Parameters:
        doc - Document to write
        extSysName - External System Name
        esName - Enterprise Service Name
        fileFormat - File format of output file: FLAT or XML
        sourceFile - Original file name
        delimiter - Field delimiter used in flat file
        textQualifier - Character used in flat files to mark start and end of text fields.
        fileAttributes - Name of attributes, separated by delimiter, to include in flat file output
        importDate - Original import date.
        Returns:
        Output file name
        Throws:
        MXException
      • writeExtractData

        public static java.lang.String writeExtractData(org.jdom2.Document doc,
                                                        java.lang.String extSysName,
                                                        java.lang.String esName,
                                                        java.lang.String fileFormat,
                                                        java.lang.String sourceFile,
                                                        java.lang.String delimiter,
                                                        java.lang.String textQualifier,
                                                        java.lang.String fileAttributes,
                                                        java.util.Date importDate,
                                                        boolean tempFile)
                                                 throws MXException
        Write document to a output file. Returns the name of the output file.
        Parameters:
        doc - Document to write
        extSysName - External System Name
        esName - Enterprise Service Name
        fileFormat - File format of output file: FLAT or XML
        sourceFile - Original file name
        delimiter - Field delimiter used in flat file
        textQualifier - Character used in flat files to mark start and end of text fields.
        fileAttributes - Name of attributes, separated by delimiter, to include in flat file output
        importDate - Original import date.
        tempFile - Create a temporary filename that starts with a tilde character "~".
        Returns:
        Output file name
        Throws:
        MXException
      • deleteErrorFiles

        public static void deleteErrorFiles(java.lang.String extractFileID,
                                            java.lang.String extSysName,
                                            java.lang.String esName,
                                            java.sql.Connection connection)
                                     throws MXException
        Delete error files related to Extract File ID.
        Parameters:
        extractFileID - Extract File ID
        extSysName - External System Name
        esName - Enterprise Service Name
        Throws:
        MXException
      • addToMasterDoc

        public static void addToMasterDoc(org.jdom2.Document masterDoc,
                                          org.jdom2.Element element,
                                          java.lang.String mosName,
                                          java.lang.String operation)
                                   throws MXException
        Add a transaction element to a master document. The master document can contain many transaction elements that will be reprocessed by the user.
        Parameters:
        masterDoc - Master document
        element - Transaction element
        mosName - Object Structure Name
        operation - Integration operation
        Throws:
        MXException
      • mergeFiles

        public static java.lang.String mergeFiles(java.util.List tempFiles,
                                                  java.lang.String extSysName,
                                                  java.lang.String fileFormat,
                                                  java.lang.String sourceFile,
                                                  java.util.Date importDate,
                                                  java.lang.String mosName,
                                                  java.lang.String operation)
                                           throws MXException
        Merge all temporary files in to a single export file.
        Parameters:
        tempFiles -
        extSysName - External System Name
        fileFormat - File format of output file: FLAT or XML
        sourceFile - Original file name
        importDate - Original import date.
        mosName - Object Structure Name
        operation - Integration operation
        Returns:
        Output file name
        Throws:
        MXException