adobe / adobe/aem-core-wcm-components

Question on Link API

Open
#2,873 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
796
Forks
776
Avg merge
3d 22h
Merged PRs (30d)
8

Description

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()`` 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).

Do you see any reason for this?

Contributor guide

Open the contributing guide

Research direction

Start with Link.java and trace the LinkImpl and LinkRewriter behavior described in the question, including the example mapping. Determine whether the two URL methods have distinct intended contracts and whether that distinction is documented. Done means an agreed explanation or API/documentation decision is recorded.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
api, backend-api-design
Issue type
Documentation
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.