Interface LinkAnalyzer


public interface LinkAnalyzer
Analyzes internal and external links.
Author:
Richard "Shred" Körber
  • Method Details

    • linkType

      @CheckForNull String linkType(@Nullable String url)
      Returns the type of a link. The returned string is used as CSS class name for the resulting link. Used e.g. to highlight external links.
      Parameters:
      url - URL to be analyzed
      Returns:
      CSS class name, or null if this is no special link
    • linkUrl

      String linkUrl(@Nullable String url)
      Returns a resolved link.
      Parameters:
      url - URL to be analyzed, may be a relative link
      Returns:
      Link to be used, never null
    • imageUrl

      String imageUrl(@Nullable String url)
      Image a resolved image URL.
      Parameters:
      url - URL to be analyzed, may be a relative link
      Returns:
      Image URL to be used, never null