org.apache.felix.scr.impl.config
Class MetaTypeProviderImpl

java.lang.Object
  extended by org.apache.felix.scr.impl.config.MetaTypeProviderImpl
All Implemented Interfaces:
ManagedService, MetaTypeProvider

public class MetaTypeProviderImpl
extends Object
implements MetaTypeProvider, ManagedService


Constructor Summary
MetaTypeProviderImpl(int logLevel, boolean factoryEnabled, ManagedService delegatee)
           
 
Method Summary
 String[] getLocales()
          Return a list of available locales.
 ObjectClassDefinition getObjectClassDefinition(String id, String locale)
          Returns an object class definition for the specified id localized to the specified locale.
 void updated(Dictionary properties)
          Update the configuration for a Managed Service.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MetaTypeProviderImpl

public MetaTypeProviderImpl(int logLevel,
                            boolean factoryEnabled,
                            ManagedService delegatee)
Method Detail

updated

public void updated(Dictionary properties)
             throws ConfigurationException
Description copied from interface: ManagedService
Update the configuration for a Managed Service.

When the implementation of updated(Dictionary) detects any kind of error in the configuration properties, it should create a new ConfigurationException which describes the problem. This can allow a management system to provide useful information to a human administrator.

If this method throws any other Exception, the Configuration Admin service must catch it and should log it.

The Configuration Admin service must call this method asynchronously which initiated the callback. This implies that implementors of Managed Service can be assured that the callback will not take place during registration when they execute the registration in a synchronized method.

Specified by:
updated in interface ManagedService
Parameters:
properties - A copy of the Configuration properties, or null. This argument must not contain the "service.bundleLocation" property. The value of this property may be obtained from the Configuration.getBundleLocation method.
Throws:
ConfigurationException - when the update fails

getLocales

public String[] getLocales()
Description copied from interface: MetaTypeProvider
Return a list of available locales. The results must be names that consists of language [ _ country [ _ variation ]] as is customary in the Locale class.

Specified by:
getLocales in interface MetaTypeProvider
Returns:
An array of locale strings or null if there is no locale specific localization can be found.
See Also:
MetaTypeProvider.getLocales()

getObjectClassDefinition

public ObjectClassDefinition getObjectClassDefinition(String id,
                                                      String locale)
Description copied from interface: MetaTypeProvider
Returns an object class definition for the specified id localized to the specified locale.

The locale parameter must be a name that consists of language[ "_" country[ "_" variation] ] as is customary in the Locale class. This Locale class is not used because certain profiles do not contain it.

Specified by:
getObjectClassDefinition in interface MetaTypeProvider
Parameters:
id - The ID of the requested object class. This can be a pid or factory pid returned by getPids or getFactoryPids.
locale - The locale of the definition or null for default locale.
Returns:
A ObjectClassDefinition object.
See Also:
MetaTypeProvider.getObjectClassDefinition(java.lang.String, java.lang.String)


Copyright © 2011 Apache Software Foundation. All Rights Reserved.