Class FeatureResource

  • All Implemented Interfaces:
    org.osgi.resource.Resource

    public final class FeatureResource
    extends org.apache.felix.utils.resource.ResourceImpl
    An OSGi Resource representing Karaf feature. It has requirements on all its non-dependency (dependency="false") bundles. It'll also use arbitrary capabilities (<feature>/<capability>) and requirements (<feature>/<requirement>). Dependant features (<feature>/<feature>) without dependency="true" will also be added as osgi.identity requirements with type=karaf.feature.
    • Method Detail

      • build

        public static FeatureResource build​(Feature feature,
                                            Conditional conditional,
                                            String featureRange,
                                            Map<String,​? extends org.osgi.resource.Resource> locToRes)
                                     throws org.osgi.framework.BundleException
        Constructs a Resource for conditional of a feature.
        Throws:
        org.osgi.framework.BundleException
      • build

        public static FeatureResource build​(Feature feature,
                                            String featureRange,
                                            Map<String,​? extends org.osgi.resource.Resource> locToRes)
                                     throws org.osgi.framework.BundleException
        Constructs Resource for given non-conditional feature.
        Throws:
        org.osgi.framework.BundleException
      • getFeature

        public Feature getFeature()