Search in sources :

Example 6 with SubsystemTypeHeader

use of org.apache.aries.subsystem.core.archive.SubsystemTypeHeader in project aries by apache.

the class RawSubsystemResource method computeSubsystemTypeHeader.

private SubsystemTypeHeader computeSubsystemTypeHeader(SubsystemManifest manifest) {
    SubsystemTypeHeader header = manifest.getSubsystemTypeHeader();
    AriesProvisionDependenciesDirective directive = header.getAriesProvisionDependenciesDirective();
    if (directive != null) {
        // manifest. Validation of the value occurs later.
        return header;
    }
    // The directive was not specified in the original manifest. The value
    // of the parent directive becomes the default.
    SubsystemManifest parentManifest = ((BasicSubsystem) parentSubsystem).getSubsystemManifest();
    SubsystemTypeHeader parentHeader = parentManifest.getSubsystemTypeHeader();
    directive = parentHeader.getAriesProvisionDependenciesDirective();
    header = new SubsystemTypeHeader(header.getValue() + ';' + directive);
    return header;
}
Also used : SubsystemManifest(org.apache.aries.subsystem.core.archive.SubsystemManifest) AriesProvisionDependenciesDirective(org.apache.aries.subsystem.core.archive.AriesProvisionDependenciesDirective) SubsystemTypeHeader(org.apache.aries.subsystem.core.archive.SubsystemTypeHeader)

Aggregations

SubsystemTypeHeader (org.apache.aries.subsystem.core.archive.SubsystemTypeHeader)6 AriesProvisionDependenciesDirective (org.apache.aries.subsystem.core.archive.AriesProvisionDependenciesDirective)3 ProvisionPolicyDirective (org.apache.aries.subsystem.core.archive.ProvisionPolicyDirective)3 SubsystemManifest (org.apache.aries.subsystem.core.archive.SubsystemManifest)3 AriesSubsystem (org.apache.aries.subsystem.AriesSubsystem)1 SubsystemContentHeader (org.apache.aries.subsystem.core.archive.SubsystemContentHeader)1 SubsystemTest (org.apache.aries.subsystem.itests.SubsystemTest)1 Test (org.junit.Test)1 Subsystem (org.osgi.service.subsystem.Subsystem)1 SubsystemException (org.osgi.service.subsystem.SubsystemException)1