Skip to content

feature/api-v2#685

Closed
psmagin wants to merge 17 commits into
masterfrom
feature/api-v2
Closed

feature/api-v2#685
psmagin wants to merge 17 commits into
masterfrom
feature/api-v2

Conversation

@psmagin

@psmagin psmagin commented Jun 19, 2026

Copy link
Copy Markdown
Collaborator

Purpose

Describe the purpose of this pull request. Why is this change necessary? What problem does it solve?

Approach

How does this change fulfill the purpose? Provide a high-level overview of the technical approach taken to address the problem.

Changes Checklist

  • API Changes: Document any API paths, methods, request or response bodies changed, added, or removed.
  • Database Schema Changes: Indicate any database schema changes and their impact. Confirm that migration scripts were created.
  • Interface Version Changes: Indicate any changes to interface versions.
  • Interface Dependencies: Document added or removed dependencies.
  • Permissions: Document any changes to permissions.
  • Logging: Confirm that logging is appropriately handled.
  • Unit Testing: Confirm that changed classes were covered by unit tests.
  • Integration Testing: Confirm that changed logic was covered by integration tests.
  • Manual Testing: Confirm that changes were tested on local or dev environment.
  • NEWS: Confirm that the NEWS file is updated with relevant information about the changes made in this pull request.

Related Issues

List any Jira issues related to this pull request.

Learning and Resources (if applicable)

Discuss any research conducted during the development of this pull request. Include links to relevant blog posts, patterns, libraries, or addons that were used to solve the problem.

Screenshots (if applicable)

If this pull request involves any visual changes or new features, consider including screenshots or GIFs to illustrate the changes.

psmagin and others added 17 commits June 14, 2026 09:59
- Extract validation into FilterValidators with strategy pattern per RecordType (OCP)
- Move TagFilter/AccessTypeFilter creation to static from() factory methods (SRP)
- Consolidate duplicate validatePackageFilterType/validateTitleFilterType into
  single parameterized validateFilterType method (DRY)
- Rename type-converting getters to explicit resolve*/parse* methods, letting
  Lombok generate raw-value getters for clean separation
- Filter is now a focused data holder with only its own state accessors

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…tions

- Filter is now a sealed interface with ProviderFilter, PackageRecordFilter,
  ResourceFilter, and TitleFilter implementations
- Each type carries only its relevant fields (ISP compliance)
- Validation is self-contained per type via FilterValidators
- TagFilter.from() and AccessTypeFilter.from() use pattern matching on
  sealed types instead of RecordType switches
- Removed dead code: prepareFilterForPackage(), prepareFilterForResource(),
  getSortableFilter(), getPackageFilter() helper methods
- Removed FilterValidator strategy interface (no longer needed)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@sonarqubecloud

Copy link
Copy Markdown

@psmagin psmagin closed this Jun 26, 2026
@psmagin psmagin deleted the feature/api-v2 branch June 26, 2026 11:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant