Package org.rssowl.core.connection

Examples of org.rssowl.core.connection.CredentialsException


  public ICredentials getAuthCredentials(URI link) throws CredentialsException {
    String protocol = link.getScheme();

    /* Require protocol */
    if (!StringUtils.isSet(protocol))
      throw new CredentialsException(Activator.getDefault().createErrorStatus("Unknown protocol", null));

    /* Require credentials provider */
    ICredentialsProvider credentialsProvider = fCredentialsProvider.get(protocol);
    if (credentialsProvider == null)
      throw new CredentialsException(Activator.getDefault().createErrorStatus("Could not find any credentials provider for protocol: " + protocol, null));

    /* Retrieve Credentials */
    ICredentials credentials = credentialsProvider.getAuthCredentials(link);
    return credentials;
  }
View Full Code Here


  public IProxyCredentials getProxyCredentials(URI link) throws CredentialsException {
    String protocol = link.getScheme();

    /* Require protocol */
    if (!StringUtils.isSet(protocol))
      throw new CredentialsException(Activator.getDefault().createErrorStatus("Unknown protocol", null));

    /* Require credentials provider */
    ICredentialsProvider credentialsProvider = fCredentialsProvider.get(protocol);
    if (credentialsProvider == null)
      throw new CredentialsException(Activator.getDefault().createErrorStatus("Could not find any credentials provider for protocol: " + protocol, null));

    /* Retrieve Credentials */
    IProxyCredentials credentials = credentialsProvider.getProxyCredentials(link);
    return credentials;
  }
View Full Code Here

  private ICredentialsProvider internalGetCredentialsProvider(URI link) throws CredentialsException {
    String protocol = link.getScheme();

    /* Require protocol */
    if (!StringUtils.isSet(protocol))
      throw new CredentialsException(Activator.getDefault().createErrorStatus(Messages.ConnectionServiceImpl_ERROR_UNKNOWN_PROTOCOL, null));

    /* Require credentials provider */
    ICredentialsProvider credentialsProvider = fCredentialsProvider.get(protocol);
    if (credentialsProvider == null)
      throw new CredentialsException(Activator.getDefault().createErrorStatus(NLS.bind(Messages.ConnectionServiceImpl_ERROR_NO_CREDENTIAL_PROVIDER, protocol), null));

    return credentialsProvider;
  }
View Full Code Here

TOP

Related Classes of org.rssowl.core.connection.CredentialsException

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.