org.eclipse.corona.core.resources
Interface IConfigurationManager

All Known Implementing Classes:
ConfigurationManager

public interface IConfigurationManager

Configuration manager objects, manages corona's coniguration factory objects. This iterface is "Factory" class for IConfigurationFactory objects. The main method updateConfigurationFactory(String) creates new IConfigurationFactory object depeds on given location string, if such object cannot be created than NullConfigurationFactory is returned.

Manager is registered as service, and it can be retrieved in following way:
  ServiceReference sr = Activator.getBundleContext().getServiceReference(IConfigurationManager.class.getName());
    if (sr != null) {
      Object o = Activator.getBundleContext().getService(sr);
      if ( o instanceof IConfigurationManager) {
        IConfigurationManager cf = (IConfigurationManager) o;
        ...
      }
    }
  ...

Author:
cwpl-pjaworow

Method Summary
 void addPropertyChangeListener(java.beans.PropertyChangeListener l)
          Adds a configuration listener to configuration manager object.
 IConfigurationFactory getCurrentConfigurationFactory()
          Method retrieves current configuration factory object.
 void removePropertyChangeListener(java.beans.PropertyChangeListener l)
          Removes configuration listeners from listeners list.
 IConfigurationFactory updateConfigurationFactory(java.lang.String location)
          Method creates new IConfigurationFactory by given location string.
 

Method Detail

updateConfigurationFactory

IConfigurationFactory updateConfigurationFactory(java.lang.String location)
Method creates new IConfigurationFactory by given location string. Method also informs registered listeners that configuration was changed.

Parameters:
location - new configuration location.
Returns:
newly created configuration factory object.

addPropertyChangeListener

void addPropertyChangeListener(java.beans.PropertyChangeListener l)
Adds a configuration listener to configuration manager object. Listeres will be informed of configuration factory update.

Parameters:
l - Configuration store change listener.

removePropertyChangeListener

void removePropertyChangeListener(java.beans.PropertyChangeListener l)
Removes configuration listeners from listeners list.

Parameters:
l - Configuration store change listener.

getCurrentConfigurationFactory

IConfigurationFactory getCurrentConfigurationFactory()
Method retrieves current configuration factory object.

Returns:
Currelty used configuration factory object.

Copyright 2006 IBM Corporation and others.
All Rights Reserved.