commit | 89c977cbaea228f6d2ca9829f9d08cdb05e32b19 | [log] [tgz] |
---|---|---|
author | David Bosschaert <bosschae@adobe.com> | Fri Feb 08 13:19:29 2019 -0800 |
committer | David Bosschaert <bosschae@adobe.com> | Fri Feb 08 15:59:19 2019 -0800 |
tree | 8735503c8450bee3e01d09a76cf5ae48fd894146 | |
parent | 9bc09e58ae2a7c0ce97d6ea3b3b08d31fedc8e76 [diff] |
Support looking up properties resources via class loader and from URLs A new framework property 'sling.feature.apiregions.location' is introduced to identify the directory where the apiregions properties files can be found. The system property prefix 'apiregions.' has been changed to 'sling.feature.apiregions.resource.' Both properties now support URLs as well as file paths. Additionally, the 'classloader://' URL pseudo-protocol is introduced which looks up the location provided using the classloader’s getResource().
The API Regions runtime component is implemented as an OSGi Framework Extension bundle. This ensures that the runtime component is always present early in the startup process.
This component registers an OSGi resolver hook service which enforces the API regions at runtime. The component looks for properties files that provide the configuration of the API regions. The properties files are generated by the org.apache.sling.feature.extension.apiregions
component during the extension post-processing.
As the component has no dependencies on any other component, the properties files are looked up via System Properties lookups:
apiregions.idbsnver.properties
- provides the location of the idbsnver.properties
file.apiregions.bundles.properties
- provides the location of the bundles.properties
file.apiregions.features.properties
- provides the location of the features.properties
file.apiregions.regions.properties
- provides the location of the regions.properties
file.The component is enabled by setting the following framework property:
org.apache.sling.feature.apiregions.regions=*
If this framework property is not set the component will be disabled.