I have a requirement to build Link Objects (Type: com.adobe.cq.wcm.core.components.commons.link.Link) for multiple custom components that we are developing. I see that the LinkHandler (Type: com.adobe.cq.wcm.core.components.internal.link.LinkHandler) does this job. But, this class belongs to the internal package and hence I cannot import it into any of my custom implementations. As this is not associated with any core component, I'm not sure if there is a way to get a reference of LinkHandler using the Sling delegation pattern approach.
Is there any way we could create a reference of this class? Or do we need to do the implementation ground up again?
Solved! Go to Solution.
Views
Replies
Total Likes
Please post this question on the github repository of the core components project (https://github.com/adobe/aem-core-wcm-components) including some more details about your usecase.
There are definitely reasons why this is internal and not a public extension point.
Hi,
You can extend this and change/implement custom logic.
e.g. https://github.com/arunpatidar02/aem63app-repo/blob/master/java/CustomTeaser.java
@arunpatidar : I see that you are suggesting to use the sling delegation pattern. However, this works only when you extend the core component by specifying the resource supertype property in the child component.
My use case is a little different. I'd like to build objects of type "com.adobe.cq.wcm.core.components.commons.link.Link" so that I could use them in custom components that I am developing. Here, Link is not a core component model and hence I wouldn't be able to use the sling delegation pattern. Is there any other way I can get around this?
Please post this question on the github repository of the core components project (https://github.com/adobe/aem-core-wcm-components) including some more details about your usecase.
There are definitely reasons why this is internal and not a public extension point.
I don't know any way to achieve that, I am sorry.
Just in case if anyone is after a solution for this requirement, there is already a github issue open:
https://github.com/adobe/aem-core-wcm-components/discussions/1861
Views
Likes
Replies
Views
Likes
Replies