Files
DP44/docs/ai/Common/DTS.Common/Interface/Groups.md

82 lines
3.7 KiB
Markdown
Raw Normal View History

2026-04-17 14:55:32 -04:00
---
source_files:
- Common/DTS.Common/Interface/Groups/IGroupImportImportView.cs
- Common/DTS.Common/Interface/Groups/IGroupHardwareDbRecord.cs
- Common/DTS.Common/Interface/Groups/IGroupImportOptionsView.cs
- Common/DTS.Common/Interface/Groups/IGroupImportPreviewView.cs
- Common/DTS.Common/Interface/Groups/ITestSetupGroupRecord.cs
- Common/DTS.Common/Interface/Groups/IGroupChannel.cs
- Common/DTS.Common/Interface/Groups/ITestObject.cs
- Common/DTS.Common/Interface/Groups/IGroupDbRecord.cs
- Common/DTS.Common/Interface/Groups/IGroupImportViewModel.cs
generated_at: "2026-04-17T15:32:03.577164+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "872c0bf6ee2eeb3a"
---
# Documentation: DTS.Common.Interface.Groups
## 1. Purpose
This module defines the core interfaces for the Group Import subsystem within DTS. It provides contracts for database record representations (`IGroupDbRecord`, `IGroupHardwareDbRecord`, `ITestSetupGroupRecord`), view interfaces for a multi-step import wizard (`IGroupImportOptionsView`, `IGroupImportPreviewView`, `IGroupImportImportView`), domain entities (`IGroupChannel`, `ITestObject`), and a coordinating view model (`IGroupImportViewModel`). The module enables parsing `.GRP` files, validating group configurations, and committing groups with their associated channels to the database through a delegate-based architecture that bridges the import module with the host application.
---
## 2. Public Interface
### IGroupImportImportView
**Inherits:** `IBaseView`
Marker interface for views responsible for presenting progress feedback during group creation and commit operations. No members defined beyond the base interface.
---
### IGroupHardwareDbRecord
Interface describing a GroupHardware record in the database.
| Property | Type | Attributes | Description |
|----------|------|------------|-------------|
| `Id` | `int` | `[Key]`, `[Column("Id")]` | Primary key of the GroupHardware record |
| `GroupId` | `int` | `[Column("GroupId")]` | Foreign key reference to a group |
| `DASId` | `int` | `[Column("DASId")]` | Data acquisition system identifier |
| `SerialNumber` | `string` | `[Column("SerialNumber")]` | Serial number of the hardware |
---
### IGroupImportOptionsView
**Inherits:** `IBaseView`
View interface for file selection and validation.
| Method | Signature | Description |
|--------|-----------|-------------|
| `Validate` | `bool Validate(out List<string> errors, out List<string> warnings)` | Returns `true` if files have been selected; `false` otherwise. Populates `errors` and `warnings` collections with validation messages. |
---
### IGroupImportPreviewView
**Inherits:** `IBaseView`
View interface for parsing channels from `.GRP` files, displaying results, and allowing group selection and renaming.
| Method | Signature | Description |
|--------|-----------|-------------|
| `Validate` | `bool Validate(bool userIsAdmin, out List<string> errors, out List<string> warnings)` | Validates currently selected groups including channels and group names. Returns `true` if all selected groups are valid. Errors indicate continuation is blocked; warnings are non-fatal. |
---
### ITestSetupGroupRecord
Interface describing a test setup group database record.
| Property | Type | Description |
|----------|------|-------------|
| `GroupId` | `int` | Database ID of the group |
| `DisplayOrder` | `int` | Display order of the group |
| `Position` | `string` | Position field (ISO 13499) for group, if available. Groups can contain mixed position fields. |
| `TestObjectType` | `string` | Test Object field (ISO 13499) for group, if available. Groups can contain mixed test object fields. |
| `TestSetupId` | `int` | Database ID of the test setup the group belongs to |
---