org.codehaus.cargo.container.spi.configuration
Class AbstractLocalConfiguration
java.lang.Object
org.codehaus.cargo.util.log.LoggedObject
org.codehaus.cargo.container.spi.configuration.AbstractConfiguration
org.codehaus.cargo.container.spi.configuration.AbstractLocalConfiguration
- All Implemented Interfaces:
- Configuration, ContainerConfiguration, LocalConfiguration, org.codehaus.cargo.util.log.Loggable
- Direct Known Subclasses:
- AbstractExistingLocalConfiguration, AbstractStandaloneLocalConfiguration
- public abstract class AbstractLocalConfiguration
- extends AbstractConfiguration
- implements LocalConfiguration
Base implementation of
ContainerConfiguration
that can be
specialized for standalone configuration, existing configuration or other local configurations.
- Version:
- $Id: AbstractLocalConfiguration.java 1158 2006-07-29 10:55:48Z vmassol $
Field Summary |
protected static java.lang.String |
RESOURCE_PATH
The path under which the container resources are stored in the JAR. |
Methods inherited from class org.codehaus.cargo.util.log.LoggedObject |
getLogger, setLogger |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.codehaus.cargo.util.log.Loggable |
getLogger, setLogger |
RESOURCE_PATH
protected static final java.lang.String RESOURCE_PATH
- The path under which the container resources are stored in the JAR.
- See Also:
- Constant Field Values
AbstractLocalConfiguration
public AbstractLocalConfiguration(java.lang.String home)
- Parameters:
home
- the home directory where the container will be set up to start and where it
will deploy its deployables.
getFileHandler
public org.codehaus.cargo.util.FileHandler getFileHandler()
- Returns:
- the file utility class to use for performing all file I/O.
setFileHandler
public void setFileHandler(org.codehaus.cargo.util.FileHandler fileHandler)
- Parameters:
fileHandler
- the file utility class to use for performing all file I/O.
getAntUtils
protected final org.codehaus.cargo.util.AntUtils getAntUtils()
- Returns:
- the Ant utility class
getResourceUtils
protected final ResourceUtils getResourceUtils()
- Returns:
- the Resource utility class
addDeployable
public void addDeployable(Deployable newDeployable)
- Deploy a
Deployable
in the container. It installs the Deployable
in the
container's configuration directory.
- Specified by:
addDeployable
in interface LocalConfiguration
- Parameters:
newDeployable
- the Deployable
to deploy- See Also:
LocalConfiguration.addDeployable(org.codehaus.cargo.container.deployable.Deployable)
getDeployables
public java.util.List getDeployables()
-
- Specified by:
getDeployables
in interface LocalConfiguration
- Returns:
- the list of
Deployable
s that are going to be deployed in the container when
it is started - See Also:
LocalConfiguration.getDeployables()
getHome
public java.lang.String getHome()
-
- Specified by:
getHome
in interface LocalConfiguration
- Returns:
- the configuration home directory. Note that we're returning a String instead of a
File because we want to leave the possibility of using URIs for specifying the home
location.
- See Also:
LocalConfiguration.getHome()
configure
public final void configure(LocalContainer container)
- Setup the container which means setting up a valid directory structure, setting up
configuration files and deploying static deployables.
- Specified by:
configure
in interface LocalConfiguration
- Parameters:
container
- the container to configure- See Also:
LocalConfiguration.configure(LocalContainer)
doConfigure
protected abstract void doConfigure(LocalContainer container)
throws java.lang.Exception
- Implementation of
LocalConfiguration.configure(LocalContainer)
that all local
configuration using this class must implement. This provides the ability to perform
generic actions before and after the container-specific implementation. Another way would
be to use AOP...
- Parameters:
container
- the container to configure
- Throws:
java.lang.Exception
- if any error is raised during the configuration
Copyright © 2004-2007 Codehaus. All Rights Reserved.