commit | 129462e6157909015c4e53f206268b57dbf74a4b | [log] [tgz] |
---|---|---|
author | Bertrand Delacretaz <bdelacretaz@apache.org> | Wed Jul 28 16:12:54 2021 +0200 |
committer | Bertrand Delacretaz <bdelacretaz@apache.org> | Wed Jul 28 16:12:54 2021 +0200 |
tree | e9ad37b051c2dbeecf1e7e6715194eaca4b9e937 | |
parent | 6db9e8c408ff074c8541be9e206dc7fc84dc556e [diff] |
SLING-10676 - add or update SECURITY.md
This is a simple OSGi service which is able to convert, given a BundleContext
instance, a currently running OSGi container to an Apache Sling Feature Model definition.
APIs are really simple: it is necessary first to obtain the RuntimeEnvironment2FeatureModel
instance from the OSGi Service Registry, then
import org.apache.sling.feature.r2f.*; @Reference RuntimeEnvironment2FeatureModel generator; ... Feature runtimeFeature = generator.getRunningFeature();
Currently version will include in the generated Feature Model bundles
and configurations
only, which are the only informations that can be extracted from a BundleContext
instance.
The RuntimeEnvironment2FeatureModel
OSGi service is also able to retrieve the (assembled) Feature used to launch the platform:
import org.apache.sling.feature.r2f.*; @Reference RuntimeEnvironment2FeatureModel generator; ... Feature launchFeature = generator.getLaunchFeature();
## Upgrade Feature
The RuntimeEnvironment2FeatureModel
OSGi service is also able to compute the upgrade Feature which prototypes from the Feature used to launch the platform and that targets the runtime Feature:
import org.apache.sling.feature.r2f.*; @Reference RuntimeEnvironment2FeatureModel generator; ... Feature launchFeature = generator.getLaunch2RuntimeUpgradingFeature();
Finally, the RuntimeEnvironment2FeatureModel
OSGi service is also able to compute the real runtime Feature which is assembled from the Feature used to launch the platform and that targets the runtime Feature:
import org.apache.sling.feature.r2f.*; @Reference RuntimeEnvironment2FeatureModel generator; ... Feature launchFeature = generator.getLaunch2RuntimeUpgradingFeature();