feat(transcription): person @mention sidecar + rename propagation (PR-A backend, #362) #366
@@ -0,0 +1,23 @@
|
|||||||
|
package org.raddatz.familienarchiv.model;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Published by PersonService when a save changes Person.getDisplayName() — i.e.
|
||||||
|
* any mutation to the fields that DisplayNameFormatter consumes (title,
|
||||||
|
* firstName, lastName). Listeners on the transcription side rewrite block text
|
||||||
|
* and sidecar entries that reference the old name.
|
||||||
|
*
|
||||||
|
* <p>This is the first custom application event in the codebase. The previous
|
||||||
|
* only listener (OcrTrainingService.recoverOrphanedRuns) listens to Spring's
|
||||||
|
* built-in ApplicationReadyEvent. Future cross-domain decoupling should follow
|
||||||
|
* the same shape: record-typed event in model/, listener in the consuming
|
||||||
|
* domain's service/ package, synchronous @EventListener inside the publisher's
|
||||||
|
* transaction unless the workload genuinely needs to defer.
|
||||||
|
*/
|
||||||
|
public record PersonDisplayNameChangedEvent(
|
||||||
|
UUID personId,
|
||||||
|
String oldDisplayName,
|
||||||
|
String newDisplayName
|
||||||
|
) {
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user