org.apache.geronimo.system.configuration
Class SwitchableLocalAttributeManager

java.lang.Object
  extended by org.apache.geronimo.system.configuration.LocalAttributeManager
      extended by org.apache.geronimo.system.configuration.SwitchableLocalAttributeManager
All Implemented Interfaces:
GBeanLifecycle, ManageableAttributeStore, PersistentConfigurationList, SwitchablePersistentConfigurationList, LocalPluginAttributeStore, PluginAttributeStore

public class SwitchableLocalAttributeManager
extends LocalAttributeManager
implements SwitchablePersistentConfigurationList


Field Summary
static GBeanInfo GBEAN_INFO
           
 
Fields inherited from interface org.apache.geronimo.kernel.config.PersistentConfigurationList
PERSISTENT_CONFIGURATION_LIST
 
Fields inherited from interface org.apache.geronimo.kernel.config.ManageableAttributeStore
ATTRIBUTE_STORE
 
Constructor Summary
SwitchableLocalAttributeManager(String configFile, String substitutionsFile, String configSubstitutionsPrefix, boolean readOnly, ServerInfo serverInfo)
           
 
Method Summary
 void addConfiguration(Artifact configurationName)
          Adds a configuration to the list, but does not mark it as started.
static GBeanInfo getGBeanInfo()
           
 boolean isOnline()
           
 void migrateConfiguration(Artifact oldName, Artifact newName, Configuration configuration)
          Migrates settings from an old version of a configuration to a newer version of the configuration.
 void removeConfiguration(Artifact configName)
          Removes all record of the specified configuration from the configuration list.
 List<Artifact> restore()
           
 void setOnline(boolean online)
           
 void startConfiguration(Artifact configurationName)
          Indicates that the configuration should be started when the server is started.
 void stopConfiguration(Artifact configName)
          Indicates that the configuration should not be started when the server is started.
 
Methods inherited from class org.apache.geronimo.system.configuration.LocalAttributeManager
addConfigSubstitutions, addGBean, applyOverrides, doFail, doStart, doStop, getConfigFile, getConfigSubstitutionsFile, getConfigSubstitutionsPrefix, getListedConfigurations, hasGBeanAttributes, isKernelFullyStarted, isReadOnly, load, save, setKernelFullyStarted, setModuleGBeans, setReferencePatterns, setShouldLoad, setValue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.geronimo.kernel.config.PersistentConfigurationList
getListedConfigurations, hasGBeanAttributes, isKernelFullyStarted, save, setKernelFullyStarted
 

Field Detail

GBEAN_INFO

public static final GBeanInfo GBEAN_INFO
Constructor Detail

SwitchableLocalAttributeManager

public SwitchableLocalAttributeManager(String configFile,
                                       String substitutionsFile,
                                       String configSubstitutionsPrefix,
                                       boolean readOnly,
                                       ServerInfo serverInfo)
Method Detail

restore

public List<Artifact> restore()
                       throws IOException
Specified by:
restore in interface PersistentConfigurationList
Overrides:
restore in class LocalAttributeManager
Throws:
IOException

setOnline

public void setOnline(boolean online)
Specified by:
setOnline in interface SwitchablePersistentConfigurationList

isOnline

public boolean isOnline()
Specified by:
isOnline in interface SwitchablePersistentConfigurationList

addConfiguration

public void addConfiguration(Artifact configurationName)
Description copied from interface: PersistentConfigurationList
Adds a configuration to the list, but does not mark it as started.

Specified by:
addConfiguration in interface PersistentConfigurationList
Overrides:
addConfiguration in class LocalAttributeManager

startConfiguration

public void startConfiguration(Artifact configurationName)
Description copied from interface: PersistentConfigurationList
Indicates that the configuration should be started when the server is started. The configuration should have been previously added with addConfiguration.

Specified by:
startConfiguration in interface PersistentConfigurationList
Overrides:
startConfiguration in class LocalAttributeManager

stopConfiguration

public void stopConfiguration(Artifact configName)
Description copied from interface: PersistentConfigurationList
Indicates that the configuration should not be started when the server is started. The configuration should have been previously added with addConfiguration (and presumably started with startConfiguration).

Specified by:
stopConfiguration in interface PersistentConfigurationList
Overrides:
stopConfiguration in class LocalAttributeManager

removeConfiguration

public void removeConfiguration(Artifact configName)
Description copied from interface: PersistentConfigurationList
Removes all record of the specified configuration from the configuration list. This is somewhat unusual -- normally you want to remember the settings in case the configuration is deployed again later.

Specified by:
removeConfiguration in interface PersistentConfigurationList
Overrides:
removeConfiguration in class LocalAttributeManager

migrateConfiguration

public void migrateConfiguration(Artifact oldName,
                                 Artifact newName,
                                 Configuration configuration)
Description copied from interface: PersistentConfigurationList
Migrates settings from an old version of a configuration to a newer version of the configuration. Used when an updated version is deployed with a newer version number in the name, but the settings used for the previous version should be carried forward.

Specified by:
migrateConfiguration in interface PersistentConfigurationList
Overrides:
migrateConfiguration in class LocalAttributeManager
Parameters:
oldName - The name that the existing settings are under
newName - The name to move the settings to
configuration - The configuration itself, which can be used to verify that all the settings are still valid as they are migrated.

getGBeanInfo

public static GBeanInfo getGBeanInfo()


Copyright © 2003-2008 The Apache Geronimo development community. All Rights Reserved.