public abstract class AbstractLocalConfiguration extends AbstractConfiguration implements LocalConfiguration
ContainerConfiguration
that can be
specialized for standalone configuration, existing configuration or other local configurations.Modifier and Type | Field and Description |
---|---|
protected static String |
RESOURCE_PATH
The path under which the container resources are stored in the JAR.
|
Constructor and Description |
---|
AbstractLocalConfiguration(String home) |
Modifier and Type | Method and Description |
---|---|
void |
addDeployable(Deployable newDeployable)
Deploy a
Deployable in the container. |
void |
configure(LocalContainer container)
Setup the container which means setting up a valid directory structure, setting up
configuration files and deploying static deployables.
|
protected abstract void |
doConfigure(LocalContainer container)
Implementation of
LocalConfiguration.configure(LocalContainer) that all local
configuration using this class must implement. |
protected org.codehaus.cargo.util.AntUtils |
getAntUtils() |
List |
getDeployables() |
org.codehaus.cargo.util.FileHandler |
getFileHandler() |
String |
getHome() |
protected ResourceUtils |
getResourceUtils() |
void |
setFileHandler(org.codehaus.cargo.util.FileHandler fileHandler) |
getProperties, getPropertyValue, setProperty, verify
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getCapability, getProperties, getPropertyValue, getType, setProperty
protected static final String RESOURCE_PATH
public AbstractLocalConfiguration(String home)
home
- the home directory where the container will be set up to start and where it
will deploy its deployables.public org.codehaus.cargo.util.FileHandler getFileHandler()
public void setFileHandler(org.codehaus.cargo.util.FileHandler fileHandler)
fileHandler
- the file utility class to use for performing all file I/O.protected final org.codehaus.cargo.util.AntUtils getAntUtils()
protected final ResourceUtils getResourceUtils()
public void addDeployable(Deployable newDeployable)
Deployable
in the container. It installs the Deployable
in the
container's configuration directory.addDeployable
in interface LocalConfiguration
newDeployable
- the Deployable
to deployLocalConfiguration.addDeployable(org.codehaus.cargo.container.deployable.Deployable)
public List getDeployables()
getDeployables
in interface LocalConfiguration
Deployable
s that are going to be deployed in the container when
it is startedLocalConfiguration.getDeployables()
public String getHome()
getHome
in interface LocalConfiguration
LocalConfiguration.getHome()
public final void configure(LocalContainer container)
configure
in interface LocalConfiguration
container
- the container to configureLocalConfiguration.configure(LocalContainer)
protected abstract void doConfigure(LocalContainer container) throws Exception
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...container
- the container to configureException
- if any error is raised during the configurationCopyright © 2004-2013 Codehaus. All Rights Reserved.