Skip to main content
aboutsummaryrefslogtreecommitdiffstats
path: root/osgi
diff options
context:
space:
mode:
authorslewis2016-10-28 23:02:37 -0400
committerslewis2016-10-28 23:02:37 -0400
commite8a79cb3dc3fddc84434487e3ff58ca1e9c89164 (patch)
tree00bbd376541842bcc31f7ba3622883511423559f /osgi
parentd5c3fd37d14a462ae5d5ad2549bf5b05352dda6f (diff)
downloadorg.eclipse.ecf-e8a79cb3dc3fddc84434487e3ff58ca1e9c89164.tar.gz
org.eclipse.ecf-e8a79cb3dc3fddc84434487e3ff58ca1e9c89164.tar.xz
org.eclipse.ecf-e8a79cb3dc3fddc84434487e3ff58ca1e9c89164.zip
Added support for private config properties (i.e. those that have:
config..<key>=<value> Change-Id: Iafc242cb5e0172ed2f955203cd744cac11e5757d
Diffstat (limited to 'osgi')
-rw-r--r--osgi/bundles/org.eclipse.ecf.osgi.services.remoteserviceadmin/src/org/eclipse/ecf/internal/osgi/services/remoteserviceadmin/PropertiesUtil.java12
-rw-r--r--osgi/bundles/org.eclipse.ecf.osgi.services.remoteserviceadmin/src/org/eclipse/ecf/osgi/services/remoteserviceadmin/RemoteServiceAdmin.java4
2 files changed, 11 insertions, 5 deletions
diff --git a/osgi/bundles/org.eclipse.ecf.osgi.services.remoteserviceadmin/src/org/eclipse/ecf/internal/osgi/services/remoteserviceadmin/PropertiesUtil.java b/osgi/bundles/org.eclipse.ecf.osgi.services.remoteserviceadmin/src/org/eclipse/ecf/internal/osgi/services/remoteserviceadmin/PropertiesUtil.java
index 08c72450b..b881c3afe 100644
--- a/osgi/bundles/org.eclipse.ecf.osgi.services.remoteserviceadmin/src/org/eclipse/ecf/internal/osgi/services/remoteserviceadmin/PropertiesUtil.java
+++ b/osgi/bundles/org.eclipse.ecf.osgi.services.remoteserviceadmin/src/org/eclipse/ecf/internal/osgi/services/remoteserviceadmin/PropertiesUtil.java
@@ -42,6 +42,8 @@ public class PropertiesUtil {
// Don't have them
"service.bundleid", //$NON-NLS-1$
"service.scope", //$NON-NLS-1$
+ "component.id", //$NON-NLS-1$
+ "component.name", //$NON-NLS-1$
org.osgi.service.remoteserviceadmin.RemoteConstants.ENDPOINT_FRAMEWORK_UUID,
org.osgi.service.remoteserviceadmin.RemoteConstants.ENDPOINT_ID,
org.osgi.service.remoteserviceadmin.RemoteConstants.ENDPOINT_SERVICE_ID,
@@ -411,13 +413,15 @@ public class PropertiesUtil {
return prop.startsWith(config + "."); //$NON-NLS-1$
}
- public static Map<String, Object> removeConfigProperties(String[] configs, Map<String, Object> source) {
- Map<String, Object> results = copyNonReservedProperties(source,
+ public static Map<String, Object> removePrivateConfigProperties(String[] configs, Map<String, Object> source) {
+ Map<String, Object> results = copyProperties(source,
new TreeMap<String, Object>(String.CASE_INSENSITIVE_ORDER));
for (Iterator<String> it = results.keySet().iterator(); it.hasNext();) {
- for (int i = 0; i < configs.length; i++)
- if (isConfigProperty(configs[i], it.next()))
+ for (int i = 0; i < configs.length; i++) {
+ String prop = it.next();
+ if (isConfigProperty(configs[i], prop) && prop.substring(configs[i].length()+1).startsWith(".")) //$NON-NLS-1$
it.remove();
+ }
}
return results;
}
diff --git a/osgi/bundles/org.eclipse.ecf.osgi.services.remoteserviceadmin/src/org/eclipse/ecf/osgi/services/remoteserviceadmin/RemoteServiceAdmin.java b/osgi/bundles/org.eclipse.ecf.osgi.services.remoteserviceadmin/src/org/eclipse/ecf/osgi/services/remoteserviceadmin/RemoteServiceAdmin.java
index 56a1d490f..1a21ac654 100644
--- a/osgi/bundles/org.eclipse.ecf.osgi.services.remoteserviceadmin/src/org/eclipse/ecf/osgi/services/remoteserviceadmin/RemoteServiceAdmin.java
+++ b/osgi/bundles/org.eclipse.ecf.osgi.services.remoteserviceadmin/src/org/eclipse/ecf/osgi/services/remoteserviceadmin/RemoteServiceAdmin.java
@@ -1741,8 +1741,10 @@ public class RemoteServiceAdmin implements
endpointDescriptionProperties.put(
RemoteConstants.ENDPOINT_REMOTESERVICE_FILTER, rsFilter);
+ Map<String, Object> nonReservedProps = PropertiesUtil.copyNonReservedProperties(overridingProperties, endpointDescriptionProperties);
// Finally, copy all non-reserved properties
- return PropertiesUtil.copyNonReservedProperties(overridingProperties, endpointDescriptionProperties);
+ return PropertiesUtil.removePrivateConfigProperties(remoteConfigsSupported, nonReservedProps);
+
}
private Map<String, Object> copyNonReservedProperties(

Back to the top