Class LinkWrapper

  • All Implemented Interfaces:
    com.adobe.cq.wcm.core.components.commons.link.Link

    public final class LinkWrapper
    extends java.lang.Object
    implements com.adobe.cq.wcm.core.components.commons.link.Link
    Wraps a wcm.io Link object into a Core Components Link.
    • Field Summary

      • Fields inherited from interface com.adobe.cq.wcm.core.components.commons.link.Link

        PN_LINK_ACCESSIBILITY_LABEL, PN_LINK_TARGET, PN_LINK_TITLE_ATTRIBUTE, PN_LINK_URL
    • Constructor Summary

      Constructors 
      Constructor Description
      LinkWrapper​(@NotNull io.wcm.handler.link.Link link)  
    • Constructor Detail

      • LinkWrapper

        public LinkWrapper​(@NotNull
                           @NotNull io.wcm.handler.link.Link link)
        Parameters:
        link - wcm.io Link
    • Method Detail

      • isValid

        public boolean isValid()
        Specified by:
        isValid in interface com.adobe.cq.wcm.core.components.commons.link.Link
      • getURL

        @Nullable
        public @Nullable java.lang.String getURL()
        Specified by:
        getURL in interface com.adobe.cq.wcm.core.components.commons.link.Link
      • getMappedURL

        @Nullable
        public @Nullable java.lang.String getMappedURL()
        Specified by:
        getMappedURL in interface com.adobe.cq.wcm.core.components.commons.link.Link
      • getExternalizedURL

        @Nullable
        public @Nullable java.lang.String getExternalizedURL()
        Specified by:
        getExternalizedURL in interface com.adobe.cq.wcm.core.components.commons.link.Link
      • getHtmlAttributes

        @NotNull
        public @NotNull java.util.Map getHtmlAttributes()
        Specified by:
        getHtmlAttributes in interface com.adobe.cq.wcm.core.components.commons.link.Link
      • getReference

        @Nullable
        public @Nullable java.lang.Object getReference()
        Specified by:
        getReference in interface com.adobe.cq.wcm.core.components.commons.link.Link
      • orNull

        @Nullable
        public com.adobe.cq.wcm.core.components.commons.link.Link orNull()
        Returns:
        this or null if link is invalid
      • getLinkObject

        @NotNull
        public @NotNull io.wcm.handler.link.Link getLinkObject()
        Returns:
        wcm.io Link