-
Notifications
You must be signed in to change notification settings - Fork 468
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 #31407
Merged
jgambarios
merged 12 commits into
main
from
issue-31339-Migrate-ImportContentletsProcessor-to-Use-New-Import-Result-Format-While-Maintaining-Legacy-Support
Feb 20, 2025
Merged
Feat (Core): ImportUtil refactor to improve responses #31407
jgambarios
merged 12 commits into
main
from
issue-31339-Migrate-ImportContentletsProcessor-to-Use-New-Import-Result-Format-While-Maintaining-Legacy-Support
Feb 20, 2025
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Updated import-related classes to enhance JSON serialization/deserialization, removed unused enums, added new validation codes, and streamlined legacy format conversion in `ImportResultConverter`. These changes improve code maintainability and align with new API requirements.
…mportContentletsProcessor-to-Use-New-Import-Result-Format-While-Maintaining-Legacy-Support
Please use a Conventional Commit title format for this PR. For more information, see https://www.conventionalcommits.org/en/v1.0.0/ |
6 tasks
Introduced a boolean parameter to determine whether counters should be updated in the parseLineResults method, ensuring flexibility for error handling scenarios. Removed redundant @NotNull annotations to simplify code. These changes improve clarity and functionality of the import utility.
This update introduces logic to track the last inode during imports and makes it accessible as an optional value. Adjustments include storing, retrieving, and converting the last inode to maintain consistency across processes. This enhances import result tracking and improves data handling.
Adjusted validation parameters to align with updated requirements and fixed assertion to correctly reflect the expected error count. This ensures tests accurately validate warnings and errors, improving code reliability.
jdotcms
reviewed
Feb 18, 2025
dotCMS/src/main/java/com/dotcms/jobs/business/processor/impl/ImportContentletsProcessor.java
Show resolved
Hide resolved
jdotcms
reviewed
Feb 18, 2025
dotCMS/src/main/java/com/dotcms/jobs/business/processor/impl/ImportContentletsProcessor.java
Show resolved
Hide resolved
jdotcms
reviewed
Feb 18, 2025
dotCMS/src/main/java/com/dotcms/jobs/business/util/JobUtil.java
Outdated
Show resolved
Hide resolved
jdotcms
reviewed
Feb 18, 2025
jdotcms
reviewed
Feb 18, 2025
jdotcms
reviewed
Feb 18, 2025
jdotcms
reviewed
Feb 18, 2025
jdotcms
reviewed
Feb 18, 2025
dotCMS/src/main/java/com/dotmarketing/util/importer/ImportResultConverter.java
Show resolved
Hide resolved
Replaced JSONObject-based map transformation with ObjectMapper for better consistency and reduced dependency. Simplified `transformToMap` method implementation and updated the documentation accordingly. Additionally, minor code formatting improvements were made in ImportContentletsProcessor.
…mportContentletsProcessor-to-Use-New-Import-Result-Format-While-Maintaining-Legacy-Support
Replaced manual iteration and filtering with stream-based processing to retrieve unique fields. This improves readability and maintains the same functionality with cleaner code.
…mportContentletsProcessor-to-Use-New-Import-Result-Format-While-Maintaining-Legacy-Support
fabrizzio-dotCMS
approved these changes
Feb 20, 2025
dotCMS/src/main/java/com/dotmarketing/util/importer/ImportResultConverter.java
Show resolved
Hide resolved
nollymar
approved these changes
Feb 20, 2025
Replaced repetitive calls to 'result.data()' with the 'data' variable to improve code readability and maintainability. This change reduces redundancy and ensures consistent access to the processed data throughout the affected methods.
…mportContentletsProcessor-to-Use-New-Import-Result-Format-While-Maintaining-Legacy-Support
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR represents the final stage of the Import Content response improvements, where the
ImportContentletsProcessor
now leverages the new structured response format while maintaining full backward compatibility with existing Struts implementations.Changes Overview
ImportContentletsProcessor
to use new response formatWhat's Not Changed
We intentionally kept several aspects unchanged to ensure stability:
While working on this code, we identified several potential improvements that were intentionally left for future iterations to keep the scope focused on the immediate needs.
This PR is related to: #30882
This PR fixes: #31339
This PR fixes: #31339