Package com.esri.gpt.catalog.harvest.clients.exceptions

Examples of com.esri.gpt.catalog.harvest.clients.exceptions.HRInvalidProtocolException


  throws HRInvalidProtocolException {
  super.validateProtocol();

  if (isFtp()) {
    if (getUserName().length() == 0 && getUserPassword().length() > 0) {
      throw new HRInvalidProtocolException(
        HRInvalidProtocolException.ProtocolElement.userName,
        "Empty user name.");
    }
    if (getUserName().length() > 0 && getUserPassword().length() == 0) {
      throw new HRInvalidProtocolException(
        HRInvalidProtocolException.ProtocolElement.userPassword,
        "Empty user password.");
    }
  }
}
View Full Code Here


@Override
protected void validateProtocol()
  throws HRInvalidProtocolException {
  super.validateProtocol();
  if (getPrefix().length() == 0) {
    throw new HRInvalidProtocolException(
      HRInvalidProtocolException.ProtocolElement.prefix,
      "Empty metadata prefix.");
  }
  if (getSet().length() == 0) {
    throw new HRInvalidProtocolException(
      HRInvalidProtocolException.ProtocolElement.set,
      "Empty set.");
  }
}
View Full Code Here

  try {
    TestConnectionRequest tchRequest = new TestConnectionRequest(
      getCredentials(), getFullUrl(), getTimeout(), getServiceName());
    if (!tchRequest.testConnection()) {
      throw new HRInvalidProtocolException(
        HRInvalidProtocolException.ProtocolElement.serviceName,
        "Requested service unaccessible."
        );
    }
  } catch (ImsResponseException ex) {
View Full Code Here

*/
@Override
protected void validateProtocol()
  throws HRInvalidProtocolException {
  if (!isHttp() && !isFtp() && !isHttps()) {
    throw new HRInvalidProtocolException(
      HRInvalidProtocolException.ProtocolElement.url,
      "Neither HTTP, nor HTTPS, nor FTP protocol.");
  }
  if (getPortNo() < 0 || getPortNo() >= 65536) {
    throw new HRInvalidProtocolException(
      HRInvalidProtocolException.ProtocolElement.portNo,
      "Invalid port number: " + getPortNo());
  }
  if (getServiceName().length() == 0) {
    throw new HRInvalidProtocolException(
      HRInvalidProtocolException.ProtocolElement.serviceName,
      "Empty service name.");
  }
}
View Full Code Here

*/
@Override
protected void validateProtocol() throws HRInvalidProtocolException {
  super.validateProtocol();
  if (!isHttp() && !isFtp() && !isHttps()) {
    throw new HRInvalidProtocolException(
      HRInvalidProtocolException.ProtocolElement.url,
      "Neither HTTP nor FTP protocol.");
  }
}
View Full Code Here

*/
protected void validateProtocol()
  throws HRInvalidProtocolException {
  // check if host url has a value
  if (getHostUrl().length() == 0) {
    throw new HRInvalidProtocolException(
      HRInvalidProtocolException.ProtocolElement.url,
      "Empty host URL.");
  }
}
View Full Code Here

TOP

Related Classes of com.esri.gpt.catalog.harvest.clients.exceptions.HRInvalidProtocolException

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.