StyledTeamCalendar.ktTeamCalendar with CalendarStyle (color, appearance) and a visible flag. Used to decorate team calendar objects with rendering metadata for the calendar UI, without modifying the core team calendar model.StyledTeamCalendar inherits from TeamCalendar (see #862) by passing the parent's id, title, and access through the constructor. This is a Kotlin data-class-like pattern—the class is open but effectively a value wrapper.
| Property | Type | Description |
|---|---|---|
id | Long? | Inherited from TeamCalendar |
title | String? | Inherited from TeamCalendar |
access | ACCESS? | Inherited from TeamCalendar |
style | CalendarStyle? | Visual style (color etc.) for calendar rendering |
visible | Boolean | Whether the calendar is visible (default true) |
map()fun map(calendars: List<TeamCalendar>, styleMap: CalendarStyleMap): List<StyledTeamCalendar>
Takes a list of TeamCalendar objects and a CalendarStyleMap keyed by calendar ID. Produces a corresponding list of StyledTeamCalendar instances, each decorated with its style from the map. Uses calendars.find { it.id == cal.id } to look up the matching source calendar for each entry.
The separation into TeamCalendar (pure data) and StyledTeamCalendar (decorated with UI metadata) follows a clean decorator pattern. The base TeamCalendar class remains unaware of rendering concerns. The CalendarStyleMap lookup is applied in a batch via the companion map function, keeping the transformation logic centralized.
868d6abb7 2025 -> 2026 63081666f Source file headers: 2024-> 2025. b6092df09 Copyright 2023 -> 2024 ab45d51fa Copyright 2001-2022 -> 2001-2023. 5f7ef41b8 Copyright 2021 -> 2022 ceb63e8a1 Source code header: (C) 2001-2021. 7c79f1922 Copyright of source header -> 2020. d3a178833 Wrong substitution of "calendar" -> "datetime" while refactoring, reverted commit from 12.12.2019. 8a009b006 StyledTeamCalendar initializes now also access right. 05244ff19 CopyRight of all Kotlin file-header updated or created. 46f71e71a WIP CalendarFilter: moved to business module.