Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.eclipse.gemini.blueprint.compendium.internal.cm
Class CMUtils

    java.lang.Object
      org.eclipse.gemini.blueprint.compendium.internal.cm.CMUtils

    public abstract class CMUtils

extends Object

Utility class for the Configuration Admin package.

Author:
  Costin Leau

Constructor Summary
`CMUtils()`

Method Summary
`static void` | `applyMapOntoInstance(Object instance, Map<String,?> properties, org.springframework.beans.factory.support.AbstractBeanFactory beanFactory)` Injects the properties from the given Map to the given object.
`static void` | `bulkUpdate(org.eclipse.gemini.blueprint.compendium.internal.cm.UpdateCallback callback, Collection<?> instances, Map<?,?> properties)`
`static org.eclipse.gemini.blueprint.compendium.internal.cm.UpdateCallback` | `createCallback(boolean autowireOnUpdate, String methodName, org.springframework.beans.factory.BeanFactory beanFactory)`
`static Map` | `getConfiguration(org.osgi.framework.BundleContext bundleContext, String pid, long initTimeout)` Returns a map containing the Configuration Admin entry with given pid.
`static org.osgi.framework.ServiceRegistration` | `registerManagedService(org.osgi.framework.BundleContext bundleContext, org.osgi.service.cm.ManagedService listener, String pid)`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### CMUtils

    public CMUtils()

Method Detail

### applyMapOntoInstance

    public static void applyMapOntoInstance(Object instance,
                                            Map<String,?> properties,
                                            org.springframework.beans.factory.support.AbstractBeanFactory beanFactory)

  Injects the properties from the given Map to the given object. Additionally, a bean factory can be passed in for copying property editors inside the injector.

  Parameters:
    `instance` - bean instance to configure
    `properties` -
    `beanFactory` -

### bulkUpdate

    public static void bulkUpdate(org.eclipse.gemini.blueprint.compendium.internal.cm.UpdateCallback callback,
                                  Collection<?> instances,
                                  Map<?,?> properties)

### createCallback

    public static org.eclipse.gemini.blueprint.compendium.internal.cm.UpdateCallback createCallback(boolean autowireOnUpdate,
                                                                                                    String methodName,
                                                                                                    org.springframework.beans.factory.BeanFactory beanFactory)

### getConfiguration

    public static Map getConfiguration(org.osgi.framework.BundleContext bundleContext,
                                       String pid,
                                       long initTimeout)
                                throws IOException

  Returns a map containing the Configuration Admin entry with given pid. Waits until a non-null (initialized) object is returned if initTimeout is bigger then 0.

  Parameters:
    `bundleContext` -
    `pid` -
    `initTimeout` -
  Returns:
  Throws:
    `IOException`

### registerManagedService

    public static org.osgi.framework.ServiceRegistration registerManagedService(org.osgi.framework.BundleContext bundleContext,
                                                                                org.osgi.service.cm.ManagedService listener,
                                                                                String pid)

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2006-2012. All Rights Reserved.