kCura.WinEDDS.BulkLoadFileImporter
namespace kCura.WinEDDS
{
public class BulkLoadFileImporter : LoadFileBase, IImportJob, IDisposable
{
public delegate void FatalErrorEventEventHandler (string message, Exception ex, string runID);
public delegate void StatusMessageEventHandler (StatusEventArgs args);
public delegate void EndFileImportEventHandler (string runID);
public delegate void StartFileImportEventHandler ();
public delegate void ReportErrorEventEventHandler (IDictionary row);
public delegate void DataSourcePrepEventEventHandler (DataSourcePrepEventArgs e);
public delegate void FieldMappedEventHandler (string sourceField, string workspaceField);
public class IdentityValueNotSetException : ImporterException
{
public IdentityValueNotSetException();
protected IdentityValueNotSetException(SerializationInfo info, StreamingContext context);
}
public class ExtractedTextFileNotFoundException : ImporterException
{
public ExtractedTextFileNotFoundException();
protected ExtractedTextFileNotFoundException(SerializationInfo info, StreamingContext context);
}
public new class ExtractedTextTooLargeException : ImporterException
{
public ExtractedTextTooLargeException();
protected ExtractedTextTooLargeException(SerializationInfo info, StreamingContext context);
}
public static readonly string RestartTimeEventMsg;
public static readonly string CancelEventMsg;
public const string DATA_GRID_ID_FIELD_NAME = "DataGridID";
public const string ERROR_MESSAGE_FOLDER_NAME_TOO_LONG = "Error occurred when importing the document. The folder name is longer than 255 characters.";
protected ImportOverwriteType Overwrite;
protected IAuditManager AuditManager;
protected IRelativityManager RelativityManager;
protected long RecordCount;
protected int Offset;
protected bool FirstTimeThrough;
protected int DestinationFolderColumnIndex;
protected FolderCache FolderCache;
protected OutputFileWriter OutputFileWriter;
protected int OverlayArtifactId;
protected int _batchCounter;
public int MaxNumberOfErrorsInGrid;
protected string BulkLoadFileFieldDelimiter;
protected virtual ProcessContext Context { get; set; }
protected bool LinkDataGridRecords { get; set; }
public ITimeKeeperManager Timekeeper { get; set; }
public bool DisableNativeValidation { get; set; }
public bool DisableUserSecurityCheck { get; set; }
public ImportAuditLevel AuditLevel { get; set; }
public List<int> BatchSizeHistoryList { get; }
protected virtual int NumberOfRetries { get; }
protected virtual int WaitTimeBetweenRetryAttempts { get; }
public Field[] AllFields { get; }
public Field[] DocumentFieldsForCreate { get; }
public Field FileInfoField { get; }
public Field FullTextField { get; }
public virtual bool HasErrors { get; }
public TapiClient UploadConnection { get; }
public int FoldersCreated { get; }
public int CodesCreated { get; }
public ArrayList UnmappedRelationalFields { get; }
public string RunId { get; }
protected virtual int ParentArtifactTypeID { get; }
protected virtual int MinimumBatchSize { get; set; }
protected int ImportBatchSize { get; set; }
protected int JobCompleteBatchSize { get; set; }
protected int ImportBatchVolume { get; set; }
protected virtual bool BatchResizeEnabled { get; }
public event FatalErrorEventEventHandler FatalErrorEvent;
public event StatusMessageEventHandler StatusMessage;
public event EndFileImportEventHandler EndFileImport;
public event StartFileImportEventHandler StartFileImport;
public event ReportErrorEventEventHandler ReportErrorEvent;
public event DataSourcePrepEventEventHandler DataSourcePrepEvent;
public event FieldMappedEventHandler FieldMapped;
public BulkLoadFileImporter(LoadFile args, ProcessContext context, IIoReporter reporter, ILog logger, int timeZoneOffset, bool initializeUploaders, Guid processID, bool doRetryLogic, string bulkLoadFileFieldDelimiter, CancellationTokenSource tokenSource, Func<string> correlationIdFunc, IRunningContext runningContext = null);
public BulkLoadFileImporter(LoadFile args, ProcessContext context, IIoReporter reporter, ILog logger, int timeZoneOffset, bool autoDetect, bool initializeUploaders, Guid processID, bool doRetryLogic, string bulkLoadFileFieldDelimiter, CancellationTokenSource tokenSource, Func<string> correlationIdFunc, IRunningContext runningContext = null);
public BulkLoadFileImporter(LoadFile args, ProcessContext context, IIoReporter reporter, ILog logger, int timeZoneOffset, bool autoDetect, bool initializeUploaders, Guid processID, bool doRetryLogic, string bulkLoadFileFieldDelimiter, CancellationTokenSource tokenSource, bool initializeArtifactReader, Func<string> correlationIdFunc, IRunningContext runningContext = null);
protected virtual void CreateUploaders(LoadFile args);
public string[] GetColumnNames(object args);
public void DeleteTempLoadFiles();
public void WriteCodeLineToTempFile(string documentIdentifier, int codeArtifactID, int codeTypeID);
public void WriteObjectLineToTempFile(string ownerIdentifier, string objectName, int artifactID, int objectTypeArtifactID, int fieldID);
public virtual object ReadFile(string path);
protected void InitializeFolderManagement();
public static string CleanDestinationFolderPath(string path);
public static bool InnerRelativityFolderPathsAreTooLarge(string cleanFolderPath);
protected MassImportResults BulkImport(NativeLoadInfo settings, bool includeExtractedTextEncoding);
protected virtual void LowerBatchLimits();
public virtual void OnSettingsObjectCreate(NativeLoadInfo settings);
protected void PushNativeBatch(string outputNativePath, bool shouldCompleteJob, bool lastRun);
protected OverlayBehavior GetMassImportOverlayBehavior(LoadFile.FieldOverlayBehavior? inputOverlayType);
protected void OpenFileWriters();
protected void CloseFileWriters();
public FieldInfo[] GetMappedFields(int artifactTypeId, IList<int> ObjectFieldIdListContainsArtifactId);
protected void ManageDocumentLine(MetaDocument mdoc);
protected string PrepareFieldCollectionAndExtractIdentityValue(ArtifactFieldCollection record, int CurrentLineNumber);
protected void WriteStatusLine(EventType2 et, string line);
protected void WriteWarning(string line);
protected virtual void _processContext_HaltProcessEvent(object sender, CancellationRequestEventArgs e);
protected virtual void _processContext_ExportServerErrors(object sender, ExportErrorEventArgs e);
protected void CleanupTempTables();
protected void OnFatalError(string message, Exception ex, string runID);
protected void OnStatusMessage(StatusEventArgs args);
protected void OnEndFileImport(string runID);
protected void OnStartFileImport();
protected void OnDataSourcePrepEvent(DataSourcePrepEventArgs args);
protected void OnReportErrorEvent(IDictionary row);
protected void OnFieldMapped(string sourceField, string workspaceField);
public virtual void Dispose();
}
}