org.apache.geronimo.system.configuration
Class LocalConfigStore

java.lang.Object
  extended byorg.apache.geronimo.system.configuration.LocalConfigStore
All Implemented Interfaces:
org.apache.geronimo.kernel.config.ConfigurationStore, org.apache.geronimo.gbean.GBeanLifecycle

public class LocalConfigStore
extends Object
implements org.apache.geronimo.kernel.config.ConfigurationStore, org.apache.geronimo.gbean.GBeanLifecycle

Implementation of ConfigurationStore using the local filesystem.

Version:
$Revision: 1.12 $ $Date: 2004/08/04 07:21:54 $

Field Summary
static org.apache.geronimo.gbean.GBeanInfo GBEAN_INFO
           
 
Constructor Summary
LocalConfigStore(File rootDir)
          Constructor is only used for direct testing with out a kernel.
LocalConfigStore(String objectName, URI root, ServerInfo serverInfo)
           
 
Method Summary
 boolean containsConfiguration(URI configID)
           
 void doFail()
           
 void doStart()
           
 void doStop()
           
 URL getBaseURL(URI configID)
           
 org.apache.geronimo.gbean.jmx.GBeanMBean getConfiguration(URI configID)
           
static org.apache.geronimo.gbean.GBeanInfo getGBeanInfo()
           
 String getObjectName()
           
 URI install(URL source)
           
 List listConfiguations()
           
 void uninstall(URI configID)
           
static void unpack(File to, InputStream from)
           
 
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 org.apache.geronimo.gbean.GBeanInfo GBEAN_INFO
Constructor Detail

LocalConfigStore

public LocalConfigStore(File rootDir)
Constructor is only used for direct testing with out a kernel.


LocalConfigStore

public LocalConfigStore(String objectName,
                        URI root,
                        ServerInfo serverInfo)
Method Detail

getObjectName

public String getObjectName()
Specified by:
getObjectName in interface org.apache.geronimo.kernel.config.ConfigurationStore

doStart

public void doStart()
             throws org.apache.geronimo.gbean.WaitingException,
                    FileNotFoundException,
                    IOException
Specified by:
doStart in interface org.apache.geronimo.gbean.GBeanLifecycle
Throws:
org.apache.geronimo.gbean.WaitingException
FileNotFoundException
IOException

doStop

public void doStop()
            throws org.apache.geronimo.gbean.WaitingException
Specified by:
doStop in interface org.apache.geronimo.gbean.GBeanLifecycle
Throws:
org.apache.geronimo.gbean.WaitingException

doFail

public void doFail()
Specified by:
doFail in interface org.apache.geronimo.gbean.GBeanLifecycle

install

public URI install(URL source)
            throws IOException,
                   org.apache.geronimo.kernel.config.InvalidConfigException
Specified by:
install in interface org.apache.geronimo.kernel.config.ConfigurationStore
Throws:
IOException
org.apache.geronimo.kernel.config.InvalidConfigException

uninstall

public void uninstall(URI configID)
               throws org.apache.geronimo.kernel.config.NoSuchConfigException,
                      IOException
Specified by:
uninstall in interface org.apache.geronimo.kernel.config.ConfigurationStore
Throws:
org.apache.geronimo.kernel.config.NoSuchConfigException
IOException

getConfiguration

public org.apache.geronimo.gbean.jmx.GBeanMBean getConfiguration(URI configID)
                                                          throws org.apache.geronimo.kernel.config.NoSuchConfigException,
                                                                 IOException,
                                                                 org.apache.geronimo.kernel.config.InvalidConfigException
Specified by:
getConfiguration in interface org.apache.geronimo.kernel.config.ConfigurationStore
Throws:
org.apache.geronimo.kernel.config.NoSuchConfigException
IOException
org.apache.geronimo.kernel.config.InvalidConfigException

listConfiguations

public List listConfiguations()
Specified by:
listConfiguations in interface org.apache.geronimo.kernel.config.ConfigurationStore

getBaseURL

public URL getBaseURL(URI configID)
               throws org.apache.geronimo.kernel.config.NoSuchConfigException
Specified by:
getBaseURL in interface org.apache.geronimo.kernel.config.ConfigurationStore
Throws:
org.apache.geronimo.kernel.config.NoSuchConfigException

containsConfiguration

public boolean containsConfiguration(URI configID)
Specified by:
containsConfiguration in interface org.apache.geronimo.kernel.config.ConfigurationStore

unpack

public static void unpack(File to,
                          InputStream from)
                   throws IOException
Throws:
IOException

getGBeanInfo

public static org.apache.geronimo.gbean.GBeanInfo getGBeanInfo()


Copyright © 2003-2005 Apache Software Foundation. All Rights Reserved.