Package org.eclipse.ecf.core.identity

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


    String desc = ns.getDescription();
    assertTrue(desc.equals(DESCRIPTION));
  }

  public void testNewNamespaceGetSupportedParameterTypesForCreateInstance() {
    Namespace ns = createNamespace();
    Class[][] result = ns.getSupportedParameterTypes();
    assertTrue(result.length == 1);
    assertTrue(result[0][0].equals(String.class));
  }
View Full Code Here


    assertTrue(id2.compareTo(id1) > 0);
  }

  public void testGetNamespace() throws Exception {
    final ID id = createID();
    final Namespace ns = id.getNamespace();
    assertNotNull(ns);
  }
View Full Code Here

  }

  public void testEqualNamespaces() throws Exception {
    final ID id1 = createID();
    final ID id2 = createID();
    final Namespace ns1 = id1.getNamespace();
    final Namespace ns2 = id2.getNamespace();
    assertTrue(ns1.equals(ns2));
    assertTrue(ns2.equals(ns2));
  }
View Full Code Here

    public LookupJob(URI anURI) throws ContainerCreateException, IDCreateException {
      super(Messages.LookupHandler_RESOLVING);
      uri = anURI;
      container = (UserInputDiscoveryLocator) ContainerFactory.getDefault().createContainer(UserInputDiscoveryContainerInstantiator.NAME);
      Namespace namespace = IDFactory.getDefault().getNamespaceByName(uri.getScheme());
      if(namespace != null) {
        serviceTypeID = (IServiceTypeID) namespace.createInstance(new Object[] { uri });
      } else {
        //TODO throw ex and catch in execute with proper user notification
      }
    }
View Full Code Here

    String username = getXMPPConnection().getUser();
    final int atIndex = username.indexOf('@');
    if (atIndex > 0)
      username = username.substring(0, atIndex);
    final String host = getXMPPConnection().getHost();
    final Namespace ns = getConnectNamespace();
    final ID targetID = IDFactory.getDefault().createID(ns, new Object[] {username, host, null, groupName, username});
    return targetID;
  }
View Full Code Here

    buf.append(aServiceURL.getURLPath());
    uri = URI.create(buf.toString());
  }

  private void setIServiceTypeID(final ServiceURL aServiceURL, final String[] scopes) {
    final Namespace namespace = IDFactory.getDefault().getNamespaceByName(JSLPNamespace.NAME);
    serviceID = (IServiceTypeID) namespace.createInstance(new Object[] {aServiceURL, scopes});
  }
View Full Code Here

    final IRosterManager rosterManager = presenceContainerAdapter.getRosterManager();
    if (chatManager != null && rosterManager != null) {
      try {
        // get local ID
        final XMPPID localID = (XMPPID) rosterManager.getRoster().getUser().getID();
        final Namespace ns = container.getConnectNamespace();
        // create target ID
        final XMPPID targetID = (isXMPPS) ? new XMPPSID(ns, getURI().getAuthority()) : new XMPPID(ns, getURI().getAuthority());
        // If they are same, just tell user and return
        if (localID.equals(targetID)) {
          MessageDialog.openError(null, Messages.XMPPHyperlink_MESSAGING_ERROR_TITLE, Messages.XMPPHyperlink_MESSAGING_ERROR_MESSAGE);
View Full Code Here

TOP

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

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.