commit | cae9ab8e912a489dfe6552ec5ccc0a0c94680fdd | [log] [tgz] |
---|---|---|
author | David Bosschaert <bosschae@adobe.com> | Tue Nov 06 15:12:07 2018 +0000 |
committer | David Bosschaert <bosschae@adobe.com> | Tue Nov 06 15:12:07 2018 +0000 |
tree | b58797fcc8f1770fa78cb8e87efd7d094c17dc47 | |
parent | 40b24975d6604dcec9d1711ef2771ea34ad95c2f [diff] |
Support inheriting exported packages from regions defined earlier in the feature When exported packages are defined in a region, these are inherited by subsequent regions in the feature file. This is with the exception of the global region, which is 'special'. So if you have: api-regions:JSON|false": [ {"name": "global", "exports": ["com.global"]}, {"name": "deprecated", "exports": ["some.package"]}, {"name": "internal", "exports": ["dont.touch"]}] Then the actual packages in the regions are as follows: global: com.global deprecated: some.package internal: dont.touch, some.package
This component contains extensions relating to the API Regions component. The following extensions are registered via the ServiceLoader mechanism:
org.apache.sling.feature.builder.MergeHandler
Merge handlers are called when features are merged during the aggregation process.
APIRegionMergeHandler
- This handler knows how to merge API Regions extensions and adds the org-feature
key to the api-regions
sections to record what feature this section originally belonged.
org.apache.sling.feature.builder.PostProcessHandler
PostProcessHandlers are called when a feature contains an api-regions
section.
BundleMappingHandler
- This handler creates a mapping file idbsnver.properties
that maps the Artifact ID to a bundle symbolic name and version. A tilde ~
is used in the value of the map to separate BSN and version.
BundleArtifactFeatureHandler
- This handler creates 3 mapping files:
bundles.properties
: maps bundles to the original feature they were in. A bundle could be from more then one feature.features.properties
: maps features to regions. A feature can be in more than one region.regions.properties
: maps regions to packages. A region can expose more than one package.The location of the files created by the BundleArtifactFeatureHandler
handler is stored in a system property with name apiregions.
+ filename. So to obtain the file name of the bundles.properties
file, make the following call:
System.getProperty("apiregions.bundles.properties")