Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'osgi/bundles/org.eclipse.ecf.osgi.services.remoteserviceadmin/src/org/eclipse/ecf/internal/osgi/services/remoteserviceadmin/PropertiesUtil.java')
-rw-r--r--osgi/bundles/org.eclipse.ecf.osgi.services.remoteserviceadmin/src/org/eclipse/ecf/internal/osgi/services/remoteserviceadmin/PropertiesUtil.java28
1 files changed, 20 insertions, 8 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 486c30c34..e0fc1b684 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
@@ -36,6 +36,11 @@ public class PropertiesUtil {
// OSGi properties
org.osgi.framework.Constants.OBJECTCLASS,
org.osgi.framework.Constants.SERVICE_ID,
+ // Adding these for bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=433799
+ // Adding them as strings because old version of Constants class (pre R6)
+ // Don't have them
+ "service.bundleid", //$NON-NLS-1$
+ "service.scope", //$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,
@@ -59,7 +64,9 @@ public class PropertiesUtil {
RemoteConstants.DISCOVERY_SCOPE,
RemoteConstants.DISCOVERY_SERVICE_NAME,
RemoteConstants.ENDPOINT_CONNECTTARGET_ID,
+ RemoteConstants.ENDPOINT_ID,
RemoteConstants.ENDPOINT_CONTAINER_ID_NAMESPACE,
+ RemoteConstants.ENDPOINT_TIMESTAMP,
RemoteConstants.ENDPOINT_IDFILTER_IDS,
RemoteConstants.ENDPOINT_REMOTESERVICE_FILTER,
RemoteConstants.SERVICE_EXPORTED_CONTAINER_CONNECT_CONTEXT,
@@ -117,15 +124,11 @@ public class PropertiesUtil {
return getExportedInterfaces(serviceReference);
}
- private static String[] getExportedInterfaces(
- ServiceReference serviceReference, Object propValue) {
- if (propValue == null)
- return null;
- String[] objectClass = (String[]) serviceReference
- .getProperty(org.osgi.framework.Constants.OBJECTCLASS);
+ public static String[] getMatchingInterfaces(String[] origin, Object propValue) {
+ if (propValue == null || origin == null) return null;
boolean wildcard = propValue.equals("*"); //$NON-NLS-1$
if (wildcard)
- return objectClass;
+ return origin;
else {
final String[] stringArrayValue = getStringArrayFromPropertyValue(propValue);
if (stringArrayValue == null)
@@ -133,11 +136,20 @@ public class PropertiesUtil {
else if (stringArrayValue.length == 1
&& stringArrayValue[0].equals("*")) { //$NON-NLS-1$
// this will support the idiom: new String[] { "*" }
- return objectClass;
+ return origin;
} else
return stringArrayValue;
}
}
+
+ private static String[] getExportedInterfaces(
+ ServiceReference serviceReference, Object propValue) {
+ if (propValue == null)
+ return null;
+ String[] objectClass = (String[]) serviceReference
+ .getProperty(org.osgi.framework.Constants.OBJECTCLASS);
+ return getMatchingInterfaces(objectClass,propValue);
+ }
public static String[] getExportedInterfaces(
ServiceReference serviceReference) {

Back to the top