Class ResourceLink

java.lang.Object
io.wcm.handler.link.ui.ResourceLink

@Model(adaptables={org.apache.sling.api.SlingHttpServletRequest.class,org.apache.sling.api.resource.Resource.class}) public class ResourceLink extends Object
Generic resource-based link model.
  • Constructor Details

    • ResourceLink

      public ResourceLink()
  • Method Details

    • getMetadata

      @NotNull public @NotNull Link getMetadata()
      Returns a Link object with the metadata of the resolved link. Result is never null, check for validness with the Link.isValid() method.
      Returns:
      Link
    • isValid

      public boolean isValid()
      Returns true if the link was resolved successful.
      Returns:
      Link is valid
    • getAttributes

      @Nullable public @Nullable Map<String,String> getAttributes()
      Returns a map of attributes which can be applied to a HTML anchor element.
      Returns:
      Anchor attributes