Package com.day.cq.rewriter.linkchecker
Interface LinkChecker
public interface LinkChecker
The
LinkChecker interface defines method needed for link checking
of internal and external urls.-
Method Summary
Modifier and TypeMethodDescriptioncreateSettings(SlingHttpServletRequest request) Returns the settings that are used for the given request.getLink(String href, LinkCheckerSettings settings) This method checks if the passed url is a valid internal or external link.getLinkValidity(String url, LinkCheckerSettings settings) Deprecated.booleanChecks if the given url is a special link, i.e.
-
Method Details
-
getLinkValidity
Deprecated.since 5.3 - usegetLink(java.lang.String, com.day.cq.rewriter.linkchecker.LinkCheckerSettings)instead.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 validatesettings- linkchecker settings. seeLinkCheckerSettings- Returns:
- the validity information for this url
-
getLink
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 validatesettings- linkchecker settings. seeLinkCheckerSettings- 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
Checks if the given url is a special link, i.e. starts with one of the configured prefixes.- Parameters:
url- url to check- Returns:
trueif special
-
getLink(java.lang.String, com.day.cq.rewriter.linkchecker.LinkCheckerSettings)instead.