refactor: relocate options classes to dedicated Options folders

Move configuration options from Core/DataAccess/DataSync/ExcelIO to
dedicated Options folders within each project for better organization.
Update all references and tests accordingly.
This commit is contained in:
Joseph Doherty
2026-01-03 08:55:08 -05:00
parent 3cb73eb09f
commit ec4c8fab87
52 changed files with 4628 additions and 202 deletions
@@ -1,34 +0,0 @@
namespace JdeScoping.Core.Options;
/// <summary>
/// Authentication configuration options
/// </summary>
public class AuthOptions
{
/// <summary>
/// Configuration section name
/// </summary>
public const string SectionName = "Auth";
/// <summary>
/// Enable fake authentication for development.
/// When true, any credentials are accepted.
/// </summary>
public bool UseFakeAuth { get; set; } = false;
/// <summary>
/// Name of the authentication cookie.
/// </summary>
public string CookieName { get; set; } = "ScopingTool.Auth";
/// <summary>
/// Cookie expiration in minutes (default: 8 hours).
/// </summary>
public int CookieExpirationMinutes { get; set; } = 480;
/// <summary>
/// Optional list of usernames that bypass group check.
/// Use sparingly for admin/testing purposes.
/// </summary>
public string[] AdminBypassUsers { get; set; } = [];
}
@@ -1,22 +0,0 @@
namespace JdeScoping.Core.Options;
/// <summary>
/// Configuration options for data source selection (Oracle vs file-based).
/// </summary>
public class DataSourceOptions
{
/// <summary>
/// Configuration section name in appsettings.json.
/// </summary>
public const string SectionName = "DataSource";
/// <summary>
/// Use file-based data sources instead of Oracle for development.
/// </summary>
public bool UseFileDataSource { get; set; } = false;
/// <summary>
/// Directory containing JSON data files for file-based data source.
/// </summary>
public string FileDirectory { get; set; } = "DevData";
}
@@ -1,32 +0,0 @@
namespace JdeScoping.Core.Options;
/// <summary>
/// Configuration options for data synchronization background jobs.
/// </summary>
public class DataSyncOptions
{
/// <summary>
/// Configuration section name in appsettings.json.
/// </summary>
public const string SectionName = "DataSync";
/// <summary>
/// Cron schedule for mass (full) data refresh. Empty string disables the schedule.
/// </summary>
public string MassRefreshCronSchedule { get; set; } = "0 0 6 * * SAT";
/// <summary>
/// Cron schedule for daily incremental data refresh. Empty string disables the schedule.
/// </summary>
public string DailyRefreshCronSchedule { get; set; } = "0 0 4 * * *";
/// <summary>
/// Cron schedule for hourly data refresh. Empty string disables the schedule.
/// </summary>
public string HourlyRefreshCronSchedule { get; set; } = "0 0 * * * *";
/// <summary>
/// Maximum number of concurrent update operations.
/// </summary>
public int MaxConcurrentUpdates { get; set; } = 4;
}
@@ -1,27 +0,0 @@
namespace JdeScoping.Core.Options;
/// <summary>
/// Configuration options for Excel export functionality.
/// </summary>
public class ExcelExportOptions
{
/// <summary>
/// Configuration section name in appsettings.json.
/// </summary>
public const string SectionName = "ExcelExport";
/// <summary>
/// Directory for temporary Excel files.
/// </summary>
public string TempDirectory { get; set; } = "/tmp/lotfinder";
/// <summary>
/// Maximum number of rows per Excel sheet.
/// </summary>
public int MaxRowsPerSheet { get; set; } = 1048576;
/// <summary>
/// Default date format for Excel cells.
/// </summary>
public string DefaultDateFormat { get; set; } = "yyyy-MM-dd HH:mm:ss";
}
@@ -1,35 +0,0 @@
namespace JdeScoping.Core.Options;
/// <summary>
/// LDAP configuration options for authentication
/// </summary>
public class LdapOptions
{
/// <summary>
/// Configuration section name
/// </summary>
public const string SectionName = "Ldap";
/// <summary>
/// LDAP server URLs (supports multiple for failover).
/// Example: ["ldap.corp.example.com", "ldap2.corp.example.com"]
/// </summary>
public string[] ServerUrls { get; set; } = [];
/// <summary>
/// Distinguished name of required group for access.
/// Example: "CN=ScopingTool-Users,OU=Groups,DC=corp,DC=example,DC=com"
/// </summary>
public string GroupDn { get; set; } = string.Empty;
/// <summary>
/// LDAP search base for user lookups.
/// Example: "DC=corp,DC=example,DC=com"
/// </summary>
public string SearchBase { get; set; } = string.Empty;
/// <summary>
/// Connection timeout in seconds.
/// </summary>
public int ConnectionTimeoutSeconds { get; set; } = 30;
}
@@ -1,8 +0,0 @@
namespace JdeScoping.Core.Options;
public class SearchOptions
{
public int MaxResultRows { get; set; } = 100000;
public int TimeoutSeconds { get; set; } = 300;
public int MaxConcurrentSearches { get; set; } = 5;
}
@@ -1,27 +0,0 @@
namespace JdeScoping.Core.Options;
/// <summary>
/// Configuration options for search processing background service.
/// </summary>
public class SearchProcessingOptions
{
/// <summary>
/// Configuration section name in appsettings.json.
/// </summary>
public const string SectionName = "SearchProcessing";
/// <summary>
/// Interval in seconds between polling for new search requests.
/// </summary>
public int PollingIntervalSeconds { get; set; } = 5;
/// <summary>
/// Maximum number of concurrent search operations.
/// </summary>
public int MaxConcurrentSearches { get; set; } = 2;
/// <summary>
/// Search operation timeout in minutes.
/// </summary>
public int SearchTimeoutMinutes { get; set; } = 30;
}