I can show you my workaround to illustrate what I mean:
...
repository = repoAdmin.addRepository(obrfile.toURI().toURL());
resources = repository.getResources();
for(Resource resource : resources) {
Capability[] capabilities = resource.getCapabilities();
for(Capability capability : capabilities) {
if(capability.getName().equals("fragment")) {
Map<String,Object> properties = capability.getPropertiesAsMap();
if(properties.containsKey("host")) {
Object value = capability.getPropertiesAsMap().get("host");
if(value instanceof String) {
if(hostsymbolicname.equals(value)) {
discoveredresources.add(resource);
}
}
}
}
}
}
...
...but it would be fine if it looks like this:
String filter = "(host=my.host)";
repoAdmin.discoverResources(filter);
Regards
Roland
--
View this message in context:
http://apache-felix.18485.x6.nabble.com/OBR-discover-resources-which-have-a-particular-host-tp5004680p5004686.html
Sent from the Apache Felix - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]