use of org.apache.aries.subsystem.core.archive.AriesSubsystemParentsHeader in project aries by apache.
the class BasicSubsystem method getParents.
@Override
public Collection<Subsystem> getParents() {
AriesSubsystemParentsHeader header = getDeploymentManifest().getAriesSubsystemParentsHeader();
if (header == null)
return Collections.emptyList();
Collection<Subsystem> result = new ArrayList<Subsystem>(header.getClauses().size());
for (AriesSubsystemParentsHeader.Clause clause : header.getClauses()) {
BasicSubsystem subsystem = Activator.getInstance().getSubsystems().getSubsystemById(clause.getId());
if (subsystem == null)
continue;
result.add(subsystem);
}
return result;
}
use of org.apache.aries.subsystem.core.archive.AriesSubsystemParentsHeader in project aries by apache.
the class SubsystemResource method getParents.
public Collection<BasicSubsystem> getParents() {
if (parent == null) {
AriesSubsystemParentsHeader header = getDeploymentManifest().getAriesSubsystemParentsHeader();
if (header == null)
return Collections.emptyList();
Collection<AriesSubsystemParentsHeader.Clause> clauses = header.getClauses();
Collection<BasicSubsystem> result = new ArrayList<BasicSubsystem>(clauses.size());
Subsystems subsystems = Activator.getInstance().getSubsystems();
for (AriesSubsystemParentsHeader.Clause clause : clauses) {
result.add(subsystems.getSubsystemById(clause.getId()));
}
return result;
}
return Collections.singleton(parent);
}
Aggregations