}
}
}
else if (req.getNamespace().equals(BundleRevision.BUNDLE_NAMESPACE))
{ if (!((BundleProtectionDomain) ((BundleRevisionImpl) cap.getRevision()).getProtectionDomain()).impliesDirect(
new BundlePermission(cap.getRevision().getSymbolicName(), BundlePermission.PROVIDE)) ||
!((reqRevision == null) ||
((BundleProtectionDomain) reqRevision.getProtectionDomain()).impliesDirect(
new BundlePermission(reqRevision.getSymbolicName(), BundlePermission.REQUIRE))
))
{
return true;
}
}
else if (req.getNamespace().equals(BundleRevision.HOST_NAMESPACE))
{
if (!((BundleProtectionDomain) reqRevision.getProtectionDomain())
.impliesDirect(new BundlePermission(
reqRevision.getSymbolicName(),
BundlePermission.FRAGMENT))
|| !((BundleProtectionDomain) ((BundleRevisionImpl) cap.getRevision()).getProtectionDomain())
.impliesDirect(new BundlePermission(
cap.getRevision().getSymbolicName(),
BundlePermission.HOST)))
{
return true;
}