Package com.day.cq.rewriter.linkchecker
Interface ExternalLinkChecker
-
public interface ExternalLinkCheckerService that validates external links.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description intcheck(java.lang.String uri)Checks the given uri.LinkInfocheckLink(java.lang.String link, boolean force)Checks the given link store in the repository and checks it for validity.voidcheckLinks()Walks through the links stored in the repository and checks them for validity if necessary or removes them from the repository if they are no longer used.
-
-
-
Method Detail
-
check
int check(java.lang.String uri) throws java.net.UnknownServiceException, java.net.URISyntaxException, java.net.ConnectException, java.net.NoRouteToHostException, java.net.UnknownHostException, java.io.IOExceptionChecks the given uri.- Parameters:
uri- the uri to check- Returns:
- the http status response
- Throws:
java.net.UnknownServiceException- if the protocol is not supportedjava.net.URISyntaxException- if the uri is malformedjava.net.ConnectException- if the connect failedjava.net.NoRouteToHostException- if there is no route to the hostjava.net.UnknownHostException- if the host is unknownjava.io.IOException- if a general I/O error occured
-
checkLinks
void checkLinks()
Walks through the links stored in the repository and checks them for validity if necessary or removes them from the repository if they are no longer used.
-
checkLink
LinkInfo checkLink(java.lang.String link, boolean force)
Checks the given link store in the repository and checks it for validity.- Parameters:
link- link to checkforce- iftrueforce a re-check- Returns:
- the updated link info or
nullif it was removed.
-
-