Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorslewis2016-10-09 20:31:35 -0400
committerslewis2016-10-09 20:31:35 -0400
commit1a8b4288a15f169cd0ebd6f45b2c97225e2c55b6 (patch)
tree53df6a121e6cfafcbdf68c2a3cdf4812c183fd3c /framework/bundles/org.eclipse.ecf.identity/src
parente5ad3e2b3f8955901a8b4ddc8f285f8106ac92a7 (diff)
downloadorg.eclipse.ecf-1a8b4288a15f169cd0ebd6f45b2c97225e2c55b6.tar.gz
org.eclipse.ecf-1a8b4288a15f169cd0ebd6f45b2c97225e2c55b6.tar.xz
org.eclipse.ecf-1a8b4288a15f169cd0ebd6f45b2c97225e2c55b6.zip
Added method to createRandomUUID
Diffstat (limited to 'framework/bundles/org.eclipse.ecf.identity/src')
-rw-r--r--framework/bundles/org.eclipse.ecf.identity/src/org/eclipse/ecf/core/identity/URIID.java13
1 files changed, 13 insertions, 0 deletions
diff --git a/framework/bundles/org.eclipse.ecf.identity/src/org/eclipse/ecf/core/identity/URIID.java b/framework/bundles/org.eclipse.ecf.identity/src/org/eclipse/ecf/core/identity/URIID.java
index 6b4fc592e..36454db99 100644
--- a/framework/bundles/org.eclipse.ecf.identity/src/org/eclipse/ecf/core/identity/URIID.java
+++ b/framework/bundles/org.eclipse.ecf.identity/src/org/eclipse/ecf/core/identity/URIID.java
@@ -10,6 +10,7 @@
package org.eclipse.ecf.core.identity;
import java.net.URI;
+import java.util.UUID;
import org.eclipse.core.runtime.Assert;
/**
@@ -26,6 +27,11 @@ public class URIID extends BaseID implements IResourceID {
private static final long serialVersionUID = 115165512542491014L;
+ /**
+ * @since 3.8
+ */
+ public static final String UUID_PROTOCOL = "uuid";
+
public URIIDNamespace(String name, String desc) {
super(name, desc);
}
@@ -49,6 +55,13 @@ public class URIID extends BaseID implements IResourceID {
}
}
+ /**
+ * @since 3.8
+ */
+ public ID createRandomUUID() throws IDCreateException {
+ return createInstance(new Object[] { UUID_PROTOCOL + ":" + UUID.randomUUID().toString() });
+ }
+
public String getScheme() {
return "uri";
}

Back to the top