org.sape.carbon.core.config.interceptor
Interface ConfigurationInterceptor

All Known Implementing Classes:
DefaultConfigurationInterceptor

public interface ConfigurationInterceptor

Defines the methods exposed by the ComponentProxy that deal with the manipulation of a components configuration. Implementations of this interface need to support the notion of live vs. working configurations. Live configurations contain the settings that are currently in use by a component. Working configurations contain the settings that are in an intermediate and potentially invalid state. Working configurations become live configurations when applyConfiguration is called. They are thrown away when revertConfiguration is called. Copyright 2002 Sapient

Since:
carbon 1.0
Version:
$Revision: 1.5 $($Author: dvoet $ / $Date: 2003/05/05 21:21:18 $)
Author:
Greg Hinkle, January 2002

Method Summary
 void applyConfiguration()
          Makes the current working configuration live.
 ComponentConfiguration getLiveConfiguration()
          Gets snapshot of the live copy of the component's configuration
 ComponentConfiguration getWorkingConfiguration()
          Gets snapshot of the working copy of the component's configuration
 void persistConfiguration()
          Persists the current live configuration in the Config Service.
 void refreshConfiguration()
          Same as revertConfiguration, but the configuration node containing this component's configuration is refreshed first.
 void revertConfiguration()
          Reverts the components live configuration back to its state as of the last call to persistConfiguration or the loading of the component if persistConfiguration was never called.
 

Method Detail

revertConfiguration

public void revertConfiguration()
Reverts the components live configuration back to its state as of the last call to persistConfiguration or the loading of the component if persistConfiguration was never called. The working configuration is discarded.


applyConfiguration

public void applyConfiguration()
Makes the current working configuration live.


persistConfiguration

public void persistConfiguration()
                          throws ConfigurationException
Persists the current live configuration in the Config Service.

Throws:
ConfigurationException - indictes an error persisting the configuration

getWorkingConfiguration

public ComponentConfiguration getWorkingConfiguration()
Gets snapshot of the working copy of the component's configuration

Returns:
ComponentConfiguration the object implementing the component's configuration interface that represents the working copy of the component's configuration

getLiveConfiguration

public ComponentConfiguration getLiveConfiguration()
Gets snapshot of the live copy of the component's configuration

Returns:
ComponentConfiguration the object implementing the component's configuration interface that represents the live copy of the component's configuration

refreshConfiguration

public void refreshConfiguration()
Same as revertConfiguration, but the configuration node containing this component's configuration is refreshed first.



Copyright 1999-2003 Sapient Corporation. All Rights Reserved.