Examples of IDCreateException


Examples of org.eclipse.ecf.core.identity.IDCreateException

      throws IDCreateException {
    try {
      return new CategoryID((PHPBBNamespace) namespace, new URI(
          stringValue));
    } catch (URISyntaxException e) {
      throw new IDCreateException(e);
    }
  }
View Full Code Here

Examples of org.eclipse.ecf.core.identity.IDCreateException

      throws IDCreateException {
    try {
      return new CategoryID((PHPBBNamespace) namespace, baseURL,
          Long.parseLong(longValue));
    } catch (URISyntaxException e) {
      throw new IDCreateException(e);
    }
  }
View Full Code Here

Examples of org.eclipse.ecf.core.identity.IDCreateException

      throws IDCreateException {
    try {
      return new ThreadMessageID((PHPBBNamespace) namespace, new URI(
          stringValue));
    } catch (URISyntaxException e) {
      throw new IDCreateException(e);
    }
  }
View Full Code Here

Examples of org.eclipse.ecf.core.identity.IDCreateException

      throws IDCreateException {
    try {
      return new ThreadMessageID((PHPBBNamespace) namespace, baseURL,
          Long.parseLong(longValue));
    } catch (URISyntaxException e) {
      throw new IDCreateException(e);
    }
  }
View Full Code Here

Examples of org.eclipse.ecf.core.identity.IDCreateException

      scopes = DEFAULT_SCOPE; //TODO-mkuppe https://bugs.eclipse.org/218308
      protocols = DEFAULT_PROTO; //TODO-mkuppe https://bugs.eclipse.org/230182

      createType();
    } catch (Exception e) {
      throw new IDCreateException(type + " is not a valid ServiceTypeID"); //$NON-NLS-1$
    }
  }
View Full Code Here

Examples of org.eclipse.ecf.core.identity.IDCreateException

  private static final String SCHEME = "torrent"; //$NON-NLS-1$

  public ID createInstance(Object[] args) throws IDCreateException {
    if (args == null || args.length == 0) {
      throw new IDCreateException("parameters cannot be null or of 0 length");
    } else {
      File file = null;
      if (args[0] instanceof String) {
        file = new File((String) args[0]);
      } else if (args[0] instanceof File) {
        file = (File) args[0];
      } else {
        throw new IDCreateException("parameter-0 must be of type File or String");
      }

      if (file.isDirectory()) {
        throw new IDCreateException("file="+
            file.getAbsolutePath()+" must not be a directory");
      } else if (file.canRead()) {
        return new TorrentID(this, file);
      } else {
        throw new IDCreateException("file="+file.getAbsolutePath()+" cannot be read");
      }
    }
  }
View Full Code Here

Examples of org.eclipse.ecf.core.identity.IDCreateException

      final String init = getInitFromExternalForm(args);
      if (init != null)
        return new XMPPSID(this, init);
      return new XMPPSID(this, (String) args[0]);
    } catch (final Exception e) {
      throw new IDCreateException(Messages.XMPPSNamespace_EXCEPTION_ID_CREATE, e);
    }
  }
View Full Code Here

Examples of org.eclipse.ecf.core.identity.IDCreateException

  public ID createInstance(Object[] parameters) throws IDCreateException {
    Assert.isNotNull(parameters, Messages.MSNNamespace_ParameterIsNull);
    if (parameters.length == 1 && parameters[0] instanceof String) {
      return new MSNID(this, (String) parameters[0]);
    } else {
      throw new IDCreateException(
          Messages.MSNNamespace_ParameterIsInvalid);
    }
  }
View Full Code Here

Examples of org.eclipse.ecf.core.identity.IDCreateException

      final String init = getInitFromExternalForm(args);
      if (init != null)
        return new XMPPID(this, init);
      return new XMPPID(this, (String) args[0]);
    } catch (final Exception e) {
      throw new IDCreateException(Messages.XMPPNamespace_EXCEPTION_ID_CREATE, e);
    }
  }
View Full Code Here

Examples of org.eclipse.ecf.core.identity.IDCreateException

        return new XMPPFileID(new URL(init));
      if (parameters[0] instanceof URL)
        return new XMPPFileID((URL) parameters[0]);
      return new XMPPFileID((XMPPID) parameters[0], (String) parameters[1]);
    } catch (final Exception e) {
      throw new IDCreateException(NLS.bind("{0} createInstance()", getName()), e); //$NON-NLS-1$
    }
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.