Class InvalidLinkType

java.lang.Object
io.wcm.handler.link.spi.LinkType
io.wcm.handler.link.type.InvalidLinkType

@Model(adaptables={org.apache.sling.api.SlingHttpServletRequest.class,org.apache.sling.api.resource.Resource.class}) @ProviderType public final class InvalidLinkType extends LinkType
This link type is used for invalid links. It must not be registered explicitly.
  • Field Details

  • Constructor Details

    • InvalidLinkType

      public InvalidLinkType()
  • Method Details

    • getId

      @NotNull public @NotNull String getId()
      Description copied from class: LinkType
      Get link type ID.
      Specified by:
      getId in class LinkType
      Returns:
      Link type ID (is stored as identifier in repository)
    • getPrimaryLinkRefProperty

      @Nullable public @Nullable String getPrimaryLinkRefProperty()
      Description copied from class: LinkType
      Get primary link reference property.
      Specified by:
      getPrimaryLinkRefProperty in class LinkType
      Returns:
      Name of the property in which the primary link reference is stored
    • accepts

      public boolean accepts(@NotNull @NotNull String linkRef)
      Description copied from class: LinkType
      Checks whether a link reference string can be handled by this link type
      Specified by:
      accepts in class LinkType
      Parameters:
      linkRef - Link reference string
      Returns:
      true if this link type can handle the given link reference
    • resolveLink

      @NotNull public @NotNull Link resolveLink(@NotNull @NotNull Link link)
      Description copied from class: LinkType
      Resolves a link
      Specified by:
      resolveLink in class LinkType
      Parameters:
      link - Link metadata
      Returns:
      Resolved link metadata. Never null.