Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorslewis2016-03-03 00:10:20 +0000
committerslewis2016-03-03 00:10:20 +0000
commitb999cfbe9f3416dce3d31863677b9332ef8b5bf0 (patch)
treedf63c976bd29e3045fef231088d8be14291e1ef9 /framework
parentfbd23d551cda51a5f54ff06b67492a585d1485c9 (diff)
downloadorg.eclipse.ecf-b999cfbe9f3416dce3d31863677b9332ef8b5bf0.tar.gz
org.eclipse.ecf-b999cfbe9f3416dce3d31863677b9332ef8b5bf0.tar.xz
org.eclipse.ecf-b999cfbe9f3416dce3d31863677b9332ef8b5bf0.zip
Added API to BaseContainerInstantiator to simplify creation of ID
instances from RSA configuration parameters Map. Change-Id: Ic06c39148a16a5fa8e32db0ceebb0bb6b429f320
Diffstat (limited to 'framework')
-rw-r--r--framework/bundles/org.eclipse.ecf/META-INF/MANIFEST.MF2
-rw-r--r--framework/bundles/org.eclipse.ecf/src/org/eclipse/ecf/core/provider/BaseContainerInstantiator.java23
2 files changed, 24 insertions, 1 deletions
diff --git a/framework/bundles/org.eclipse.ecf/META-INF/MANIFEST.MF b/framework/bundles/org.eclipse.ecf/META-INF/MANIFEST.MF
index d994fef54..b28f9fa24 100644
--- a/framework/bundles/org.eclipse.ecf/META-INF/MANIFEST.MF
+++ b/framework/bundles/org.eclipse.ecf/META-INF/MANIFEST.MF
@@ -1,7 +1,7 @@
Manifest-Version: 1.0
Bundle-Name: %plugin.name
Bundle-SymbolicName: org.eclipse.ecf;singleton:=true
-Bundle-Version: 3.7.200.qualifier
+Bundle-Version: 3.8.0.qualifier
Bundle-Activator: org.eclipse.ecf.internal.core.ECFPlugin
Bundle-Vendor: %plugin.provider
Bundle-Localization: plugin
diff --git a/framework/bundles/org.eclipse.ecf/src/org/eclipse/ecf/core/provider/BaseContainerInstantiator.java b/framework/bundles/org.eclipse.ecf/src/org/eclipse/ecf/core/provider/BaseContainerInstantiator.java
index 7542131ab..684fb9ab3 100644
--- a/framework/bundles/org.eclipse.ecf/src/org/eclipse/ecf/core/provider/BaseContainerInstantiator.java
+++ b/framework/bundles/org.eclipse.ecf/src/org/eclipse/ecf/core/provider/BaseContainerInstantiator.java
@@ -14,6 +14,8 @@ package org.eclipse.ecf.core.provider;
import java.util.*;
import org.eclipse.core.runtime.IAdapterManager;
import org.eclipse.ecf.core.*;
+import org.eclipse.ecf.core.identity.ID;
+import org.eclipse.ecf.core.identity.Namespace;
import org.eclipse.ecf.internal.core.ECFPlugin;
/**
@@ -120,6 +122,27 @@ public class BaseContainerInstantiator implements IContainerInstantiator {
}
/**
+ * @since 3.8
+ */
+ protected <T> ID getIDParameterValue(Namespace ns, Map<String, ?> parameters, String key, Class<T> type, T def) {
+ return ns.createInstance(new Object[] {getParameterValue(parameters, key, type, def)});
+ }
+
+ /**
+ * @since 3.8
+ */
+ protected ID getIDParameterValue(Namespace ns, Map<String, ?> parameters, String key, String def) {
+ return getIDParameterValue(ns, parameters, key, String.class, def);
+ }
+
+ /**
+ * @since 3.8
+ */
+ protected ID getIDParameterValue(Namespace ns, Map<String, ?> parameters, String key) {
+ return getIDParameterValue(ns, parameters, key, null);
+ }
+
+ /**
* @since 3.6
*/
protected <T> T getParameterValue(Object[] parameters, String key, Class<T> clazz, T def) {

Back to the top