Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorslewis2006-10-24 05:12:17 +0000
committerslewis2006-10-24 05:12:17 +0000
commitff38c999fa391a988ca2979fe54c0664a5a628be (patch)
tree411929bd91046e215136c1a248f4c3129ca5b92e /framework/bundles/org.eclipse.ecf.identity/src/org/eclipse/ecf/core/identity/ID.java
parent6dc7fa606bfc3ca479e865c535671371373dce13 (diff)
downloadorg.eclipse.ecf-ff38c999fa391a988ca2979fe54c0664a5a628be.tar.gz
org.eclipse.ecf-ff38c999fa391a988ca2979fe54c0664a5a628be.tar.xz
org.eclipse.ecf-ff38c999fa391a988ca2979fe54c0664a5a628be.zip
Initial checkin of new org.eclipse.ecf.core.identity plugin
Diffstat (limited to 'framework/bundles/org.eclipse.ecf.identity/src/org/eclipse/ecf/core/identity/ID.java')
-rw-r--r--framework/bundles/org.eclipse.ecf.identity/src/org/eclipse/ecf/core/identity/ID.java69
1 files changed, 69 insertions, 0 deletions
diff --git a/framework/bundles/org.eclipse.ecf.identity/src/org/eclipse/ecf/core/identity/ID.java b/framework/bundles/org.eclipse.ecf.identity/src/org/eclipse/ecf/core/identity/ID.java
new file mode 100644
index 000000000..9495f46e8
--- /dev/null
+++ b/framework/bundles/org.eclipse.ecf.identity/src/org/eclipse/ecf/core/identity/ID.java
@@ -0,0 +1,69 @@
+/*******************************************************************************
+ * Copyright (c) 2004 Composent, Inc. and others. 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: Composent, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.ecf.core.identity;
+
+import java.net.URI;
+import java.net.URISyntaxException;
+
+import org.eclipse.core.runtime.IAdaptable;
+
+/**
+ * Contract for ECF identity
+ * <p>
+ * ECF IDs are immutable once constructed, and unique within the containing
+ * {@link Namespace}.
+ * <p>
+ * ID instances are created via the Namespace.createInstance(...) method. This
+ * method is called by the IDFactory.createID(...) methods for the given
+ * Namespace. So, for example, to create an ID instance with the name "slewis":
+ *
+ * <pre>
+ * ID id = IDFactory.getDefault().createID(namespace, &quot;slewis&quot;);
+ * </pre>
+ *
+ * <p>
+ *
+ * @see Namespace
+ *
+ */
+public interface ID extends java.io.Serializable, java.lang.Comparable,
+ java.security.Principal, IAdaptable {
+
+ public boolean equals(Object obj);
+
+ public int hashCode();
+
+ /**
+ * Get the unique name of this identity.
+ *
+ * @return String unique name for this identity. Must not be null, and must
+ * be a unique String within the Namespace returned by
+ * getNamespace()
+ */
+ public String getName();
+
+ /**
+ * Get the Namespace instance associated with this identity
+ *
+ * @return Namespace the Namespace corresponding to this identity. Must not
+ * return null.
+ */
+ public Namespace getNamespace();
+
+ /**
+ * If available, return this identity in URI form. If not available as URI,
+ * throw URISyntaxException
+ *
+ * @return URI the URI representation of this identity. Will not return
+ * null.
+ * @throws URISyntaxException
+ * if this ID cannot be converted to URI form
+ */
+ public URI toURI() throws URISyntaxException;
+} \ No newline at end of file

Back to the top