diff --git a/ATxCommon/Serializables/ServiceConfig.cs b/ATxCommon/Serializables/ServiceConfig.cs index 601240e90517253329de561b60c7d5d1ce248ff1..4217ccd75d81a39cd62b197277bb518250ced447 100644 --- a/ATxCommon/Serializables/ServiceConfig.cs +++ b/ATxCommon/Serializables/ServiceConfig.cs @@ -77,11 +77,6 @@ namespace ATxCommon.Serializables /// </summary> public string HostAlias { get; set; } - /// <summary> - /// A human friendly name for the target, to be used in emails etc. - /// </summary> - public string DestinationAlias { get; set; } - /// <summary> /// The base drive for the spooling directories (incoming and managed). /// </summary> @@ -92,18 +87,23 @@ namespace ATxCommon.Serializables /// </summary> public string IncomingDirectory { get; set; } - /// <summary> - /// The name of a marker file to be placed in all **sub**directories - /// inside the IncomingDirectory. - /// </summary> - public string MarkerFile { get; set; } - /// <summary> /// A directory on SourceDrive to hold the three subdirectories "DONE", /// "PROCESSING" and "UNMATCHED" used during and after transfers. /// </summary> public string ManagedDirectory { get; set; } + /// <summary> + /// GracePeriod: number of days after data in the "DONE" location expires, + /// which will trigger a summary email to the admin address. + /// </summary> + public int GracePeriod { get; set; } + + /// <summary> + /// A human friendly name for the target, to be used in emails etc. + /// </summary> + public string DestinationAlias { get; set; } + /// <summary> /// Target path to transfer files to. Usually a UNC location. /// </summary> @@ -115,11 +115,6 @@ namespace ATxCommon.Serializables /// </summary> public string TmpTransferDir { get; set; } - /// <summary> - /// The email address to be used as "From:" when sending mail notifications. - /// </summary> - public string EmailFrom { get; set; } - /// <summary> /// The interval (in ms) for checking for new files and system parameters. /// </summary> @@ -130,62 +125,37 @@ namespace ATxCommon.Serializables /// if this limit is exceeded. /// </summary> public int MaxCpuUsage { get; set; } - + /// <summary> /// Minimum amount of free RAM (in MB) required for the service to operate. /// </summary> public int MinAvailableMemory { get; set; } - /// <summary> - /// Minimum amount of time in minutes between two mail notifications to the admin address. - /// </summary> - public int AdminNotificationDelta { get; set; } + #endregion - /// <summary> - /// Minimum amount of time in minutes between two low-storage-space notifications. - /// </summary> - public int StorageNotificationDelta { get; set; } - /// <summary> - /// GracePeriod: number of days after data in the "DONE" location expires, - /// which will trigger a summary email to the admin address. - /// </summary> - public int GracePeriod { get; set; } + #region optional configuration parameters /// <summary> - /// Flag whether to send explicit mail notifications to the admin on selected events. + /// Switch on debug log messages. /// </summary> - public bool SendAdminNotification { get; set; } - + public bool Debug { get; set; } + /// <summary> - /// Flag whether to send a mail notification to the user upon completed transfers. + /// The name of a marker file to be placed in all **sub**directories + /// inside the IncomingDirectory. /// </summary> - public bool SendTransferNotification { get; set; } + public string MarkerFile { get; set; } /// <summary> - /// Switch on debug log messages. + /// SMTP server to send mails and Fatal/Error log messages. No mails if omitted. /// </summary> - public bool Debug { get; set; } - - [XmlArray] - [XmlArrayItem(ElementName = "DriveToCheck")] - public List<DriveToCheck> SpaceMonitoring { get; set; } - - [XmlArray] - [XmlArrayItem(ElementName = "ProcessName")] - public List<string> BlacklistedProcesses { get; set; } - - #endregion - - - #region optional configuration parameters + public string SmtpHost { get; set; } /// <summary> - /// SMTP server used to send mails (if configured) and Fatal/Error log messages. - /// - /// No mails will be sent if this is omitted. + /// SMTP port for sending emails (default: 25). /// </summary> - public string SmtpHost { get; set; } + public int SmtpPort { get; set; } /// <summary> /// SMTP username to authenticate when sending emails (if required). @@ -198,9 +168,9 @@ namespace ATxCommon.Serializables public string SmtpPasswortCredential { get; set; } /// <summary> - /// SMTP port for sending emails (25 will be used if this entry is omitted). + /// The email address to be used as "From:" when sending mail notifications. /// </summary> - public int SmtpPort { get; set; } + public string EmailFrom { get; set; } /// <summary> /// A string to be added as a prefix to the subject when sending emails. @@ -217,16 +187,37 @@ namespace ATxCommon.Serializables /// </summary> public string AdminDebugEmailAdress { get; set; } + /// <summary> + /// Flag whether to send a mail notification to the user upon completed transfers. + /// </summary> + public bool SendTransferNotification { get; set; } + + /// <summary> + /// Flag whether to send explicit mail notifications to the admin on selected events. + /// </summary> + public bool SendAdminNotification { get; set; } + + /// <summary> + /// Minimum amount of time in minutes between two mail notifications to the admin address. + /// </summary> + public int AdminNotificationDelta { get; set; } + /// <summary> /// Minimum time in minutes between two mails about expired folders in the grace location. /// </summary> public int GraceNotificationDelta { get; set; } /// <summary> - /// RoboCopy parameter for limiting the bandwidth (mostly for testing purposes). + /// Minimum amount of time in minutes between two low-storage-space notifications. /// </summary> - /// See the RoboCopy documentation for more details. - public int InterPacketGap { get; set; } + public int StorageNotificationDelta { get; set; } + + /// <summary> + /// A list of process names causing transfers to be suspended if running. + /// </summary> + [XmlArray] + [XmlArrayItem(ElementName = "ProcessName")] + public List<string> BlacklistedProcesses { get; set; } /// <summary> /// EnforceInheritedACLs: whether to enforce ACL inheritance when moving files and @@ -234,6 +225,19 @@ namespace ATxCommon.Serializables /// </summary> public bool EnforceInheritedACLs { get; set; } + /// <summary> + /// A list of drives and thresholds to monitor free space. + /// </summary> + [XmlArray] + [XmlArrayItem(ElementName = "DriveToCheck")] + public List<DriveToCheck> SpaceMonitoring { get; set; } + + /// <summary> + /// RoboCopy parameter for limiting the bandwidth (mostly for testing purposes). + /// </summary> + /// See the RoboCopy documentation for more details. + public int InterPacketGap { get; set; } + #endregion