-
Notifications
You must be signed in to change notification settings - Fork 94
apim-11694-list-navigation-items-use-case #13884
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
Conversation
Summary of ChangesHello @dev-marek, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request significantly refactors the management and retrieval of portal navigation items. It introduces a more robust and flexible architecture by centralizing navigation item queries into a dedicated service and use case, while also enhancing the domain models for better type safety and hierarchical representation. The changes aim to improve the maintainability and extensibility of the portal's navigation system. Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review
This pull request introduces a use case for listing portal navigation items, along with significant refactoring of the PortalNavigationItem model and its corresponding repository. The changes are generally positive, making good use of modern Java features like sealed classes. However, there are several areas for improvement. The new query service implementation has performance issues due to in-memory filtering instead of leveraging database queries, which could be problematic at scale. Additionally, the adapter for converting between repository and domain models could be made more robust and efficient. My review includes specific suggestions to address these points.
.../io/gravitee/apim/infra/query_service/portal_page/PortalNavigationItemsQueryServiceImpl.java
Outdated
Show resolved
Hide resolved
.../io/gravitee/apim/infra/query_service/portal_page/PortalNavigationItemsQueryServiceImpl.java
Outdated
Show resolved
Hide resolved
...c/main/java/io/gravitee/apim/core/portal_page/use_case/ListPortalNavigationItemsUseCase.java
Outdated
Show resolved
Hide resolved
...st-api-service/src/main/java/io/gravitee/apim/infra/adapter/PortalNavigationItemAdapter.java
Outdated
Show resolved
Hide resolved
...st-api-service/src/main/java/io/gravitee/apim/infra/adapter/PortalNavigationItemAdapter.java
Outdated
Show resolved
Hide resolved
b84abed to
4e8cc18
Compare
7e007de to
ce2b64f
Compare
ff50840 to
722364f
Compare
ddbecfe to
883209d
Compare
...c/main/java/io/gravitee/apim/core/portal_page/use_case/ListPortalNavigationItemsUseCase.java
Outdated
Show resolved
Hide resolved
...st-api-service/src/main/java/io/gravitee/apim/infra/adapter/PortalNavigationItemAdapter.java
Outdated
Show resolved
Hide resolved
...st-api-service/src/main/java/io/gravitee/apim/infra/adapter/PortalNavigationItemAdapter.java
Outdated
Show resolved
Hide resolved
...-api-service/src/main/java/io/gravitee/apim/core/portal_page/model/PortalNavigationPage.java
Outdated
Show resolved
Hide resolved
...st-api-service/src/main/java/io/gravitee/apim/infra/adapter/PortalNavigationItemAdapter.java
Outdated
Show resolved
Hide resolved
...src/main/java/io/gravitee/repository/jdbc/management/JdbcPortalNavigationItemRepository.java
Outdated
Show resolved
Hide resolved
...src/main/java/io/gravitee/repository/jdbc/management/JdbcPortalNavigationItemRepository.java
Show resolved
Hide resolved
...ry/mongodb/management/internal/portalnavigationitem/PortalNavigationItemMongoRepository.java
Outdated
Show resolved
Hide resolved
...ry/mongodb/management/internal/portalnavigationitem/PortalNavigationItemMongoRepository.java
Show resolved
Hide resolved
...-api/src/main/java/io/gravitee/repository/management/api/PortalNavigationItemRepository.java
Show resolved
Hide resolved
645e29d to
8fb1838
Compare
phiz71
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Last few comments
...c/main/java/io/gravitee/apim/core/portal_page/use_case/ListPortalNavigationItemsUseCase.java
Outdated
Show resolved
Hide resolved
...st-api-service/src/main/java/io/gravitee/apim/infra/adapter/PortalNavigationItemAdapter.java
Outdated
Show resolved
Hide resolved
...st-api-service/src/main/java/io/gravitee/apim/infra/adapter/PortalNavigationItemAdapter.java
Outdated
Show resolved
Hide resolved
...st-api-service/src/main/java/io/gravitee/apim/infra/adapter/PortalNavigationItemAdapter.java
Outdated
Show resolved
Hide resolved
...-api/src/main/java/io/gravitee/repository/management/api/PortalNavigationItemRepository.java
Show resolved
Hide resolved
…a and environment ID
…figuration for tests
…lder, page, and link types
…d repository and add exception handling tests
e947352 to
90087ee
Compare
...epository-test/src/test/resources/data/portalnavigationitem-tests/portalNavigationItems.json
Outdated
Show resolved
Hide resolved
90087ee to
6100887
Compare
Issue
https://gravitee.atlassian.net/browse/APIM-11694
Description
Get Homepage Navigation Items
GET {{baseUrl}}management/v2/environments/DEFAULT/portal-navigation-items?area=HOMEPAGE&loadChildren=true
Authorization: {{token}}
Additional context