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 |
addDataSource(DataSource dataSource) |
protected void |
addDataSourcesFromProperties()
Parse properties and add any DataSources to pending configuration.
|
void |
addDeployable(Deployable newDeployable)
Deploy a
Deployable in the container. |
void |
addResource(Resource resource)
Add resources the container can take advantage of.
|
protected void |
addResourcesFromProperties()
Parse properties and add any Resources to pending configuration.
|
void |
collectUnsupportedDataSourcesAndThrowException()
Warn user and throw an Exception if any unsupported
DataSources are setup for this
configuration. |
void |
collectUnsupportedResourcesAndThrowException()
Warn user and throw an Exception if any unsupported
Resources are setup for this
configuration. |
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 |
getDataSources() |
List |
getDeployables() |
org.codehaus.cargo.util.FileHandler |
getFileHandler() |
String |
getHome() |
List |
getResources() |
protected ResourceUtils |
getResourceUtils() |
void |
parsePropertiesForPendingConfiguration()
Some configuration can be specified as encoded properties.
|
void |
setFileHandler(org.codehaus.cargo.util.FileHandler fileHandler) |
void |
verify()
Verify that the configuration is valid.
|
getProperties, getPropertyValue, setPropertyclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetCapability, getProperties, getPropertyValue, getType, setPropertyprotected 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()
getFileHandler in interface LocalConfigurationpublic void setFileHandler(org.codehaus.cargo.util.FileHandler fileHandler)
setFileHandler in interface LocalConfigurationfileHandler - 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 LocalConfigurationnewDeployable - the Deployable to deployLocalConfiguration.addDeployable(org.codehaus.cargo.container.deployable.Deployable)public List getDeployables()
getDeployables in interface LocalConfigurationDeployables that are going to be deployed in the container when
it is startedLocalConfiguration.getDeployables()public String getHome()
getHome in interface LocalConfigurationLocalConfiguration.getHome()public void configure(LocalContainer container)
configure in interface LocalConfigurationcontainer - the container to configureLocalConfiguration.configure(LocalContainer)public void verify()
verify in interface ContainerConfigurationverify in class AbstractConfigurationContainerConfiguration.verify()public void collectUnsupportedResourcesAndThrowException()
Resources are setup for this
configuration.public void collectUnsupportedDataSourcesAndThrowException()
DataSources are setup for this
configuration.public void parsePropertiesForPendingConfiguration()
protected void addResourcesFromProperties()
ResourcePropertySet.RESOURCEprotected void addDataSourcesFromProperties()
DatasourcePropertySet.DATASOURCEprotected 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 configurationpublic void addResource(Resource resource)
addResource in interface LocalConfigurationresource - the Resource to add.LocalConfiguration.addResource(Resource)public List getResources()
getResources in interface LocalConfigurationpublic void addDataSource(DataSource dataSource)
LocalConfiguration#addDataSource(DataSource)public List getDataSources()
Copyright © 2004-2013 Codehaus. All Rights Reserved.