org.apache.geronimo.mavenplugins.car
Class MavenConfigStore

java.lang.Object
  extended by org.apache.geronimo.system.configuration.RepositoryConfigurationStore
      extended by org.apache.geronimo.mavenplugins.car.MavenConfigStore
All Implemented Interfaces:
ConfigurationStore

public class MavenConfigStore
extends RepositoryConfigurationStore

Implementation of ConfigurationStore that loads Configurations from a repository. This implementation is read-only on the assumption that a separate maven task will handle installation of a built package into the repository.


Field Summary
static GBeanInfo GBEAN_INFO
           
 
Fields inherited from class org.apache.geronimo.system.configuration.RepositoryConfigurationStore
repository
 
Constructor Summary
MavenConfigStore(Kernel kernel, String objectName, WritableListableRepository repository)
           
MavenConfigStore(WritableListableRepository repository)
           
 
Method Summary
 File createNewConfigurationDir(Artifact configId)
          Creates an empty directory for a new configuration with the specified configId
static GBeanInfo getGBeanInfo()
           
 void install(ConfigurationData configurationData)
          Move the unpacked configuration directory into this store
 List<ConfigurationInfo> listConfigurations()
          Return the configurations in the store
 void uninstall(Artifact configID)
          Removes a configuration from the store
 
Methods inherited from class org.apache.geronimo.system.configuration.RepositoryConfigurationStore
containsConfiguration, exportConfiguration, getAbstractName, getObjectName, isInPlaceConfiguration, loadConfiguration, resolve
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

GBEAN_INFO

public static final GBeanInfo GBEAN_INFO
Constructor Detail

MavenConfigStore

public MavenConfigStore(Kernel kernel,
                        String objectName,
                        WritableListableRepository repository)

MavenConfigStore

public MavenConfigStore(WritableListableRepository repository)
Method Detail

createNewConfigurationDir

public File createNewConfigurationDir(Artifact configId)
Description copied from interface: ConfigurationStore
Creates an empty directory for a new configuration with the specified configId

Specified by:
createNewConfigurationDir in interface ConfigurationStore
Overrides:
createNewConfigurationDir in class RepositoryConfigurationStore
Parameters:
configId - the unique ID of the configuration, which must be fully resolved (isResolved() == true)
Returns:
the location of the new directory

install

public void install(ConfigurationData configurationData)
             throws IOException,
                    InvalidConfigException
Description copied from interface: ConfigurationStore
Move the unpacked configuration directory into this store

Specified by:
install in interface ConfigurationStore
Overrides:
install in class RepositoryConfigurationStore
Parameters:
configurationData - the configuration data
Throws:
IOException - if the direcotyr could not be moved into the store
InvalidConfigException - if there is a configuration problem within the source direcotry

uninstall

public void uninstall(Artifact configID)
               throws NoSuchConfigException,
                      IOException
Description copied from interface: ConfigurationStore
Removes a configuration from the store

Specified by:
uninstall in interface ConfigurationStore
Overrides:
uninstall in class RepositoryConfigurationStore
Parameters:
configID - the id of the configuration to remove, which must be fully resolved (isResolved() == true)
Throws:
NoSuchConfigException - if the configuration is not contained in the store
IOException - if a problem occurs during the removal

listConfigurations

public List<ConfigurationInfo> listConfigurations()
Description copied from interface: ConfigurationStore
Return the configurations in the store

Specified by:
listConfigurations in interface ConfigurationStore
Overrides:
listConfigurations in class RepositoryConfigurationStore
Returns:
a List (with entries of type ConfigurationInfo) of all the configurations contained in this configuration store

getGBeanInfo

public static GBeanInfo getGBeanInfo()


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