Package org.eclipse.ecf.core.identity

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


  @Override
  public ID createInstance(Object[] parameters) throws IDCreateException {
    try{
      return new TwitterID(this,(String)parameters[0]);
    }catch(Exception e){
      throw new IDCreateException("Exception creating TwitterID");
    }
  }
View Full Code Here


  public static ID createID(String namespaceName, String idName)
      throws IDCreateException {
    Namespace ns = (namespaceName != null) ? getNamespaceByName(namespaceName)
        : findNamespaceByIdName(idName);
    if (ns == null)
      throw new IDCreateException(
          "Cannot find Namespace for namespaceName=" + namespaceName //$NON-NLS-1$
              + " and idName=" + idName); //$NON-NLS-1$
    return createID(ns, idName);
  }
View Full Code Here

    // create the endpoint id
    IServiceProperties serviceProperties = serviceInfo.getServiceProperties();
    final byte[] endpointBytes =
      serviceProperties.getPropertyBytes(ECFServicePublication.PROP_KEY_ENDPOINT_CONTAINERID);
    if (endpointBytes == null)
      throw new IDCreateException(
          "ServiceEndpointDescription endpointBytes cannot be null");
    final String endpointStr = new String(endpointBytes);
    final String namespaceStr =
      serviceProperties.getPropertyString(ECFServicePublication.PROP_KEY_ENDPOINT_CONTAINERID_NAMESPACE);
    if (namespaceStr == null) {
      throw new IDCreateException(
      "ServiceEndpointDescription namespaceStr cannot be null");
    }
    endpointId = IDFactory.getDefault().createID(namespaceStr,
        endpointStr);
  }
View Full Code Here

        return new ZooDiscoveryServiceID(this,
            new ServiceTypeID(this, type), ((URI) parameters[1]));
      }

    } catch (Exception e) {
      throw new IDCreateException(getName()+" createInstance()", e); //$NON-NLS-1$
    }
    return null;

  }
View Full Code Here

    Namespace namespace = new Namespace(this.getClass().getName(),
        null) {
      private static final long serialVersionUID = -1223105025297785358L;

      public ID createInstance(Object[] args) throws IDCreateException {
        throw new IDCreateException("can't create instance");
      }
      public String getScheme() {
        return getClass().getName();
      }
      public Class[][] getSupportedParameterTypes() {
View Full Code Here

    Namespace namespace = new Namespace(this.getClass().getName(),
        DESCRIPTION) {
      private static final long serialVersionUID = 0L;

      public ID createInstance(Object[] args) throws IDCreateException {
        throw new IDCreateException("can't create instance");
      }

      public String getScheme() {
        return NamespaceTest.this.getClass().getName();
      }
View Full Code Here

  public ID createBBObjectId(Namespace namespace, String stringValue)
      throws IDCreateException {
    try {
      return new GuestID((PHPBBNamespace) namespace, new URI(stringValue));
    } catch (URISyntaxException e) {
      throw new IDCreateException(e);
    }
  }
View Full Code Here

  public ID createBBObjectId(Namespace namespace, URL baseURL,
      String longValue) throws IDCreateException {
    try {
      return new GuestID((PHPBBNamespace) namespace, baseURL, longValue);
    } catch (URISyntaxException e) {
      throw new IDCreateException(e);
    }
  }
View Full Code Here

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

  public ID createBBObjectId(Namespace namespace, URL baseURL, String longValue)
      throws IDCreateException {
    try {
      return new MemberID((PHPBBNamespace) namespace, baseURL, Long.parseLong(longValue));
    } catch (URISyntaxException e) {
      throw new IDCreateException(e);
    }
  }
View Full Code Here

TOP

Related Classes of org.eclipse.ecf.core.identity.IDCreateException

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.