com.buglabs.util
Class ServiceFilterGenerator

java.lang.Object
  extended by com.buglabs.util.ServiceFilterGenerator

public class ServiceFilterGenerator
extends java.lang.Object

To be used by generators.


Constructor Summary
ServiceFilterGenerator()
           
 
Method Summary
static java.lang.String generatePropertiesFilter(java.util.SortedMap propertiesMap)
          (& (prop1=value1) (& (prop2=value1)))
static Filter generateServiceFilter(BundleContext context, java.lang.String[] services)
          Generate a Filter object from an array of Service names and a bundle context.
static java.lang.String generateServiceFilter(java.util.List services)
           
static java.lang.String generateServiceFilter(java.util.SortedMap servicesMap)
          servicesMap is SortedMap> where the key is the service name and the map is a map of service properties (| (& (objectClass=com.buglabs.bug.module.bugbee.pub.IBUGBeeControl) (& (Provider=com.buglabs.bug.module.bugbee.BUGBeeModlet)(Slot=2))) (| (& (objectClass=com.buglabs.module.IModuleControl)) (& (objectClass=org.osgi.service.http.HttpService)(port=8082))))
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ServiceFilterGenerator

public ServiceFilterGenerator()
Method Detail

generateServiceFilter

public static java.lang.String generateServiceFilter(java.util.List services)
Parameters:
services - A set of strings of class names.
Returns:
A LDAP filter string that can be used to construct a Filter.

generateServiceFilter

public static Filter generateServiceFilter(BundleContext context,
                                           java.lang.String[] services)
                                    throws InvalidSyntaxException
Generate a Filter object from an array of Service names and a bundle context.

Parameters:
context -
services -
Returns:
Throws:
InvalidSyntaxException

generateServiceFilter

public static java.lang.String generateServiceFilter(java.util.SortedMap servicesMap)
servicesMap is SortedMap> where the key is the service name and the map is a map of service properties (| (& (objectClass=com.buglabs.bug.module.bugbee.pub.IBUGBeeControl) (& (Provider=com.buglabs.bug.module.bugbee.BUGBeeModlet)(Slot=2))) (| (& (objectClass=com.buglabs.module.IModuleControl)) (& (objectClass=org.osgi.service.http.HttpService)(port=8082))))


generatePropertiesFilter

public static java.lang.String generatePropertiesFilter(java.util.SortedMap propertiesMap)
(& (prop1=value1) (& (prop2=value1)))

Parameters:
propertiesMap -
Returns: