12 KiB
source_files, generated_at, model, schema_version, sha256
| source_files | generated_at | model | schema_version | sha256 | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
2026-04-16T12:16:13.665831+00:00 | zai-org/GLM-5-FP8 | 1 | 7ad50e5b491c81bf |
GroupTemplate Interface Module Documentation
1. Purpose
This module defines the contract layer for the Group Template subsystem within the DTS application. It provides interfaces for Views, ViewModels, and data models that manage group templates—entities that associate channels with groups and support import/export functionality. The module follows a Model-View-ViewModel (MVVM) architecture, separating presentation concerns from business logic. These interfaces enable testability and decoupling between concrete implementations and their consumers.
2. Public Interface
View Interfaces (Marker Interfaces)
| Interface | Namespace | Base | Description |
|---|---|---|---|
IGroupTemplateListView |
DTS.Common.Interface.GroupTemplate |
IBaseView |
Marker interface for list view |
IGroupTemplateExportView |
DTS.Common.Interface.GroupTemplate |
IBaseView |
Marker interface for export view |
IGroupTemplateImportView |
DTS.Common.Interface.GroupTemplate |
IBaseView |
Marker interface for import view |
ITemplateChannelListView |
DTS.Common.Interface.GroupTemplate |
IBaseView |
Marker interface for channel list view |
IGroupTemplateInfoControlView |
DataPro.Common.Interface |
IBaseView |
Marker interface for info control view |
IGroupTemplateViewModel
Namespace: DTS.Common.Interface.GroupTemplate
Base: IBaseViewModel
IGroupTemplateImportView ImportView { get; set; }
IGroupTemplateExportView ExportView { get; set; }
void Unset();
- ImportView/ExportView: Properties for accessing import/export view implementations.
- Unset(): Clears or resets the view model state. Behavior implementation-specific.
IGroupTemplateInfoControlViewModel
Namespace: DataPro.Common.Interface
Base: IBaseViewModel
IGroupTemplateInfoView View { get; }
IGroupTemplateModel SelectedGroupTemplate { get; set; }
- View: Read-only property returning the associated Shell View.
- SelectedGroupTemplate: Gets or sets the currently selected group template model.
IGroupTemplate
Namespace: DTS.Common.Interface.GroupTemplate
bool Disabled { get; set; }
string Name { get; set; }
string Description { get; set; }
string Channels { get; set; }
string AssociatedGroups { get; set; }
string LastModifiedBy { get; set; }
DateTime LastModified { get; set; }
string SerialNumber { get; set; }
bool Filter(string term);
- Disabled: Flag indicating whether the template is disabled.
- Name/Description: Template identification and documentation.
- Channels/AssociatedGroups: String representations of related entities (format unclear from interface).
- LastModifiedBy/LastModified: Audit tracking fields.
- SerialNumber: Unique identifier for the template.
- Filter(string term): Returns
trueif the template matches the search term; matching criteria implementation-specific.
IGroupTemplateListViewModel
Namespace: DTS.Common.Interface.GroupTemplate
Base: IBaseViewModel, IFilterableListView
IGroupTemplateListView View { get; set; }
void GetAllTemplates(bool bIncludeEmbedded, bool bISOMode);
void Unset();
void Sort(object o, bool columnClick);
IGroupTemplate[] Templates { get; set; }
void Filter(string term);
void MouseDoubleClick(int index);
- View: Associated list view instance.
- GetAllTemplates(bool bIncludeEmbedded, bool bISOMode): Loads templates;
bIncludeEmbeddedcontrols whether embedded templates are included,bISOModebehavior unclear from interface. - Unset(): Clears view model state.
- Sort(object o, bool columnClick): Sorts the template list;
orepresents the sort criteria,columnClickindicates sort direction toggle behavior. - Templates: Array of loaded templates.
- Filter(string term): Filters the template list by search term.
- MouseDoubleClick(int index): Handles double-click interaction on the template at the specified index.
ITemplateChannelListViewModel
Namespace: DTS.Common.Interface.GroupTemplate
Base: IBaseViewModel
ITemplateChannelListView View { get; set; }
void Unset();
void Sort(object o, bool columnClick);
void Filter(string term);
void SetAllChannels(IGroupTemplateChannel[] channels);
IGroupTemplateChannel[] GetAllChannels();
void MoveDown(IGroupTemplateChannel channel);
void MoveUp(IGroupTemplateChannel channel);
void SetParent(object o);
- View: Associated channel list view instance.
- Unset(): Clears view model state.
- Sort(object o, bool columnClick): Sorts channels; parameters same as list view model.
- Filter(string term): Filters channels by search term.
- SetAllChannels(IGroupTemplateChannel[] channels): Replaces the channel collection.
- GetAllChannels(): Returns the current channel array.
- MoveDown/MoveUp(IGroupTemplateChannel channel): Adjusts
DisplayOrderof the specified channel relative to siblings. - SetParent(object o): Associates the channel list with a parent object; type of
ounclear from interface.
IGroupTemplateChannel
Namespace: DTS.Common.Interface.GroupTemplate
bool Custom { get; }
int DisplayOrder { get; set; }
string NameOfTheChannel { get; set; }
string Name { get; }
bool Required { get; set; }
string ISOCode { get; }
bool Filter(string term);
- Custom: Read-only flag indicating whether the channel is user-defined.
- DisplayOrder: Sortable position index.
- NameOfTheChannel: Mutable channel name.
- Name: Read-only name property (relationship to
NameOfTheChannelunclear). - Required: Flag indicating whether the channel is mandatory.
- ISOCode: Read-only ISO code identifier.
- Filter(string term): Returns
trueif the channel matches the search term.
GroupTemplateChannelComparer
Namespace: DTS.Common.Interface.GroupTemplate
Base: IComparer<IGroupTemplateChannel>
GroupTemplateChannelFields SortField { get; set; }
bool Ascending { get; set; }
int Compare(IGroupTemplateChannel x, IGroupTemplateChannel y);
- SortField: Enum value from
GroupTemplateChannelFieldsdetermining sort criteria. - Ascending: Direction flag;
truefor ascending,falsefor descending. - Compare(IGroupTemplateChannel x, IGroupTemplateChannel y): Compares two channels based on
SortField. Handles nulls (null < non-null). ThrowsArgumentOutOfRangeExceptionfor unrecognizedSortFieldvalues.
ITestObjectTemplate
Namespace: DTS.Common.Interface.GroupTemplate
string TemplateName { get; set; }
string TemplateNameOrOriginalTemplateName { get; }
string Icon { get; set; }
string Description { get; set; }
bool LocalOnly { get; set; }
int Version { get; set; }
string LastModifiedBy { get; set; }
DateTime LastModified { get; set; }
int CRC32 { get; set; }
string TestObject { get; set; }
string TestObjectType { get; set; }
string TemplateParent { get; set; }
bool SysBuilt { get; set; }
string OriginalTemplateName { get; set; }
bool Embedded { get; set; }
bool IsISOMode();
- TemplateName: Identifier; may be a GUID for embedded templates.
- TemplateNameOrOriginalTemplateName: Read-only human-readable name.
- Icon/Description: UI display properties.
- LocalOnly: Restricts template to local use.
- Version: Version number (comment notes "not currently used").
- CRC32: Checksum value (comment notes "not currently used").
- TestObject/TestObjectType: ISO meta fields.
- TemplateParent: Parent template reference (usage unclear per comments).
- SysBuilt: System-generated flag.
- OriginalTemplateName: Preserved name when embedded (GUID assigned as new
TemplateName). - Embedded: Indicates whether template is embedded in a test setup.
- IsISOMode(): Returns ISO mode status; implementation-specific.
3. Invariants
-
Null Handling in Comparer:
GroupTemplateChannelComparer.Comparetreatsnullas less than any non-null value. Two nulls are equal (returns 0). -
DisplayOrder Consistency:
MoveUpandMoveDownoperations onITemplateChannelListViewModelmust maintain consistentDisplayOrdervalues across the channel collection. -
Embedded Template Naming: When
ITestObjectTemplate.Embeddedistrue,TemplateNameis expected to be a GUID, whileOriginalTemplateNamepreserves the human-readable name. -
SortField Enum Coverage:
GroupTemplateChannelComparer.ComparesupportsRequired,Name,ISOCode,Custom, andDisplayOrderfields only. Any other value throwsArgumentOutOfRangeException.
4. Dependencies
This Module Depends On:
| Dependency | Usage |
|---|---|
DTS.Common.Base |
IBaseView, IBaseViewModel base interfaces |
DataPro.Common.Base |
Alternative namespace for IBaseView, IBaseViewModel |
DTS.Common.Interface.Pagination |
IFilterableListView for list filtering |
DTS.Common.Enums.GroupTemplates |
GroupTemplateChannelFields enum for sorting |
System |
DateTime, IComparer<T>, StringComparison |
Consumers (Inferred):
Concrete implementations of Views, ViewModels, and Models in higher-level modules will implement these interfaces. Specific consumers cannot be determined from the provided source files.
5. Gotchas
-
Mixed Namespaces: The codebase uses both
DTS.Common.*andDataPro.Common.*namespaces inconsistently.IGroupTemplateInfoControlViewandIGroupTemplateInfoControlViewModeluseDataPro.Commonwhile all other interfaces useDTS.Common. This may indicate a refactoring in progress or historical naming inconsistency. -
Unused Properties:
ITestObjectTemplate.VersionandITestObjectTemplate.CRC32are explicitly documented as "not currently used" in the source comments. Implementers should be aware these may have no functional effect. -
Ambiguous Name Properties:
IGroupTemplateChannelhas bothNameOfTheChannel(read/write) andName(read-only). The relationship between these is not documented in the interface. -
Parameter Naming Convention: Methods like
GetAllTemplates(bool bIncludeEmbedded, bool bISOMode)use Hungarian notation (bprefix for booleans), which is inconsistent with modern C# conventions. -
Unknown Types: Several interfaces reference types not defined in the provided sources:
IGroupTemplateModel(referenced inIGroupTemplateInfoControlViewModel)IGroupTemplateInfoView(referenced inIGroupTemplateInfoControlViewModel)GroupTemplateChannelFieldsenum (referenced inGroupTemplateChannelComparer)
-
Channels/AssociatedGroups Format:
IGroupTemplate.ChannelsandIGroupTemplate.AssociatedGroupsare typed asstring, but the expected format (CSV, JSON, delimited) is unclear from the interface alone.