kCura.WinEDDS.BulkImageFileImporter
namespace kCura.WinEDDS
{
public class BulkImageFileImporter : ImportTapiBase
{
public delegate void EndRunEventHandler (string runID);
public delegate void FatalErrorEventEventHandler (string message, Exception ex);
public delegate void StatusMessageEventHandler (StatusEventArgs args);
public delegate void ReportErrorEventEventHandler (IDictionary row);
protected IImageReader _imageReader;
protected IFieldQuery _fieldQuery;
protected IProductionManager _productionManager;
protected IBulkImportManager _bulkImportManager;
protected Field _keyFieldDto;
protected bool _fullTextStorageIsInSql;
public int MaxNumberOfErrorsInGrid { get; set; }
public bool SkipExtractedTextEncodingCheck { get; set; }
public bool OIFileIdMapped { get; set; }
public string OIFileIdColumnName { get; set; }
public string OIFileTypeColumnName { get; set; }
public string FileNameColumn { get; set; }
public bool DisableImageTypeValidation { get; set; }
public bool DisableImageLocationValidation { get; set; }
public bool DisableUserSecurityCheck { get; set; }
public ImportAuditLevel AuditLevel { get; set; }
public List<int> BatchSizeHistoryList { get; }
public bool HasErrors { get; }
public string RunId { get; }
protected bool Continue { get; }
public TapiClient UploadConnection { get; }
public string ErrorLogFileName { get; }
protected virtual int MinimumBatchSize { get; set; }
protected virtual int ImportBatchSize { get; set; }
protected int JobCompleteBatchSize { get; set; }
protected int ImportBatchVolume { get; set; }
protected virtual int NumberOfRetries { get; }
protected virtual int WaitTimeBetweenRetryAttempts { get; }
protected virtual bool BatchResizeEnabled { get; }
public event EndRunEventHandler EndRun;
public event FatalErrorEventEventHandler FatalErrorEvent;
public event StatusMessageEventHandler StatusMessage;
public event ReportErrorEventEventHandler ReportErrorEvent;
public BulkImageFileImporter(int folderID, ImageLoadFile args, ProcessContext context, IIoReporter reporter, ILog logger, Guid processID, bool doRetryLogic, CancellationTokenSource tokenSource, Func<string> correlationIdFunc, global::Relativity.DataExchange.Service.ExecutionSource executionSource = global::Relativity.DataExchange.Service.ExecutionSource.Unknown);
protected virtual void InitializeUploaders(ImageLoadFile args);
protected virtual void InitializeDTOs(ImageLoadFile args);
protected virtual void InitializeManagers(ImageLoadFile args);
public void ReadFile();
public MassImportResults RunBulkImport(OverwriteType overwrite, bool useBulk);
protected virtual void LowerBatchLimits();
protected void LowerBatchSizeAndRetry(string oldBulkLoadFilePath, string dataGridFilePath, int totalRecords);
protected virtual int DoLogicAndPushImageBatch(int totalRecords, int recordsProcessed, string bulkLocation, string dataGridLocation, ref long charactersSuccessfullyProcessed, int i, long charactersProcessed);
protected virtual TextWriter CreateStreamWriter(string tmpLocation);
protected virtual TextReader CreateStreamReader(string outputPath);
public void PushImageBatch(string bulkLoadFilePath, string dataGridFilePath, bool shouldCompleteJob, bool lastRun);
public virtual IImageReader GetImageReader();
public void AdvanceRecord();
public void ReadFile(string path);
public ImportStatus ProcessImageLine(ImageRecord imageRecord);
public static string GetFileLocation(ImageRecord record);
protected void OnStatusMessage(StatusEventArgs args);
}
}