VacationSendMailService.ktVacationSendMailService is a @Service that wires together ConfigurationService (mail server config, HR e-mail address), EmployeeDao (employee/user lookups), and SendMail (mail infrastructure). It is invoked exclusively from VacationDao's after* lifecycle hooks.
checkAndSendMail(obj, operationType, dbObj) — Entry point. Checks mail server is configured, builds a VacationInfo holder.ThreadLocalUserContext.loggedInUserId).The prepareMail() method creates a Mail object with HTML content rendered from the mail/vacationMail.html Groovy template. The template receives a map containing:
vacationInfo — VacationInfo inner class with all resolved user names, e-mails, formatted dates, and working daysvacation — the raw VacationDO objectmailInfo — subject, operation type (insert/update/delete/undelete), and mode (own/manager/replacement/HR)This data holder resolves all employee references (vacationer, manager, replacement, otherReplacements) to PFUserDO objects and formats dates, working days, half-day flags, and special status. The updateI18n(recipient) method re-resolves user-visible strings for the recipient's locale, enabling localized e-mail delivery to recipients in different language settings.
The companion object lazily builds a link to the vacation edit page via SendMail.buildUrl() combined with MenuItemDefId.VACATION.url, producing deep links like /vacation/edit/123?returnToCaller=account.
Mail sending is separated from the DAO to keep persistence concerns isolated. The service uses VacationInfo as an intermediate data class rather than passing the entity directly to templates — this ensures templates never access lazy-loaded JPA proxies (which would fail outside a transaction). The updateI18n method supports the multi-locale requirement of a German company with international employees. The HR notification path for special vacations ensures compliance monitoring even when employees and managers are the same person.
868d6abb7 2025 -> 2026
600951ee0 2025 -> 2026
b131193e7 Member variables refactored by using by lazy {}...
d5cc73eb6 Member variables refactored by using by lazy {}...
63081666f Source file headers: 2024-> 2025.
199c26801 Source file headers: 2024-> 2025.
e1db80611 Hotfix: com.sun.mail added.
0a78bc22c Hotfix: com.sun.mail added.
1b50060c3 BaseDao: renamed get->find, save->insert, getList->select, load->select
514533e99 BaseDao: renamed get->find, save->insert, getList->select, load->select
87aaf6a5a Migration stuff: BaseDao refactored...
41217b065 Migration stuff: BaseDao refactored...
67805f2fc ThreadLocalUserContext.user -> loggedInUser
58ffda82b ThreadLocalUserContext.user -> loggedInUser
4c04cfd65 MAJOR-CHANGE! Migration of integer id's to Long id's.
fd13c259a MAJOR-CHANGE! Migration of integer id's to Long id's.
06828f490 Migration stuff in progress...
4b3872a1b Migration stuff in progress...
b6092df09 Copyright 2023 -> 2024
9a0609dd1 Copyright 2023 -> 2024