Interface ExtensionContext
- All Superinterfaces:
LauncherPrepareContext,LauncherRunContext
This context object is provided to launcher extensions.
-
Method Summary
Modifier and TypeMethodDescriptionvoidAdd 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, getLoggerMethods inherited from interface org.apache.sling.feature.launcher.spi.LauncherRunContext
getBundleMap, getConfigurations, getFrameworkProperties, getInstallableArtifacts, getLogger
-
Method Details
-
addBundle
Add a bundle to be installed by the launcher.- Parameters:
startLevel- The start level for the bundle.file- The file with the bundle.
-
addInstallableArtifact
Add an artifact to be installed by the launcher- Parameters:
file- The file
-
addConfiguration
Add a configuration to be installed by the launcher- Parameters:
pid- The pidfactoryPid- The factory pidproperties- The propertis
-
addFrameworkProperty
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.
-