From 004f3bd155c180eac39cbf14561a49459a364619 Mon Sep 17 00:00:00 2001 From: Joseph Doherty Date: Thu, 22 Oct 2026 08:32:45 -0400 Subject: [PATCH] fix(configdb): delete dead repository members; completes 08/P8 for owned files (review 2026-10-21 08/P8; CentralUi members and tests went in the preceding P5 commit) --- .../Interfaces/Repositories/ICentralUiRepository.cs | 9 --------- .../Interfaces/Repositories/ISecurityRepository.cs | 7 ------- .../Repositories/ITemplateEngineRepository.cs | 10 ---------- .../Repositories/SecurityRepository.cs | 8 -------- .../Repositories/TemplateEngineRepository.cs | 12 ------------ 5 files changed, 46 deletions(-) diff --git a/src/ZB.MOM.WW.ScadaBridge.Commons/Interfaces/Repositories/ICentralUiRepository.cs b/src/ZB.MOM.WW.ScadaBridge.Commons/Interfaces/Repositories/ICentralUiRepository.cs index 3d1d0c27..3267b527 100644 --- a/src/ZB.MOM.WW.ScadaBridge.Commons/Interfaces/Repositories/ICentralUiRepository.cs +++ b/src/ZB.MOM.WW.ScadaBridge.Commons/Interfaces/Repositories/ICentralUiRepository.cs @@ -21,10 +21,6 @@ public interface ICentralUiRepository /// Cancellation token. /// A task that resolves to a read-only list of all data connections. Task> GetAllDataConnectionsAsync(CancellationToken cancellationToken = default); - /// Returns the full template tree including folders and templates. - /// Cancellation token. - /// A task that resolves to a read-only list of templates. - Task> GetTemplateTreeAsync(CancellationToken cancellationToken = default); /// Returns instances filtered by optional site, template, or search term. /// Optional site ID to filter by. /// Optional template ID to filter by. @@ -44,11 +40,6 @@ public interface ICentralUiRepository /// Cancellation token. /// A task that resolves to the page of rows and the total matching count. Task<(IReadOnlyList Rows, int Total)> GetInstancesPagedAsync(IReadOnlyCollection? siteIds, int? templateId, string? search, int skip, int take, CancellationToken cancellationToken = default); - /// Returns the most recent deployment records up to the specified count. - /// Maximum number of records to return. - /// Cancellation token. - /// A task that resolves to a read-only list of recent deployment records. - Task> GetRecentDeploymentsAsync(int count, CancellationToken cancellationToken = default); /// Returns the area tree for the specified site. /// The site database ID. /// Cancellation token. diff --git a/src/ZB.MOM.WW.ScadaBridge.Commons/Interfaces/Repositories/ISecurityRepository.cs b/src/ZB.MOM.WW.ScadaBridge.Commons/Interfaces/Repositories/ISecurityRepository.cs index 699220c1..4854bdf1 100644 --- a/src/ZB.MOM.WW.ScadaBridge.Commons/Interfaces/Repositories/ISecurityRepository.cs +++ b/src/ZB.MOM.WW.ScadaBridge.Commons/Interfaces/Repositories/ISecurityRepository.cs @@ -19,13 +19,6 @@ public interface ISecurityRepository /// A read-only list of all LDAP group mappings. Task> GetAllMappingsAsync(CancellationToken cancellationToken = default); /// - /// Gets all LDAP group mappings for a specific role. - /// - /// The role name. - /// A cancellation token that can be used to cancel the operation. - /// A read-only list of LDAP group mappings for the role. - Task> GetMappingsByRoleAsync(string role, CancellationToken cancellationToken = default); - /// /// Adds a new LDAP group mapping. /// /// The LDAP group mapping to add. diff --git a/src/ZB.MOM.WW.ScadaBridge.Commons/Interfaces/Repositories/ITemplateEngineRepository.cs b/src/ZB.MOM.WW.ScadaBridge.Commons/Interfaces/Repositories/ITemplateEngineRepository.cs index 25c1098a..0a2df109 100644 --- a/src/ZB.MOM.WW.ScadaBridge.Commons/Interfaces/Repositories/ITemplateEngineRepository.cs +++ b/src/ZB.MOM.WW.ScadaBridge.Commons/Interfaces/Repositories/ITemplateEngineRepository.cs @@ -76,16 +76,6 @@ public interface ITemplateEngineRepository /// Cancellation token. /// A task that resolves to one page of template summaries, ordered by id. Task> GetTemplateSummariesAsync(int skip, int? take, CancellationToken cancellationToken = default); - /// - /// Returns every template that contains a composition referencing - /// . Each result is eager-loaded with - /// its Attributes / Scripts / Compositions so the caller can build a - /// CompositionContext without a follow-up round-trip per parent. - /// - /// The composed template ID. - /// Cancellation token. - /// A task that resolves to a read-only list of parent templates that reference the composed template. - Task> GetTemplatesComposingAsync(int composedTemplateId, CancellationToken cancellationToken = default); /// Adds a new template. /// The template to add. /// Cancellation token. diff --git a/src/ZB.MOM.WW.ScadaBridge.ConfigurationDatabase/Repositories/SecurityRepository.cs b/src/ZB.MOM.WW.ScadaBridge.ConfigurationDatabase/Repositories/SecurityRepository.cs index baec69b1..77b85ebc 100644 --- a/src/ZB.MOM.WW.ScadaBridge.ConfigurationDatabase/Repositories/SecurityRepository.cs +++ b/src/ZB.MOM.WW.ScadaBridge.ConfigurationDatabase/Repositories/SecurityRepository.cs @@ -31,14 +31,6 @@ public class SecurityRepository : ISecurityRepository return await _context.LdapGroupMappings.ToListAsync(cancellationToken); } - /// - public async Task> GetMappingsByRoleAsync(string role, CancellationToken cancellationToken = default) - { - return await _context.LdapGroupMappings - .Where(m => m.Role == role) - .ToListAsync(cancellationToken); - } - /// public async Task AddMappingAsync(LdapGroupMapping mapping, CancellationToken cancellationToken = default) { diff --git a/src/ZB.MOM.WW.ScadaBridge.ConfigurationDatabase/Repositories/TemplateEngineRepository.cs b/src/ZB.MOM.WW.ScadaBridge.ConfigurationDatabase/Repositories/TemplateEngineRepository.cs index 839153d4..5ed6e36d 100644 --- a/src/ZB.MOM.WW.ScadaBridge.ConfigurationDatabase/Repositories/TemplateEngineRepository.cs +++ b/src/ZB.MOM.WW.ScadaBridge.ConfigurationDatabase/Repositories/TemplateEngineRepository.cs @@ -187,18 +187,6 @@ public class TemplateEngineRepository : ITemplateEngineRepository .ToListAsync(cancellationToken); } - /// - public async Task> GetTemplatesComposingAsync(int composedTemplateId, CancellationToken cancellationToken = default) - { - return await _context.Templates - .Where(t => t.Compositions.Any(c => c.ComposedTemplateId == composedTemplateId)) - .Include(t => t.Attributes) - .Include(t => t.Scripts) - .Include(t => t.Compositions) - .AsSplitQuery() - .ToListAsync(cancellationToken); - } - /// public async Task AddTemplateAsync(Template template, CancellationToken cancellationToken = default) {