Interface ExtensionContext
-
- All Superinterfaces:
LauncherPrepareContext,LauncherRunContext
public interface ExtensionContext extends LauncherPrepareContext, LauncherRunContext
This context object is provided to launcher extensions.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidaddBundle(Integer startLevel, URL file)Add a bundle to be installed by the launcher.voidaddConfiguration(String pid, String factoryPid, Dictionary<String,Object> properties)Add a configuration to be installed by the launchervoidaddFrameworkProperty(String key, String value)Add a framework property to be set by the launcher.voidaddInstallableArtifact(URL file)Add an artifact to be installed by the launcherorg.apache.sling.feature.FeaturegetFeature(org.apache.sling.feature.ArtifactId artifact)Return the feature object for a given Artifact ID.-
Methods inherited from interface org.apache.sling.feature.launcher.spi.LauncherPrepareContext
addAppJar, getArtifactFile, getLogger
-
Methods inherited from interface org.apache.sling.feature.launcher.spi.LauncherRunContext
getBundleMap, getConfigurations, getFrameworkProperties, getInstallableArtifacts, getLogger
-
-
-
-
Method Detail
-
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 pidfactoryPid- The factory pidproperties- 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 IOExceptionReturn 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.
-
-