chore(java): consolidate mss-failsafe to single canonical copy

Replace the stale multi-module java/mss-failsafe skeleton (old user-management
prototype) with the active single-module machine-safety inspection app that was
living in its own standalone repo at the repo root.

- Remove old java/mss-failsafe/ multi-module tree (mss, userdata, userManagement,
  mssfailsafe.datalayer, mssfailsafeWeblayer) incl. committed build artifacts
- Add the active app (PrimeFaces 11 / JSF 2.3 / Hibernate 5.6 / iText / POI)
  flattened into java/mss-failsafe/ as the only mss-failsafe in git
- Working tree captured = master tip 2a142b5 + in-progress uncommitted work
  (incl. .github/*.instructions.md AI-context files)
- Archive the standalone repo's 33-commit history in GIT_HISTORY_ARCHIVE.md
  since its .git was not migrated

This is the source of truth / base for the upcoming upgraded rewrite.
This commit is contained in:
Patrick Plate
2026-06-13 19:55:28 +02:00
parent 7a573d7193
commit 1a0a56a626
504 changed files with 37052 additions and 7758 deletions
+46
View File
@@ -0,0 +1,46 @@
# PDF Generation Instructions
Aktualisiert: 2025-10-20
## Kontext
PDF-Erstellung erfolgt aktuell über Hilfsmethoden in `AbstractController` mittels iText7.
## Kern-Hilfsmethoden
- `loadCompanyLogo()` -> Lädt Logo aus LOGO_PATH.
- `generateSorroundingTable(String header, float maxWidth)` -> Einspaltige Rahmen-Tabelle mit Header.
- `generateInnerTable(Text header, boolean last, String... values)` -> 2-Spalten Tabelle mit alternierender Hintergrundfarbe.
- `generateInnerTable(Text header, int nrColumns, boolean last, String... values)` -> Generisch n-Spalten Tabelle.
- `addInnerCells(Table table, String name, String value, boolean isGray)` / Overload -> Fügt Datenzeilen hinzu.
- `addPagenumbers(Document document, String ticketNr, Image nextPagesCompanyLogo)` -> Fügt Seitenzahlen & Logo hinzu.
## Gestaltungsrichtlinien
- Fonts: Standard Helvetica / Bold (Konstanten `FONT_NORMAL`, `FONT_BOLD`).
- Schriftgrößen klein (8F Inhalte, 11F Header, 12F Hauptheader) für konsistente Layouts.
- Wechselnde Hintergrundfarbe (LIGHT_GRAY) zur besseren Lesbarkeit.
## Erweiterung
Neue Tabellen-/Layout-Funktionen:
1. Prüfen ob existierende Methoden erweiterbar statt neue Variante.
2. Konsistenz in Font & Spaltenbreiten wahren.
3. Kein Hardcode von absoluten Positionen außer bei Kopf-/Fußzeilen.
## Ressourcen Pfade
- LOGO_PATH statisch: `/rundata/logo.png`. Anpassungen zentral vornehmen.
## Fehlerhandhabung
- Aktuell wenige try/catch Blöcke; bei Erweiterung: Fehler loggen (`LOGGER.error(e)`) und Benutzer über Controller Messages informieren.
## Edge Cases
- Leere Werte -> `-/-` Platzhalter.
- Null Tabelleninstanz in addInnerCells -> early return.
## Verbesserungen
- Einführung eines PDFUtility Service zur Entkopplung vom Controller.
- Parameterobjekt für dynamische Tabellenkonfiguration (Spaltenbreiten, Farben, Größen).
## Generator Leitplanken
- iText7 API weiterverwenden; keine neuen PDF Libraries.
- Wiederverwendbare Logik nicht direkt im konkreten Controller implementieren -> Utility / Service.
---