Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat (Core): ImportUtil refactor to improve responses - second part #31294

Merged

Conversation

jgambarios
Copy link
Contributor

@jgambarios jgambarios commented Feb 1, 2025

This PR is the second step in a larger effort to improve error handling and response structures in the ImportUtil class. For this phase, we focused specifically on line processing without modifying the existing core logic.

Changes Overview

  • Added new structured validation response classes for better error handling
  • Introduced LineImportResult to encapsulate the import line results
  • Created converter to maintain backward compatibility with existing code
  • Improved line importing validation code organization and readability
  • Added comprehensive JavaDoc documentation

What's Not Included

While working on this code, we identified several potential improvements that were intentionally left for future iterations:

  • Core import logic remains unchanged
  • Legacy response format is still maintained for backward compatibility
  • Existing error handling in other parts of the import process
  • Performance optimizations opportunities
  • Potential refactoring of data structures and helper classes

This PR is related to: #31237

This PR fixes: #30882

@jgambarios jgambarios changed the title Issue 30882 import improve error formats in json responses part2 Feat (Core): ImportUtil refactor to improve responses - second part. Feb 1, 2025
@jgambarios jgambarios changed the title Feat (Core): ImportUtil refactor to improve responses - second part. Feat (Core): ImportUtil refactor to improve responses - second part Feb 1, 2025
@jgambarios jgambarios marked this pull request as ready for review February 7, 2025 18:54
Copy link
Contributor

@fabrizzio-dotCMS fabrizzio-dotCMS left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This utils class is so freaking Giantic that could even have its own ImportUtilUtils 😬
Kust kidding I know it legacy code getting updated. Great Job. Just added some nitpicks

@jgambarios jgambarios added this pull request to the merge queue Feb 10, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Feb 10, 2025
@jgambarios jgambarios added this pull request to the merge queue Feb 10, 2025
Merged via the queue into main with commit d35d18e Feb 10, 2025
36 checks passed
@jgambarios jgambarios deleted the issue-30882-Import-Improve-Error-Formats-in-JSON-Responses-part2 branch February 10, 2025 23:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants