Class KarafExtender


  • public class KarafExtender
    extends java.lang.Object
    Allows Maven repositories, feature repositories and features to boot to be extended using a .d style configuration format.
    Author:
    jwhite
    • Constructor Detail

      • KarafExtender

        public KarafExtender()
    • Method Detail

      • init

        public void init()
                  throws java.lang.InterruptedException
        Throws:
        java.lang.InterruptedException
      • destroy

        public void destroy()
      • getRepositories

        public java.util.List<Repository> getRepositories()
                                                   throws java.io.IOException
        Throws:
        java.io.IOException
      • getFeaturesIn

        public java.util.List<Feature> getFeaturesIn​(java.nio.file.Path featuresBootFile)
                                              throws java.io.IOException
        Throws:
        java.io.IOException
      • getFeaturesBoot

        public java.util.List<Feature> getFeaturesBoot()
                                                throws java.io.IOException
        Throws:
        java.io.IOException
      • filterFeatures

        public void filterFeatures​(java.util.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)