use of org.apache.aries.subsystem.core.archive.RequireCapabilityRequirement in project aries by apache.
the class SubsystemResource method setImportIsolationPolicy.
private void setImportIsolationPolicy(RegionFilterBuilder builder, RequireCapabilityHeader header) throws InvalidSyntaxException {
if (header == null)
return;
for (RequireCapabilityHeader.Clause clause : header.getClauses()) {
RequireCapabilityRequirement requirement = new RequireCapabilityRequirement(clause, this);
String policy = requirement.getNamespace();
String filter = requirement.getDirectives().get(RequireCapabilityRequirement.DIRECTIVE_FILTER);
if (filter == null)
// A null filter directive means the requirement matches any
// capability from the same namespace.
builder.allowAll(policy);
else
// Otherwise, the capabilities must be filtered accordingly.
builder.allow(policy, filter);
}
}
Aggregations