What is the difference between getURL() and getMappedURL()? I am asking because getURL() barely makes sense, as it exposes URLs which are never exposed by AEM itself, because the LinkRewriter will always apply rules, for example path shortening.
That means if a mapping /content/foo/:/content/ AEM will never deliver a link to localhost:8080/content/foo/page.html but consistently localhost:8080/content/page.html (even if the LinkImpl will return this value).
A question on the Link API (https://github.com/adobe/aem-core-wcm-components/blob/d2a7b02405db241fadbad02a4878f8770b36e246/bundles/core/src/main/java/com/adobe/cq/wcm/core/components/commons/link/Link.java#L4)
What is the difference between
getURL()
andgetMappedURL()
? I am asking becausegetURL()
barely makes sense, as it exposes URLs which are never exposed by AEM itself, because the LinkRewriter will always apply rules, for example path shortening.That means if a mapping
/content/foo/:/content/
AEM will never deliver a link tolocalhost:8080/content/foo/page.html
but consistentlylocalhost:8080/content/page.html
(even if the LinkImpl will return this value).Do you see any reason for this?