use of aQute.bnd.deployer.repository.CapabilityIndex in project bndtools by bndtools.
the class WorkspaceR5Repository method findProviders.
@Override
public Map<Requirement, Collection<Capability>> findProviders(Collection<? extends Requirement> requirements) {
Map<Requirement, Collection<Capability>> result = new HashMap<Requirement, Collection<Capability>>();
for (Requirement requirement : requirements) {
List<Capability> matches = new LinkedList<Capability>();
result.put(requirement, matches);
for (Entry<IProject, CapabilityIndex> entry : projectMap.entrySet()) {
IProject project = entry.getKey();
if (project.exists() && project.isOpen()) {
CapabilityIndex capabilityIndex = entry.getValue();
capabilityIndex.appendMatchingCapabilities(requirement, matches);
}
}
}
return result;
}
use of aQute.bnd.deployer.repository.CapabilityIndex in project bndtools by bndtools.
the class WorkspaceR5Repository method addResource.
private void addResource(IProject project, Resource resource) {
CapabilityIndex index = projectMap.get(project);
if (index == null) {
index = new CapabilityIndex();
projectMap.put(project, index);
}
index.addResource(resource);
}
Aggregations