Package org.opennms.karaf.extender
Class KarafExtender
- java.lang.Object
-
- org.opennms.karaf.extender.KarafExtender
-
public class KarafExtender extends Object
Allows Maven repositories, feature repositories and features to boot to be extended using a .d style configuration format.- Author:
- jwhite
-
-
Field Summary
Fields Modifier and Type Field Description static StringFEATURES_BOOTstatic StringFEATURES_URIstatic StringWAIT_FOR_KAR_ATTRIBUTE
-
Constructor Summary
Constructors Constructor Description KarafExtender()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddestroy()voidfilterFeatures(List<Feature> features)Any feature that starts with '!' will be removed from the list, and will remove all other features with the same name and version.List<Feature>getFeaturesBoot()List<Feature>getFeaturesIn(Path featuresBootFile)List<Repository>getRepositories()voidinit()voidsetConfigurationAdmin(org.osgi.service.cm.ConfigurationAdmin configurationAdmin)voidsetFeaturesService(org.apache.karaf.features.FeaturesService featuresService)voidsetKarService(org.apache.karaf.kar.KarService karService)voidsetMavenResolver(org.ops4j.pax.url.mvn.MavenResolver mavenResolver)
-
-
-
Field Detail
-
WAIT_FOR_KAR_ATTRIBUTE
public static final String WAIT_FOR_KAR_ATTRIBUTE
- See Also:
- Constant Field Values
-
FEATURES_URI
public static final String FEATURES_URI
- See Also:
- Constant Field Values
-
FEATURES_BOOT
public static final String FEATURES_BOOT
- See Also:
- Constant Field Values
-
-
Method Detail
-
init
public void init() throws InterruptedException- Throws:
InterruptedException
-
destroy
public void destroy()
-
getRepositories
public List<Repository> getRepositories() throws IOException
- Throws:
IOException
-
getFeaturesIn
public List<Feature> getFeaturesIn(Path featuresBootFile) throws IOException
- Throws:
IOException
-
getFeaturesBoot
public List<Feature> getFeaturesBoot() throws IOException
- Throws:
IOException
-
filterFeatures
public void filterFeatures(List<Feature> features)
Any feature that starts with '!' will be removed from the list, and will remove all other features with the same name and version. i.e. if the feature list contains:feature-a feature-b !feature-b !feature-c
after calling this function, the list will contain:feature-a
- Parameters:
features-
-
setConfigurationAdmin
public void setConfigurationAdmin(org.osgi.service.cm.ConfigurationAdmin configurationAdmin)
-
setMavenResolver
public void setMavenResolver(org.ops4j.pax.url.mvn.MavenResolver mavenResolver)
-
setFeaturesService
public void setFeaturesService(org.apache.karaf.features.FeaturesService featuresService)
-
setKarService
public void setKarService(org.apache.karaf.kar.KarService karService)
-
-