Interface LinkChecker


public interface LinkChecker
The LinkChecker interface defines method needed for link checking of internal and external urls.
  • Method Details

    • getLinkValidity

      @Deprecated LinkValidity getLinkValidity(String url, LinkCheckerSettings settings)
      This method checks if the passed url is a valid internal or external link. It might happen that a invalid external link is marked valid since the external link validation is implementation dependant and will for sure happen asynchronously (because of performance reasons)
      Parameters:
      url - url to validate
      settings - linkchecker settings. see LinkCheckerSettings
      Returns:
      the validity information for this url
    • getLink

      Link getLink(String href, LinkCheckerSettings settings)
      This method checks if the passed url is a valid internal or external link. It might happen that a invalid external link is marked valid since the external link validation is implementation dependant and will for sure happen asynchronously (because of performance reasons).
      Parameters:
      href - url to validate
      settings - linkchecker settings. see LinkCheckerSettings
      Returns:
      the link information for this url
      Since:
      5.3
    • createSettings

      Returns the settings that are used for the given request. If the request does not contain them, new settings are created and set to the request.
      Parameters:
      request - the sling request
      Returns:
      linkchecker settings
    • isSpecial

      boolean isSpecial(String url)
      Checks if the given url is a special link, i.e. starts with one of the configured prefixes.
      Parameters:
      url - url to check
      Returns:
      true if special