}
}
private void testWebtopUrl(String url) throws RepositoryException {
if (url == null || url.length() == 0) {
throw new RepositoryException("[webtop_display_url_error]");
}
logger.config("test connection to the webtop server: " + url);
try {
urlValidator.validate(url);
} catch (UrlValidatorException e) {
throw new RepositoryException(
"[status] Http request returned a " + e.getStatusCode()
+ " status");
} catch (GeneralSecurityException e) {
throw new RepositoryException("[HttpException]", e);
} catch (IllegalArgumentException e) {
// TODO(jl1615): There's no resource bundle entry for this one,
// unlike HttpException and IOException.
throw new RepositoryException("[IllegalArgumentException]", e);
} catch (IOException e) {
throw new RepositoryException("[IOException]", e);
}
}