Package org.osgi.service.condpermadmin
Class BundleLocationCondition
java.lang.Object
org.osgi.service.condpermadmin.BundleLocationCondition
Condition to test if the location of a bundle matches or does not match a
pattern. Since the bundle's location cannot be changed, this condition is
immutable.
Pattern matching is done according to the filter string matching rules.
-
Method Summary
Modifier and TypeMethodDescriptionstatic Condition
getCondition
(Bundle bundle, ConditionInfo info) Constructs a condition that tries to match the passed Bundle's location to the location pattern.
-
Method Details
-
getCondition
Constructs a condition that tries to match the passed Bundle's location to the location pattern.- Parameters:
bundle
- The Bundle being evaluated.info
- The ConditionInfo from which to construct the condition. The ConditionInfo must specify one or two arguments. The first argument of the ConditionInfo specifies the location pattern against which to match the bundle location. Matching is done according to the filter string matching rules. Any '*' characters in the first argument are used as wildcards when matching bundle locations unless they are escaped with a '\' character. The Condition is satisfied if the bundle location matches the pattern. The second argument of the ConditionInfo is optional. If a second argument is present and equal to "!", then the satisfaction of the Condition is negated. That is, the Condition is satisfied if the bundle location does NOT match the pattern. If the second argument is present but does not equal "!", then the second argument is ignored.- Returns:
- Condition object for the requested condition.
-