Class RegionLauncherExtension

java.lang.Object
org.apache.sling.feature.extension.apiregions.launcher.RegionLauncherExtension
All Implemented Interfaces:
org.apache.sling.feature.launcher.spi.extensions.ExtensionHandler

public class RegionLauncherExtension extends Object implements org.apache.sling.feature.launcher.spi.extensions.ExtensionHandler
The RegionLauncherExtension class implements the ExtensionHandler interface to handle the API regions extension in the Sling feature model.

This class processes the API regions extension, generates temporary files for feature regions and region packages, and adds the corresponding framework properties to the extension context.

It defines two constants for the filenames of the generated properties files:

The handle method performs the following steps:

  1. Checks if the extension name matches the expected API regions extension name.
  2. Creates a temporary directory for storing the generated properties files.
  3. Parses the API regions from the extension's JSON structure.
  4. Saves the feature regions and region packages mappings to the respective properties files.
  5. Adds the generated properties files as framework properties to the extension context.
See Also:
  • Field Details

  • Constructor Details

    • RegionLauncherExtension

      public RegionLauncherExtension()
  • Method Details

    • handle

      public boolean handle(org.apache.sling.feature.launcher.spi.extensions.ExtensionContext extensionContext, org.apache.sling.feature.Extension extension) throws Exception
      Specified by:
      handle in interface org.apache.sling.feature.launcher.spi.extensions.ExtensionHandler
      Throws:
      Exception