Class 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 Detail

      • ID

        @NotNull
        public static final @NotNull java.lang.String ID
        Link type ID
        See Also:
        Constant Field Values
    • Constructor Detail

      • InvalidLinkType

        public InvalidLinkType()
    • Method Detail

      • getId

        @NotNull
        public @NotNull java.lang.String getId()
        Specified by:
        getId in class LinkType
        Returns:
        Link type ID (is stored as identifier in repository)
      • getPrimaryLinkRefProperty

        @Nullable
        public @Nullable java.lang.String getPrimaryLinkRefProperty()
        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 java.lang.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.