Class FeatureResource
- java.lang.Object
-
- org.apache.felix.utils.resource.ResourceImpl
-
- org.apache.karaf.features.internal.resolver.FeatureResource
-
- All Implemented Interfaces:
org.osgi.resource.Resource
public final class FeatureResource extends org.apache.felix.utils.resource.ResourceImpl
An OSGiResource
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>
) withoutdependency="true"
will also be added asosgi.identity
requirements withtype=karaf.feature
.
-
-
Field Summary
Fields Modifier and Type Field Description static String
CONDITIONAL_TRUE
static String
REQUIREMENT_CONDITIONAL_DIRECTIVE
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected static void
addDependency(FeatureResource resource, Dependency dep, String featureRange)
protected static void
addDependency(FeatureResource resource, Dependency dep, String featureRange, boolean condition)
static FeatureResource
build(Feature feature, String featureRange, Map<String,? extends org.osgi.resource.Resource> locToRes)
ConstructsResource
for given non-conditional feature.static FeatureResource
build(Feature feature, Conditional conditional, String featureRange, Map<String,? extends org.osgi.resource.Resource> locToRes)
Constructs aResource
for conditional of a feature.Feature
getFeature()
-
-
-
Field Detail
-
REQUIREMENT_CONDITIONAL_DIRECTIVE
public static final String REQUIREMENT_CONDITIONAL_DIRECTIVE
- See Also:
- Constant Field Values
-
CONDITIONAL_TRUE
public static final String CONDITIONAL_TRUE
- See Also:
- Constant Field Values
-
-
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 aResource
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
ConstructsResource
for given non-conditional feature.- Throws:
org.osgi.framework.BundleException
-
addDependency
protected static void addDependency(FeatureResource resource, Dependency dep, String featureRange)
-
addDependency
protected static void addDependency(FeatureResource resource, Dependency dep, String featureRange, boolean condition)
-
getFeature
public Feature getFeature()
-
-