11 KiB
11 KiB
source_files, generated_at, model, schema_version, sha256
| source_files | generated_at | model | schema_version | sha256 | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
2026-04-16T03:01:39.419615+00:00 | Qwen/Qwen3-Coder-Next-FP8 | 1 | 82ebb4dd66e3412f |
GroupTemplate Module Documentation
1. Purpose
This module defines the interface contracts for the Group Template feature within the DTS system, providing abstractions for data models, view models, and views related to group templates, their channels, and associated operations (import/export, list views, info controls). It serves as a contract layer decoupling UI presentation from business logic and data persistence, enabling modular implementation and testability of group template functionality. The interfaces collectively support template management workflows including listing, filtering, sorting, channel configuration, and import/export operations.
2. Public Interface
Interfaces (GroupTemplate namespace unless otherwise noted)
IGroupTemplate
- Properties:
bool Disabled { get; set; }– Whether the template is disabled.string Name { get; set; }– Template name.string Description { get; set; }– Human-readable description.string Channels { get; set; }– Serialized representation of channels (likely JSON or CSV).string AssociatedGroups { get; set; }– Serialized list of associated group IDs/names.string LastModifiedBy { get; set; }– User who last modified the template.DateTime LastModified { get; set; }– Timestamp of last modification.string SerialNumber { get; set; }– Unique serial number identifier.
- Methods:
bool Filter(string term)– Returnstrueif the template matches the given search term.
IGroupTemplateChannel
- Properties:
bool Custom { get; }– Whether the channel is user-defined (custom) vs. system-defined.int DisplayOrder { get; set; }– Order in which the channel is displayed.string NameOfTheChannel { get; set; }– Display name of the channel.string Name { get; }– Internal name/key of the channel.bool Required { get; set; }– Whether the channel is required.string ISOCode { get; }– ISO standard code associated with the channel.
- Methods:
bool Filter(string term)– Returnstrueif the channel matches the given search term.
- Nested Type:
GroupTemplateChannelComparer : IComparer<IGroupTemplateChannel>– Implements comparison logic for sorting channels. UsesGroupTemplateChannelFieldsenum (imported fromDTS.Common.Enums.GroupTemplates) to determine sort field (Required,Name,ISOCode,Custom,DisplayOrder). Supports ascending/descending viaAscendingproperty.
ITestObjectTemplate
- Properties:
string TemplateName { get; set; }– Template identifier (may be GUID for embedded templates).string TemplateNameOrOriginalTemplateName { get; }– Human-readable name (original name for embedded templates;TemplateNameotherwise).string Icon { get; set; }– Icon identifier/path.string Description { get; set; }– Template description.bool LocalOnly { get; set; }– Whether the template is local-only (not shared).int Version { get; set; }– Template version (not currently used per comments).string LastModifiedBy { get; set; }– Last modifier.DateTime LastModified { get; set; }– Last modification timestamp.int CRC32 { get; set; }– CRC32 checksum (not currently used).string TestObject { get; set; }– ISO meta-field for test object.string TestObjectType { get; set; }– ISO meta-field for test object type.string TemplateParent { get; set; }– Parent template name (for composite templates; legacy).bool SysBuilt { get; set; }– Whether the template is system-built (uncertain usage).string OriginalTemplateName { get; set; }– Original name for embedded templates.bool Embedded { get; set; }– Whether the template is embedded in a test setup.
- Methods:
bool IsISOMode()– Indicates whether the template is in ISO mode.
IGroupTemplateListView
- Inherits
IBaseView. No additional members.
IGroupTemplateExportView
- Inherits
IBaseView. No additional members.
IGroupTemplateImportView
- Inherits
IBaseView. No additional members.
ITemplateChannelListView
- Inherits
IBaseView. No additional members.
IGroupTemplateInfoControlView
- Inherits
IBaseView. No additional members.
Note: Defined inDataPro.Common.Interfacenamespace, notDTS.Common.Interface.GroupTemplate.
View Models
IGroupTemplateViewModel
- Namespace:
DTS.Common.Interface.GroupTemplate - Inherits:
IBaseViewModel - Properties:
IGroupTemplateImportView ImportView { get; set; }– View for import functionality.IGroupTemplateExportView ExportView { get; set; }– View for export functionality.
- Methods:
void Unset()– Releases resources or clears state.
IGroupTemplateInfoControlViewModel
- Namespace:
DataPro.Common.Interface - Inherits:
IBaseViewModel - Properties:
IGroupTemplateInfoView View { get; }– Note:IGroupTemplateInfoViewis referenced but not defined in the provided source files.IGroupTemplate SelectedGroupTemplate { get; set; }– Currently selected group template.
IGroupTemplateListViewModel
- Namespace:
DTS.Common.Interface.GroupTemplate - Inherits:
IBaseViewModel,IFilterableListView - Properties:
IGroupTemplateListView View { get; set; }IGroupTemplate[] Templates { get; set; }– Array of templates.
- Methods:
void GetAllTemplates(bool bIncludeEmbedded, bool bISOMode)– Loads templates; parameters control inclusion of embedded templates and ISO mode.void Unset()– Releases resources.void Sort(object o, bool columnClick)– Sorts templates (likely by column header interaction).void Filter(string term)– Filters templates viaIGroupTemplate.Filter(term).
ITemplateChannelListViewModel
- Namespace:
DTS.Common.Interface.GroupTemplate - Inherits:
IBaseViewModel - Properties:
ITemplateChannelListView View { get; set; }
- Methods:
void Unset()– Releases resources.void Sort(object o, bool columnClick)– Sorts channels.void Filter(string term)– Filters channels viaIGroupTemplateChannel.Filter(term).void SetAllChannels(IGroupTemplateChannel[] channels)– Sets the full channel list.IGroupTemplateChannel[] GetAllChannels()– Returns current channel list.void MoveDown(IGroupTemplateChannel channel)– DecreasesDisplayOrderof the channel.void MoveUp(IGroupTemplateChannel channel)– IncreasesDisplayOrderof the channel.void SetParent(object o)– Sets parent context (type unclear;objectsuggests loosely-typed parent reference).
3. Invariants
- All view interfaces (
IGroupTemplateListView,IGroupTemplateExportView, etc.) inheritIBaseViewand contain no additional members—view implementations must conform toIBaseViewcontract. - All view model interfaces inherit
IBaseViewModel(orIBaseViewModelviaIFilterableListView). IGroupTemplateandIGroupTemplateChannelboth implementFilter(string term)for UI-driven search.IGroupTemplateListViewModel.Templatesis an array ofIGroupTemplate, andITemplateChannelListViewModeloperates onIGroupTemplateChannel[].GroupTemplateChannelComparerrequiresSortFieldto be one of the definedGroupTemplateChannelFieldsvalues; otherwise,ArgumentOutOfRangeExceptionis thrown.ITestObjectTemplate.OriginalTemplateNameis only meaningful whenEmbeddedistrue.ITestObjectTemplate.TemplateNamemay be a GUID for embedded templates, whileTemplateNameOrOriginalTemplateNameprovides a user-friendly name.
4. Dependencies
Dependencies of this module:
DTS.Common.Base– ProvidesIBaseViewandIBaseViewModelbase interfaces.DataPro.Common.Base– Used byIGroupTemplateInfoControlViewandIGroupTemplateInfoControlViewModel.DTS.Common.Interface.Pagination–IGroupTemplateListViewModelimplementsIFilterableListView(from this namespace).DTS.Common.Enums.GroupTemplates–GroupTemplateChannelComparerusesGroupTemplateChannelFieldsenum.
Dependencies on this module:
- UI layers (e.g., WPF/WinForms) likely consume the view interfaces (
IGroupTemplateListView, etc.). - Business logic layers likely implement view models (
IGroupTemplateListViewModel,ITemplateChannelListViewModel, etc.). - Data persistence layers likely implement
IGroupTemplateandITestObjectTemplate.
5. Gotchas
- Namespace inconsistency:
IGroupTemplateInfoControlViewandIGroupTemplateInfoControlViewModelreside inDataPro.Common.Interface, notDTS.Common.Interface.GroupTemplate. This may indicate cross-namespace coupling or legacy naming. - Missing view definition:
IGroupTemplateInfoControlViewModelreferencesIGroupTemplateInfoView, which is not defined in the provided source files. - Unclear
objectparameters: Methods likeSort(object o, bool columnClick),SetParent(object o), andGetAllTemplates(bool bIncludeEmbedded, bool bISOMode)useobjector unclear boolean flags—implementation details are not evident from interfaces alone. - Unused fields:
ITestObjectTemplate.Version,CRC32, andTemplateParentare explicitly marked as unused or legacy in comments. - Serialization ambiguity:
IGroupTemplate.ChannelsandIGroupTemplate.AssociatedGroupsstore serialized data (type/format unspecified). - ISO mode ambiguity:
IsISOMode()andbISOModeparameter suggest dual-mode behavior, but the distinction is not defined in these interfaces. - No
IGroupTemplateInfoViewdefinition: Critical forIGroupTemplateInfoControlViewModelbut absent from source.