Package com.google.enterprise.connector.util

Examples of com.google.enterprise.connector.util.UrlValidator


  private void testWorkplaceUrl(String workplaceServerUrl)
          throws RepositoryException {
    // Added by Pankaj on 04/05/2009 to remove the dependency of
    // Httpclient.jar file
    try {
      new UrlValidator().validate(workplaceServerUrl);
      LOGGER.log(Level.INFO, "Connection to Workplace URL is Successful");
    } catch (UrlValidatorException e) {
      LOGGER.log(Level.WARNING, resource.getString("workplace_url_error"));
      throw new RepositoryException(
              resource.getString("workplace_url_error"));
View Full Code Here


   */
  @VisibleForTesting
  int validateUrl(String urlString, ResourceBundle bundle)
      throws UrlConfigurationException {
    try {
      UrlValidator validator = new UrlValidator();
      validator.setRequireFullyQualifiedHostNames(true);
      return validator.validate(urlString);
    } catch (UrlValidatorException e) {
      // FIXME: The Not found message is confusing with an error about
      // fully-qualified host names. I think the validator should
      // throw a different exception in that case, and we should
      // provide a different message.
View Full Code Here

TOP

Related Classes of com.google.enterprise.connector.util.UrlValidator

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.