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

#27979 New lang vars endpoint and findAllVariables methods #28429

Merged
merged 31 commits into from
May 13, 2024

Conversation

fabrizzio-dotCMS
Copy link
Contributor

@fabrizzio-dotCMS fabrizzio-dotCMS commented May 3, 2024

Proposed Changes

  • The main goal of this PR is to introduce the new methods that will be used to replace the old Language Keys stored as property files
  • These methods have been added to LanguageVariableAPI
  • The new methods are designed to simply return the LanguageVariables no user or permission is contemplated here.
  • Even though there were a few other methods here designed to return KeyValue objects these have a problem with being index dependant
  • These LanguageVariables are cached using the same LanguageCache but a separate group. All the Language Variables are cached per language. so if we update or unpublish a LanguageVariable let's say (and cache invalidation is needed) This will not affect other LanguageVaribales of a different language living cache.
  • A new Endpoint for retrieving LanguageVariables has been added.
  • The respective postman test was added too.
  • Changes were made to ESContentletAPIImpl so the respective cache invalidation can be accomplished.
  • Several issues were outlined on ESContentletAPIImpl by sonar so they were corrected.

@fabrizzio-dotCMS fabrizzio-dotCMS changed the title #27979 #27979 New lang vars endpoint and findAllVariables methods May 8, 2024
@fabrizzio-dotCMS fabrizzio-dotCMS marked this pull request as ready for review May 10, 2024 03:27
Copy link
Contributor

@spbolton spbolton left a comment

Choose a reason for hiding this comment

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

Could you reslove the 8 new issues showing in Sonarqubue mostly repeated contestants and assert parameters the wrong way around.
they should also show in IntelliJ if you have sonar lint enabled,
and pulling out the repeated strings should be easy if you right click and use the IntellJ Refactor -> Introduce Constant option. https://sonarqube.dotcms.site/project/issues?id=dotCMS_core_AYSbIemxK43eThAXTlt-&pullRequest=28429&resolved=false

@fabrizzio-dotCMS
Copy link
Contributor Author

Could you reslove the 8 new issues showing in Sonarqubue mostly repeated contestants and assert parameters the wrong way around. they should also show in IntelliJ if you have sonar lint enabled, and pulling out the repeated strings should be easy if you right click and use the IntellJ Refactor -> Introduce Constant option. https://sonarqube.dotcms.site/project/issues?id=dotCMS_core_AYSbIemxK43eThAXTlt-&pullRequest=28429&resolved=false

done @spbolton

@fabrizzio-dotCMS fabrizzio-dotCMS dismissed spbolton’s stale review May 13, 2024 20:15

Talked to Steve. He is aware that modifying EContentletAPIImpl to apply soanr feedback always makes sonrar detect more problems and request more changes

@fabrizzio-dotCMS fabrizzio-dotCMS added this pull request to the merge queue May 13, 2024
Merged via the queue into master with commit 20fddd8 May 13, 2024
26 checks passed
@fabrizzio-dotCMS fabrizzio-dotCMS deleted the issue-27979-lang-vars-backend-take-2 branch May 13, 2024 21:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: No status
Development

Successfully merging this pull request may close these issues.

Write an endpoint to retrieve the data needed by the new LanguageVariables screen
4 participants