use of org.apache.aries.subsystem.core.internal.TestCapability in project aries by apache.
the class SubTestRepository method findProviders.
@Override
public Map<Requirement, Collection<Capability>> findProviders(Collection<? extends Requirement> requirements) {
Map<Requirement, Collection<Capability>> res = new HashMap<Requirement, Collection<Capability>>();
for (Requirement req : requirements) {
if (req.getNamespace().equals("ns1") && req.getDirectives().equals(Collections.singletonMap("filter", "(x=y)"))) {
TestCapability cap = new TestCapability("ns1", Collections.<String, Object>singletonMap("x", "y"));
Collection<Capability> caps = Collections.<Capability>singleton(cap);
res.put(req, caps);
}
}
return res;
}
Aggregations