Package org.ops4j.pax.swissbox.property
Class BundleContextPropertyResolver
- java.lang.Object
-
- org.ops4j.util.property.FallbackPropertyResolver
-
- org.ops4j.pax.swissbox.property.BundleContextPropertyResolver
-
- All Implemented Interfaces:
org.ops4j.util.property.PropertyResolver
public class BundleContextPropertyResolver extends org.ops4j.util.property.FallbackPropertyResolverResolves properties by first looking in an optional configured dictionary then if property not found looking in bundle context.- Since:
- 0.1.0, January 16, 2008
- Author:
- Alin Dreghiciu
-
-
Constructor Summary
Constructors Constructor Description BundleContextPropertyResolver(org.osgi.framework.BundleContext bundleContext)Creates a property resolver without a fallback resolver.BundleContextPropertyResolver(org.osgi.framework.BundleContext bundleContext, org.ops4j.util.property.PropertyResolver fallbackResolver)Creates a property resolver with a fallback resolver.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringfindProperty(String propertyName)Resolves a property based on it's name by:
1. if there is a configuration available look for the property;
2. if property is not set or there is no configuration available look for a framework / system property.
-
-
-
Constructor Detail
-
BundleContextPropertyResolver
public BundleContextPropertyResolver(org.osgi.framework.BundleContext bundleContext)
Creates a property resolver without a fallback resolver.- Parameters:
bundleContext- bundle context; cannot be null
-
BundleContextPropertyResolver
public BundleContextPropertyResolver(org.osgi.framework.BundleContext bundleContext, org.ops4j.util.property.PropertyResolver fallbackResolver)Creates a property resolver with a fallback resolver.- Parameters:
bundleContext- bundle context; cannot be nullfallbackResolver- fallback property resolver; can be null
-
-
Method Detail
-
findProperty
public String findProperty(String propertyName)
Resolves a property based on it's name by:
1. if there is a configuration available look for the property;
2. if property is not set or there is no configuration available look for a framework / system property.- Specified by:
findPropertyin classorg.ops4j.util.property.FallbackPropertyResolver- Parameters:
propertyName- property name to be resolved- Returns:
- value of property or null if property is not set or is empty.
-
-