Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormkuppe2008-06-12 05:29:50 -0400
committermkuppe2008-06-12 05:29:50 -0400
commite64060e068e5819cc5a43710beb49165050c02c3 (patch)
tree855a545c52809307b6e21836dbc38661e5b7ab6b
parente46d85e7bed42239de0555aa2f0a59f01d4e3bbc (diff)
downloadorg.eclipse.ecf-e64060e068e5819cc5a43710beb49165050c02c3.tar.gz
org.eclipse.ecf-e64060e068e5819cc5a43710beb49165050c02c3.tar.xz
org.eclipse.ecf-e64060e068e5819cc5a43710beb49165050c02c3.zip
RESOLVED - bug 236823: [Discovery] Composite container doesn't register a Namespace
https://bugs.eclipse.org/bugs/show_bug.cgi?id=236823
-rw-r--r--providers/bundles/org.eclipse.ecf.provider.discovery/plugin.xml8
-rw-r--r--providers/bundles/org.eclipse.ecf.provider.discovery/src/org/eclipse/ecf/internal/provider/discovery/CompositeNamespace.java35
-rw-r--r--providers/bundles/org.eclipse.ecf.provider.discovery/src/org/eclipse/ecf/internal/provider/discovery/CompositeServiceID.java36
3 files changed, 79 insertions, 0 deletions
diff --git a/providers/bundles/org.eclipse.ecf.provider.discovery/plugin.xml b/providers/bundles/org.eclipse.ecf.provider.discovery/plugin.xml
index d763952f5..9632e28f2 100644
--- a/providers/bundles/org.eclipse.ecf.provider.discovery/plugin.xml
+++ b/providers/bundles/org.eclipse.ecf.provider.discovery/plugin.xml
@@ -16,5 +16,13 @@
server="true">
</containerFactory>
</extension>
+ <extension
+ point="org.eclipse.ecf.identity.namespace">
+ <namespace
+ class="org.eclipse.ecf.internal.provider.discovery.CompositeNamespace"
+ description="CompositeNamespace"
+ name="ecf.namespace.composite">
+ </namespace>
+ </extension>
</plugin>
diff --git a/providers/bundles/org.eclipse.ecf.provider.discovery/src/org/eclipse/ecf/internal/provider/discovery/CompositeNamespace.java b/providers/bundles/org.eclipse.ecf.provider.discovery/src/org/eclipse/ecf/internal/provider/discovery/CompositeNamespace.java
new file mode 100644
index 000000000..f89619e19
--- /dev/null
+++ b/providers/bundles/org.eclipse.ecf.provider.discovery/src/org/eclipse/ecf/internal/provider/discovery/CompositeNamespace.java
@@ -0,0 +1,35 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Versant Corp.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Markus Kuppe (mkuppe <at> versant <dot> com) - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.ecf.internal.provider.discovery;
+
+import org.eclipse.ecf.core.identity.*;
+import org.eclipse.ecf.discovery.identity.ServiceTypeID;
+
+public class CompositeNamespace extends Namespace {
+
+ private static final long serialVersionUID = -4774766051014928510L;
+ public static final String NAME = "ecf.namespace.composite"; //$NON-NLS-1$
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ecf.core.identity.Namespace#createInstance(java.lang.Object[])
+ */
+ public ID createInstance(Object[] parameters) throws IDCreateException {
+ return new CompositeServiceID(this, new ServiceTypeID(this, (String) parameters[0]), (String) parameters[1]);
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ecf.core.identity.Namespace#getScheme()
+ */
+ public String getScheme() {
+ return "composite"; //$NON-NLS-1$
+ }
+
+}
diff --git a/providers/bundles/org.eclipse.ecf.provider.discovery/src/org/eclipse/ecf/internal/provider/discovery/CompositeServiceID.java b/providers/bundles/org.eclipse.ecf.provider.discovery/src/org/eclipse/ecf/internal/provider/discovery/CompositeServiceID.java
new file mode 100644
index 000000000..f7d4df02b
--- /dev/null
+++ b/providers/bundles/org.eclipse.ecf.provider.discovery/src/org/eclipse/ecf/internal/provider/discovery/CompositeServiceID.java
@@ -0,0 +1,36 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Versant Corp.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Markus Kuppe (mkuppe <at> versant <dot> com) - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.ecf.internal.provider.discovery;
+
+import org.eclipse.ecf.discovery.identity.IServiceTypeID;
+import org.eclipse.ecf.discovery.identity.ServiceID;
+
+public class CompositeServiceID extends ServiceID {
+
+ private static final long serialVersionUID = -5296876662431183581L;
+
+ /**
+ * @param compositeNamespace
+ * @param serviceTypeID
+ * @param string
+ */
+ public CompositeServiceID(CompositeNamespace compositeNamespace, IServiceTypeID serviceTypeID, String string) {
+ super(compositeNamespace, serviceTypeID, string);
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ecf.core.identity.BaseID#getName()
+ */
+ public String getName() {
+ return name;
+ }
+
+}

Back to the top