Interface ExtensionContext

All Superinterfaces:
LauncherPrepareContext, LauncherRunContext

public interface ExtensionContext extends LauncherPrepareContext, LauncherRunContext
This context object is provided to launcher extensions.
  • Method Details

    • addBundle

      void addBundle(Integer startLevel, URL file)
      Add a bundle to be installed by the launcher.
      Parameters:
      startLevel - The start level for the bundle.
      file - The file with the bundle.
    • addInstallableArtifact

      void addInstallableArtifact(URL file)
      Add an artifact to be installed by the launcher
      Parameters:
      file - The file
    • addConfiguration

      void addConfiguration(String pid, String factoryPid, Dictionary<String,Object> properties)
      Add a configuration to be installed by the launcher
      Parameters:
      pid - The pid
      factoryPid - The factory pid
      properties - The propertis
    • addFrameworkProperty

      void addFrameworkProperty(String key, String value)
      Add a framework property to be set by the launcher.
      Parameters:
      key - The key for the property.
      value - The value for the property.
    • getFeature

      org.apache.sling.feature.Feature getFeature(org.apache.sling.feature.ArtifactId artifact) throws IOException
      Return the feature object for a given Artifact ID. It looks for the requested feature in the list of features provided from the launcher commandline as well as in the configured repositories.
      Parameters:
      artifact - The artifact ID for the feature.
      Returns:
      The Feature Model or null if the artifact cannot be found.
      Throws:
      IOException - If the artifact can be found, but creating a Feature Model out of it causes an exception.