commit | 7542f36533ee0d9ce725a6c8f129a1a7587eed44 | [log] [tgz] |
---|---|---|
author | Guillaume Nodet <gnodet@apache.org> | Fri Feb 26 00:10:32 2010 +0000 |
committer | Guillaume Nodet <gnodet@apache.org> | Fri Feb 26 00:10:32 2010 +0000 |
tree | be84afb2f49025a0df6938c63537abab43fcc0f2 | |
parent | cde01fbd7990fb1a981f45c9c0bc9fecd509b73e [diff] |
FELIX-2127: improve explanations by adding a way to link the requirement to the requesting resource git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@916502 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/bundlerepository/src/main/java/org/apache/felix/bundlerepository/RequirementImpl.java b/bundlerepository/src/main/java/org/apache/felix/bundlerepository/RequirementImpl.java index df44aea..6c42ec8 100644 --- a/bundlerepository/src/main/java/org/apache/felix/bundlerepository/RequirementImpl.java +++ b/bundlerepository/src/main/java/org/apache/felix/bundlerepository/RequirementImpl.java
@@ -22,9 +22,11 @@ import org.osgi.framework.InvalidSyntaxException; import org.osgi.service.obr.Capability; import org.osgi.service.obr.Requirement; +import org.osgi.service.obr.Resource; public class RequirementImpl implements Requirement { + private Resource m_resource; private String m_name = null; private boolean m_extend = false; private boolean m_multiple = false; @@ -36,6 +38,16 @@ { } + public Resource getResource() + { + return m_resource; + } + + public void setResource(Resource resource) + { + m_resource = resource; + } + public synchronized String getName() { return m_name;
diff --git a/bundlerepository/src/main/java/org/apache/felix/bundlerepository/ResourceImpl.java b/bundlerepository/src/main/java/org/apache/felix/bundlerepository/ResourceImpl.java index 4b06b74..fd454f8 100644 --- a/bundlerepository/src/main/java/org/apache/felix/bundlerepository/ResourceImpl.java +++ b/bundlerepository/src/main/java/org/apache/felix/bundlerepository/ResourceImpl.java
@@ -135,6 +135,7 @@ protected void addRequire(Requirement req) { + ((RequirementImpl) req).setResource(this); m_reqList.add(req); }