2023-01-24
This commit is contained in:
17
Adaptation/Ifx/Eaf/Common/Configuration/ConnectionSetting.cs
Normal file
17
Adaptation/Ifx/Eaf/Common/Configuration/ConnectionSetting.cs
Normal file
@ -0,0 +1,17 @@
|
||||
namespace Adaptation.Ifx.Eaf.Common.Configuration;
|
||||
|
||||
[System.Runtime.Serialization.DataContract]
|
||||
public class ConnectionSetting
|
||||
{
|
||||
|
||||
#pragma warning disable CA2254
|
||||
#pragma warning disable IDE0060
|
||||
|
||||
public ConnectionSetting(string name, string value) { }
|
||||
|
||||
[System.Runtime.Serialization.DataMember]
|
||||
public string Name { get; set; }
|
||||
[System.Runtime.Serialization.DataMember]
|
||||
public string Value { get; set; }
|
||||
|
||||
}
|
23
Adaptation/Ifx/Eaf/EquipmentConnector/File/Component/File.cs
Normal file
23
Adaptation/Ifx/Eaf/EquipmentConnector/File/Component/File.cs
Normal file
@ -0,0 +1,23 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Adaptation.Ifx.Eaf.EquipmentConnector.File.Component;
|
||||
|
||||
public class File
|
||||
{
|
||||
|
||||
#pragma warning disable CA2254
|
||||
#pragma warning disable IDE0060
|
||||
|
||||
public File(string filePath) => throw new NotImplementedException();
|
||||
public File(string filePath, DateTime timeFileFound) => throw new NotImplementedException();
|
||||
|
||||
public string Path { get; }
|
||||
public DateTime TimeFound { get; }
|
||||
public bool IsErrorFile { get; }
|
||||
public Dictionary<string, string> ContentParameters { get; }
|
||||
|
||||
public File UpdateContentParameters(Dictionary<string, string> contentParameters) => throw new NotImplementedException();
|
||||
public File UpdateParsingStatus(bool isErrorFile) => throw new NotImplementedException();
|
||||
|
||||
}
|
@ -0,0 +1,40 @@
|
||||
using Adaptation.Ifx.Eaf.EquipmentConnector.File.Configuration;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Adaptation.Ifx.Eaf.EquipmentConnector.File.Component;
|
||||
|
||||
public class FilePathGenerator
|
||||
{
|
||||
|
||||
#pragma warning disable CA1822
|
||||
#pragma warning disable CA2254
|
||||
#pragma warning disable IDE0060
|
||||
|
||||
public const char PLACEHOLDER_IDENTIFIER = '%';
|
||||
public const char PLACEHOLDER_SEPARATOR = ':';
|
||||
public const string PLACEHOLDER_NOT_AVAILABLE = "NA";
|
||||
public const string PLACEHOLDER_ORIGINAL_FILE_NAME = "OriginalFileName";
|
||||
public const string PLACEHOLDER_ORIGINAL_FILE_EXTENSION = "OriginalFileExtension";
|
||||
public const string PLACEHOLDER_DATE_TIME = "DateTime";
|
||||
public const string PLACEHOLDER_SUB_FOLDER = "SubFolder";
|
||||
public const string PLACEHOLDER_CELL_NAME = "CellName";
|
||||
|
||||
public FilePathGenerator(FileConnectorConfiguration config, Dictionary<string, string> customPattern = null) => throw new NotImplementedException();
|
||||
public FilePathGenerator(FileConnectorConfiguration config, File file, bool isErrorFile = false, Dictionary<string, string> customPattern = null) => throw new NotImplementedException();
|
||||
public FilePathGenerator(FileConnectorConfiguration config, string sourceFilePath, bool isErrorFile = false, Dictionary<string, string> customPattern = null) => throw new NotImplementedException();
|
||||
|
||||
protected string SubFolderPath { get; }
|
||||
protected FileConnectorConfiguration Configuration { get; }
|
||||
protected File File { get; }
|
||||
protected bool IsErrorFile { get; }
|
||||
protected string DefaultPlaceHolderValue { get; }
|
||||
|
||||
public string GetFullTargetPath() => throw new NotImplementedException();
|
||||
public virtual string GetTargetFileName() => throw new NotImplementedException();
|
||||
public string GetTargetFolder(bool throwExceptionIfNotExist = true) => throw new NotImplementedException();
|
||||
protected virtual string GetSubFolder(string folderPattern, string subFolderPath) => throw new NotImplementedException();
|
||||
protected virtual string PrepareFolderPath(string targetFolderPath, string subFolderPath) => throw new NotImplementedException();
|
||||
protected string ReplacePlaceholder(string inputPath) => throw new NotImplementedException();
|
||||
|
||||
}
|
@ -0,0 +1,134 @@
|
||||
using Adaptation.Ifx.Eaf.Common.Configuration;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Adaptation.Ifx.Eaf.EquipmentConnector.File.Configuration;
|
||||
|
||||
[System.Runtime.Serialization.DataContract]
|
||||
public class FileConnectorConfiguration
|
||||
{
|
||||
public const ulong IDLE_EVENT_WAIT_TIME_DEFAULT = 360;
|
||||
public const ulong FILE_HANDLE_TIMEOUT_DEFAULT = 15;
|
||||
|
||||
[System.Runtime.Serialization.DataMember]
|
||||
public virtual bool? TriggerOnChanged { get; set; }
|
||||
[System.Runtime.Serialization.DataMember]
|
||||
public virtual long? PostProcessingRetries { get; set; }
|
||||
[System.Runtime.Serialization.DataMember]
|
||||
public virtual bool? CopySourceFolderStructure { get; set; }
|
||||
[System.Runtime.Serialization.DataMember]
|
||||
public IfPostProcessingFailsEnum? IfPostProcessingFailsAction { get; set; }
|
||||
[System.Runtime.Serialization.DataMember]
|
||||
public string AlternateTargetFolder { get; set; }
|
||||
[System.Runtime.Serialization.DataMember]
|
||||
public long? FileHandleTimeout { get; set; }
|
||||
[System.Runtime.Serialization.DataMember]
|
||||
public bool? DeleteEmptySourceSubFolders { get; set; }
|
||||
[System.Runtime.Serialization.DataMember]
|
||||
public long? IdleEventWaitTimeInSeconds { get; set; }
|
||||
[System.Runtime.Serialization.DataMember]
|
||||
public string FileAgeThreshold { get; set; }
|
||||
public bool? FolderAgeCheckIndividualSubFolders { get; set; }
|
||||
[System.Runtime.Serialization.DataMember]
|
||||
public virtual ZipModeEnum? ZipMode { get; set; }
|
||||
[System.Runtime.Serialization.DataMember]
|
||||
public FileAgeFilterEnum? FileAgeFilterMode { get; set; }
|
||||
[System.Runtime.Serialization.DataMember]
|
||||
public string ZipTargetFileName { get; set; }
|
||||
[System.Runtime.Serialization.DataMember]
|
||||
public string ZipErrorTargetFileName { get; set; }
|
||||
[System.Runtime.Serialization.DataMember]
|
||||
public long? ZipFileSubFolderLevel { get; set; }
|
||||
[System.Runtime.Serialization.DataMember]
|
||||
public string DefaultPlaceHolderValue { get; set; }
|
||||
[System.Runtime.Serialization.DataMember]
|
||||
public bool? UseZip64Mode { get; set; }
|
||||
[System.Runtime.Serialization.DataMember]
|
||||
public List<ConnectionSetting> ConnectionSettings { get; set; }
|
||||
public string SourceDirectoryCloaking { get; set; }
|
||||
public string FolderAgeThreshold { get; set; }
|
||||
[System.Runtime.Serialization.DataMember]
|
||||
public virtual long? FileScanningIntervalInSeconds { get; set; }
|
||||
[System.Runtime.Serialization.DataMember]
|
||||
public virtual bool? TriggerOnCreated { get; set; }
|
||||
[System.Runtime.Serialization.DataMember]
|
||||
public virtual long? ZipFileTime { get; set; }
|
||||
[System.Runtime.Serialization.DataMember]
|
||||
public string SourceFileLocation { get; set; }
|
||||
[System.Runtime.Serialization.DataMember]
|
||||
public string SourceFileFilter { get; set; }
|
||||
public List<string> SourceFileFilters { get; set; }
|
||||
[System.Runtime.Serialization.DataMember]
|
||||
public virtual bool? IncludeSubDirectories { get; set; }
|
||||
[System.Runtime.Serialization.DataMember]
|
||||
public virtual FileScanningOptionEnum? FileScanningOption { get; set; }
|
||||
[System.Runtime.Serialization.DataMember]
|
||||
public string TargetFileLocation { get; set; }
|
||||
[System.Runtime.Serialization.DataMember]
|
||||
public string ErrorTargetFileLocation { get; set; }
|
||||
[System.Runtime.Serialization.DataMember]
|
||||
public string TargetFileName { get; set; }
|
||||
[System.Runtime.Serialization.DataMember]
|
||||
public virtual long? FileHandleWaitTime { get; set; }
|
||||
[System.Runtime.Serialization.DataMember]
|
||||
public IfFileExistEnum? IfFileExistAction { get; set; }
|
||||
[System.Runtime.Serialization.DataMember]
|
||||
public long? ConnectionRetryInterval { get; set; }
|
||||
[System.Runtime.Serialization.DataMember]
|
||||
public PreProcessingModeEnum? PreProcessingMode { get; set; }
|
||||
[System.Runtime.Serialization.DataMember]
|
||||
public PostProcessingModeEnum? PostProcessingMode { get; set; }
|
||||
[System.Runtime.Serialization.DataMember]
|
||||
public PostProcessingModeEnum? ErrorPostProcessingMode { get; set; }
|
||||
[System.Runtime.Serialization.DataMember]
|
||||
public virtual long? ZipFileAmount { get; set; }
|
||||
[System.Runtime.Serialization.DataMember]
|
||||
public string ErrorTargetFileName { get; set; }
|
||||
|
||||
public void Initialize() => throw new NotImplementedException();
|
||||
|
||||
public enum PostProcessingModeEnum
|
||||
{
|
||||
None = 0,
|
||||
Move = 1,
|
||||
Copy = 2,
|
||||
Rename = 3,
|
||||
Zip = 4,
|
||||
Delete = 5,
|
||||
MoveFolder = 6,
|
||||
CopyFolder = 7,
|
||||
DeleteFolder = 8
|
||||
}
|
||||
public enum PreProcessingModeEnum
|
||||
{
|
||||
None = 0,
|
||||
Process = 1
|
||||
}
|
||||
public enum IfFileExistEnum
|
||||
{
|
||||
Overwrite = 0,
|
||||
LeaveFiles = 1,
|
||||
Delete = 2
|
||||
}
|
||||
public enum IfPostProcessingFailsEnum
|
||||
{
|
||||
LeaveFiles = 0,
|
||||
Delete = 1
|
||||
}
|
||||
public enum FileScanningOptionEnum
|
||||
{
|
||||
FileWatcher = 0,
|
||||
TimeBased = 1
|
||||
}
|
||||
public enum ZipModeEnum
|
||||
{
|
||||
ZipByAmountOrTime = 0,
|
||||
ZipByFileName = 1,
|
||||
ZipBySubFolderName = 2
|
||||
}
|
||||
public enum FileAgeFilterEnum
|
||||
{
|
||||
IgnoreNewer = 0,
|
||||
IgnoreOlder = 1
|
||||
}
|
||||
}
|
@ -0,0 +1,18 @@
|
||||
using Adaptation.Eaf.EquipmentCore.SelfDescription.ParameterTypes;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Adaptation.Ifx.Eaf.EquipmentConnector.File.SelfDescription;
|
||||
|
||||
public class FileConnectorParameterTypeDefinitionProvider
|
||||
{
|
||||
|
||||
#pragma warning disable CA1822
|
||||
#pragma warning disable CA2254
|
||||
#pragma warning disable IDE0060
|
||||
|
||||
public FileConnectorParameterTypeDefinitionProvider() { }
|
||||
|
||||
public IEnumerable<ParameterTypeDefinition> GetAllParameterTypeDefinition() => null;
|
||||
public ParameterTypeDefinition GetParameterTypeDefinition(string name) => null;
|
||||
|
||||
}
|
Reference in New Issue
Block a user