OSGi™ Service Platform
Core Specification

Release 4 Version 4.3

org.osgi.service.condpermadmin
Class BundleLocationCondition

java.lang.Object
  extended by org.osgi.service.condpermadmin.BundleLocationCondition

public class BundleLocationCondition
extends java.lang.Object

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.

ThreadSafe

Method Summary
static Condition getCondition(Bundle bundle, ConditionInfo info)
          Constructs a condition that tries to match the passed Bundle's location to the location pattern.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getCondition

public static Condition getCondition(Bundle bundle,
                                     ConditionInfo info)
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.

OSGi™ Service Platform
Core Specification

Release 4 Version 4.3

Copyright © OSGi Alliance (2000, 2012). All Rights Reserved. Licensed under the OSGi Specification License, Version 2.0