Skip to content

VSN-2052 : Implementing prepared circuits exportation via excel sheet.

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

Merge Request Overview

This merge request introduces a complete prepared circuits exportation feature, covering the full flow from service definition to REST exposure, along with proper exception handling and documentation updates. The goal is to enable a reliable and reusable export mechanism for prepared circuits while keeping the architecture consistent with existing export features.


Scope of Changes

The work included in this MR focuses on the backend service layer and API exposure, ensuring that prepared circuits can be exported in a controlled and extensible manner. The implementation follows existing design principles used across the project for export-related features.


Detailed Changes

1. Service Layer Enhancements

  • New service method signature

    • Introduced a dedicated method signature responsible for prepared circuits exportation.
    • The method clearly defines the contract for exporting prepared circuits, making the feature explicit and discoverable at the service level.
  • Service implementation

    • Implemented the previously defined exportation method.
    • The implementation handles the retrieval of prepared circuits data and applies the necessary transformation logic before export.
    • The logic is structured to allow future extensions (filters, formats, additional metadata) without impacting callers.

2. Exception Handling

  • New exception code

    • Added a dedicated exception code to represent potential failures during prepared circuits exportation.
    • This ensures consistent error reporting and avoids the use of hardcoded or ambiguous error messages.
  • Clear failure semantics

    • The exportation process now explicitly communicates export-related issues through a well-defined exception, improving debuggability and user feedback.

3. API Exposure

  • Controller endpoint
    • Exposed the prepared circuits exportation feature via a dedicated REST endpoint.
    • The controller acts as a thin layer, delegating business logic entirely to the service layer.
    • This keeps the controller focused on request mapping and response handling, in line with clean architecture principles.

4. Documentation

  • Changelog update
    • Updated the changelog markdown file to reflect the addition of the prepared circuits exportation feature.
    • Ensures traceability of changes and keeps project documentation aligned with delivered functionality.

Benefits

  • Provides a standardized way to export prepared circuits.
  • Improves code clarity by separating concerns between controller, service, and exception handling.
  • Ensures consistency with existing export features across the application.
  • Lays the groundwork for future enhancements such as format customization or advanced filtering.

Summary

This MR completes the prepared circuits exportation feature by:

  • Defining and implementing a clear service contract.
  • Introducing a dedicated exception for export-related issues.
  • Exposing the functionality via a clean REST API.
  • Keeping documentation up to date.

The implementation is robust, extensible, and aligned with the overall project architecture.

Closes VSN-2052

Rapports de requête de fusion