Map viewer / WFS filter / remove unused SLD API endpoints#9343
Merged
josegar74 merged 2 commits intoJun 18, 2026
Conversation
The SLD-based WMS filtering strategies (SLD and SLD_BODY) were never
the active path in production: the default filterStrategy was always
FILTER, the SLD/SLD_BODY options were commented out in the config, and
the SLD_BODY path is documented as returning 414 Request-URI Too Large.
Remove the dead endpoints (POST /sld, GET /sld, DELETE /sld,
GET /sld/{id}.xml, GET /sldform) from SldApi, keeping only
POST /filter which is still in use.
Remove the methods only used by the SLD endpoints from SLDUtil
(parseSLD, getGetStyleRequest, insertFilter) and their associated
imports (Apache HttpClient, IOUtils, javax.mail, JDOM Element/Content,
ServiceException, URI/URISyntaxException).
Remove the TextFile JPA entity and TextFileRepository, which existed
solely to persist generated SLD documents, and add a v4412 migration
to drop the now-unused files table and sequence.
Simplify WfsFilterService to always POST to /api/tools/ogc/filter and
apply the result as a WMS FILTER parameter. Remove the isSld/SLD_BODY
branches, both pollSldUrl copies, and the $timeout and gnWfsFilterConfig
injections that only served those paths.
Remove the filterStrategy property from the gnWfsFilterConfig constant
in WfsFilterDirective and the dead var isSld line in filterWMS.
Remove the stale generateSLD/getSLD Jeeves security mappings.
Update the user guide to reflect that filters are applied via the WMS
FILTER parameter rather than SLD.
4 tasks
- Add file headers and minor code improvements. - Add unit tests for SLDUtil
josegar74
approved these changes
Jun 17, 2026
This file contains hidden or 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
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.
Summary
The SLD-based WMS filtering strategies (
SLDandSLD_BODY) were neverthe active path in production: the default
filterStrategywas alwaysFILTER, the SLD/SLD_BODY options were commented out in the viewer config,and the
SLD_BODYpath is documented as returning414 Request-URI Too Large.POST /sld,GET /sld,DELETE /sld,GET /sld/{id}.xml,GET /sldformfromSldApi, keeping onlyPOST /filter.SLDUtil(parseSLD,getGetStyleRequest,insertFilter) and their associated imports (Apache HttpClient, IOUtils, javax.mail, JDOM, etc.).TextFileJPA entity andTextFileRepository(existed solely to persist generated SLD documents); add a v4412 migration to drop thefilestable and sequence.WfsFilterServiceto always POST to/api/tools/ogc/filterand apply the result as a WMSFILTERparameter; remove theisSld/SLD_BODYbranches, bothpollSldUrlcopies, and the$timeout/gnWfsFilterConfiginjections.filterStrategyproperty from thegnWfsFilterConfigconstant and the deadvar isSldline infilterWMSinWfsFilterDirective.generateSLD/getSLDJeeves security mappings.FILTERparameter.Test plan
POST /geonetwork/srv/api/tools/ogc/filterreturns HTTP 201 with a valid<ogc:Filter>XML bodyGET /sldform,GET /sld,GET /sld/1.xml,POST /sld,DELETE /sldall return HTTP 404wfsFilterService.pollSldUrlno longer exists on the servicewfsFilterService.getFilter→applyFiltersetsFILTERparam on WMS layer source;SLDandSLD_BODYparams are not set