Hi Ruben,

One use case that probably also should be considered here is the case
where static pages are generated with sling. In that case the
rendering of the page is not tied to a request.

While [1] has a request in the signature, the idea is not that this
needs to be "a currently active" request. It can be

1. null for default behaviour
2. the current request (if mapping should be aligned with current request)
3. an example request (or maybe better "reference request") that holds
the same properties (server name, headers, etc.) as a request that will
be issued for the generated URI in the future. The expectation is that
resolve() of the same ResourceToUriMapper service will take care of such
a mapped URI.

The last option (or maybe the first) covers the use case for generating
static pages.

-Georg

[1] https://github.com/apache/sling-org-apache-sling-api/blob/3eedd71ec46e75ec93848282f7d3cb4a7ce862b5/src/main/java/org/apache/sling/api/resource/mapping/spi/ResourceToUriMapper.java#L51

Ruben


Reply via email to