Package com.day.cq.rewriter.linkchecker
Interface ExternalLinkChecker
public interface ExternalLinkChecker
Service that validates external links.
-
Method Summary
Modifier and TypeMethodDescriptionintChecks the given uri.Checks the given link store in the repository and checks it for validity.voidWalks 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 Details
-
check
int check(String uri) throws UnknownServiceException, URISyntaxException, ConnectException, NoRouteToHostException, UnknownHostException, IOException Checks the given uri.- Parameters:
uri- the uri to check- Returns:
- the http status response
- Throws:
UnknownServiceException- if the protocol is not supportedURISyntaxException- if the uri is malformedConnectException- if the connect failedNoRouteToHostException- if there is no route to the hostUnknownHostException- if the host is unknownIOException- 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
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.
-