use of org.apache.aries.subsystem.core.archive.ProvisionResourceHeader in project aries by apache.
the class BasicSubsystem method computeDependenciesPostInstallation.
void computeDependenciesPostInstallation(Coordination coordination) throws IOException {
resource.computeDependencies(null, coordination);
ProvisionResourceHeader header = resource.computeProvisionResourceHeader();
setDeploymentManifest(new DeploymentManifest.Builder().manifest(deploymentManifest).header(header).build());
}
use of org.apache.aries.subsystem.core.archive.ProvisionResourceHeader in project aries by apache.
the class SubsystemResource method computeDependencies.
void computeDependencies(DeploymentManifest manifest, Coordination coordination) {
if (manifest == null) {
computeDependencies(getSubsystemManifest(), coordination);
} else {
ProvisionResourceHeader header = manifest.getProvisionResourceHeader();
if (header == null)
return;
for (ProvisionResourceHeader.Clause clause : header.getClauses()) {
Resource resource = findDependency(clause);
if (resource == null)
throw new SubsystemException("A required dependency could not be found. This means the resource was either missing or not recognized as a supported resource format due to, for example, an invalid bundle manifest or blueprint XML file. Turn on debug logging for more information. The resource was: " + resource);
addDependency(resource);
}
}
}
use of org.apache.aries.subsystem.core.archive.ProvisionResourceHeader in project aries by apache.
the class Utils method isDependency.
public static boolean isDependency(BasicSubsystem subsystem, Resource resource) {
DeploymentManifest manifest = subsystem.getDeploymentManifest();
if (manifest == null)
return false;
ProvisionResourceHeader header = manifest.getProvisionResourceHeader();
if (header == null)
return false;
return header.contains(resource);
}
Aggregations