/** * Checks if a given filter is matching some service properties possibly provided by a component */ private boolean servicesMatches(Component component, Filter servicesFilter) { boolean match = false; if (servicesFilter != null) { String[] services = ((ComponentDeclaration) component).getServices(); if (services != null) { Dictionary<String, Object> properties = component.getServiceProperties(); if (properties == null) { properties = new Hashtable<String, Object>(); } if (properties.get(Constants.OBJECTCLASS) == null) { properties.put(Constants.OBJECTCLASS, services); } match = servicesFilter.match(properties); } } return match; }