Class LinkRequest

java.lang.Object
io.wcm.handler.link.LinkRequest

@ProviderType public final class LinkRequest extends Object
Holds all properties that are part of a link handling request.
  • Constructor Details

    • LinkRequest

      public LinkRequest(@Nullable @Nullable org.apache.sling.api.resource.Resource resource, @Nullable @Nullable com.day.cq.wcm.api.Page page, @Nullable @Nullable LinkArgs linkArgs)
      Constructor.
      Parameters:
      resource - Resource containing properties that define the link target
      page - Target content page
      linkArgs - Link arguments
    • LinkRequest

      public LinkRequest(@Nullable @Nullable org.apache.sling.api.resource.Resource resource, @Nullable @Nullable com.day.cq.wcm.api.Page page, @Nullable @Nullable String reference, @Nullable @Nullable LinkArgs linkArgs)
      Constructor.
      Parameters:
      resource - Resource containing properties that define the link target
      page - Target content page
      reference - Link reference (internal or external).
      linkArgs - Link arguments
  • Method Details

    • getResource

      @Nullable public @Nullable org.apache.sling.api.resource.Resource getResource()
      Get resource.
      Returns:
      Resource containing properties that define the link target
    • getPage

      @Nullable public @Nullable com.day.cq.wcm.api.Page getPage()
      Get page.
      Returns:
      Target content page
    • getReference

      @Nullable public @Nullable String getReference()
      Get reference.
      Returns:
      Link reference (internal or external).
    • getLinkArgs

      @NotNull public @NotNull LinkArgs getLinkArgs()
      Get link arguments.
      Returns:
      Link arguments
    • getResourceProperties

      @NotNull public @NotNull org.apache.sling.api.resource.ValueMap getResourceProperties()
      Get resource properties.
      Returns:
      Properties from resource containing target link. The value map is a copy of the original map so it is safe to change the property values contained in the map.
    • toString

      public String toString()
      Overrides:
      toString in class Object