Skip to content

VSN-2006 : Initial overview, Exportation of Dynamic excel sheet related to activated prepared passengers.

yassine.elazami a demandé de fusionner VSN-2006 vers develop

Feature: Exportation of Validated Prepared Passengers

This Merge Request introduces the full backend support for exporting validated prepared passengers, including POI integration, domain enhancements, service implementations, controller exposure, and exception handling improvements.


Overview

The objective of this MR is to:

  • Enable exporting only validated prepared passengers.
  • Introduce missing infrastructure (POI dependency, repository method, service layer, controller endpoint).
  • Improve the exception-handling mechanism by using centralized exception codes.
  • Refactor the exportation method signature to prevent duplicated logic in the controller layer.

This update completes the functional cycle related to exporting activated (validated) prepared passengers and exposes the new feature through the REST API.


Technical Changes

1. Dependencies

  • POI dependency added to pom.xml
    Enables Excel file generation and control.

2. Repository Layer

  • New repository method for retrieving validated prepared passengers:
    • Ensures that the exportation service receives only the relevant subset of passengers.

3. Service Layer

  • New method signature defined for exporting validated passengers.
  • Service implementation added, including:
    • Fetching validated passengers.
    • Triggering export file construction.
    • Applying exception cases when exportation is triggered with invalid conditions.

4. Exception Management

  • Introduction of new exception code related to exporting activated prepared passengers.
  • Replacement of hardcoded messages with reusable exception keys.

5. Refactoring

  • Exportation method signature updated to simplify controller logic.
  • Logic adjustments to align with new service and exception mechanisms.

6. Controller Layer

  • New endpoint added for exporting validated passengers.
  • Feature fully exposed through REST controller.

7. Documentation

  • Changelog updated reflecting the new feature and associated changes.

Summary

This MR completes the exportation workflow for validated prepared passengers by:

  • Integrating Apache POI.
  • Fetching and processing validated entries.
  • Implementing exportation logic at service level.
  • Providing an external API endpoint.
  • Strengthening exception management.
  • Cleaning and improving existing export-related code paths.

The system is now fully capable of generating controlled export files containing only validated prepared passengers.

Closes VSN-2006

Rapports de requête de fusion