[API Design] Link with separate getURL/getMappedURL/getExternalizedURL methods #1857
stefanseifert
started this conversation in
Ideas
Replies: 1 comment
-
Using a builder pattern would have probably been a better choice than the https://github.com/adobe/aem-core-wcm-components/blob/master/bundles/core/src/main/java/com/adobe/cq/wcm/core/components/services/link/PathProcessor.java. I'm uneasy to deprecate the |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
i find it a bit confusing what's to do with those three methods. the javadocs are clear, but I still suppose most users who "just want a link" will be puzzled which is the correct one for their HTL script, and in a big project with lots of developers every developer will use a different method leading to much inconsistency.
in wcm.io Link handler/URL handler for comparison we have also concepts for influencing if links should be externalized or not (avoiding the ill-designed com.day.cq.commons.Externalizer altogether), but this are only optional aspects which can be activated during link resolution with special builder methods, and there is always a sensible default handling which is the right thing to use in 95% of the cases.
providing access to these special case methods in this three variants of URLs may lead to confusion and inconsistencies.
this discussion is taken over from the mailing list where it did not gather any attention (except from @ky940819).
Beta Was this translation helpful? Give feedback.
All reactions