Skip to content

[Backport 4.2.x] Map viewer / WFS filter / remove unused SLD API endpoints#9344

Merged
josegar74 merged 2 commits into
geonetwork:4.2.xfrom
GeoCat:backport-test-4.2.x
Jun 18, 2026
Merged

[Backport 4.2.x] Map viewer / WFS filter / remove unused SLD API endpoints#9344
josegar74 merged 2 commits into
geonetwork:4.2.xfrom
GeoCat:backport-test-4.2.x

Conversation

@juanluisrp

Copy link
Copy Markdown
Contributor

Backport of #9343 to the 4.2.x branch.

Summary

  • Remove 5 dead SLD endpoints (generateSLD, getSLD, buildSLD, updateSLD, deleteSLD) from SldApi; keep only POST /filter
  • Delete TextFile JPA entity and TextFileRepository (backed the now-removed SLD storage)
  • Remove stale SLD security mapping entries from config-security-mapping.xml
  • Simplify frontend WFS filter service to always use the WMS FILTER parameter instead of SLD/SLD_BODY
  • Add DB migration (v4217) to drop the unused files table and sequence

Conflict resolution vs main

  • SldApi.java: uses org.opengis.filter.Filter (4.2.x GeoTools API) instead of org.geotools.api.filter.Filter
  • config-security-mapping.xml: preserves the Datahub entries present only in 4.2.x
  • SLDUtilTest.java: deleted (tests covered removed methods)
  • Migration placed in v4217/ instead of v4412/

Test plan

  • Verify WFS filter dialog still works (add a WMS+WFS layer, apply attribute filters, confirm FILTER param is set on the WMS request and no SLD/SLD_BODY param is present)
  • Verify POST /{portal}/api/tools/ogc/filter returns 201 with OGC XML
  • Verify the 5 removed SLD endpoints return 404
  • Confirm DB migration drops the files table on a fresh upgrade

Backport of cc96ed7 to 4.2.x.

The generateSLD, getSLD, buildSLD, updateSLD and deleteSLD endpoints
in SldApi were never called from the frontend. Remove them along with
the TextFile JPA entity and repository that backed the SLD storage.

Simplify the WFS filter service to always use the WMS FILTER parameter
instead of SLD/SLD_BODY. The /filter endpoint (POST) is kept as the only
remaining endpoint in SldApi.

Add a DB migration to drop the now-unused files table and sequence.
@juanluisrp juanluisrp changed the title Map viewer / WFS filter / remove unused SLD API endpoints (backport 4.2.x) [Backport 4.2.x] Map viewer / WFS filter / remove unused SLD API endpoints Jun 16, 2026
@juanluisrp juanluisrp added the api change Indicate a change in the API label Jun 16, 2026
@juanluisrp juanluisrp added this to the 4.2.17 milestone Jun 16, 2026
- Add file headers and minor code improvements.
- Add unit tests for SLDUtil
@josegar74 josegar74 force-pushed the backport-test-4.2.x branch from 5d0206b to cdc02d6 Compare June 17, 2026 06:16
@josegar74 josegar74 merged commit a80d535 into geonetwork:4.2.x Jun 18, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api change Indicate a change in the API

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants