Package com.day.cq.rewriter.linkchecker
Interface LinkChecker
-
public interface LinkChecker
TheLinkChecker
interface defines method needed for link checking of internal and external urls.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description LinkCheckerSettings
createSettings(SlingHttpServletRequest request)
Returns the settings that are used for the given request.Link
getLink(java.lang.String href, LinkCheckerSettings settings)
This method checks if the passed url is a valid internal or external link.LinkValidity
getLinkValidity(java.lang.String url, LinkCheckerSettings settings)
Deprecated.since 5.3 - usegetLink(java.lang.String, com.day.cq.rewriter.linkchecker.LinkCheckerSettings)
instead.boolean
isSpecial(java.lang.String url)
Checks if the given url is a special link, i.e.
-
-
-
Method Detail
-
getLinkValidity
@Deprecated LinkValidity getLinkValidity(java.lang.String url, LinkCheckerSettings settings)
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
Link getLink(java.lang.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 validatesettings
- linkchecker settings. seeLinkCheckerSettings
- Returns:
- the link information for this url
- Since:
- 5.3
-
createSettings
LinkCheckerSettings createSettings(SlingHttpServletRequest request)
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(java.lang.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
-
-