|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.codehaus.cargo.util.log.LoggedObject
org.codehaus.cargo.container.spi.configuration.AbstractConfiguration
org.codehaus.cargo.container.spi.configuration.AbstractLocalConfiguration
public abstract class AbstractLocalConfiguration
Base implementation of
ContainerConfiguration that can be
specialized for standalone configuration, existing configuration or other local configurations.
| Field Summary | |
|---|---|
protected static java.lang.String |
RESOURCE_PATH
The path under which the container resources are stored in the JAR. |
| Constructor Summary | |
|---|---|
AbstractLocalConfiguration(java.lang.String home)
|
|
| Method Summary | |
|---|---|
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 AntUtils |
getAntUtils()
|
java.util.List |
getDataSources()
|
java.util.List |
getDeployables()
|
FileHandler |
getFileHandler()
|
java.lang.String |
getHome()
|
java.util.List |
getResources()
|
protected ResourceUtils |
getResourceUtils()
|
void |
parsePropertiesForPendingConfiguration()
Some configuration can be specified as encoded properties. |
void |
setFileHandler(FileHandler fileHandler)
|
void |
verify()
Verify that the configuration is valid. |
| Methods inherited from class org.codehaus.cargo.container.spi.configuration.AbstractConfiguration |
|---|
getProperties, getPropertyValue, setProperty |
| 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.container.configuration.Configuration |
|---|
getCapability, getProperties, getPropertyValue, getType, setProperty |
| Methods inherited from interface org.codehaus.cargo.util.log.Loggable |
|---|
getLogger, setLogger |
| Field Detail |
|---|
protected static final java.lang.String RESOURCE_PATH
| Constructor Detail |
|---|
public AbstractLocalConfiguration(java.lang.String home)
home - the home directory where the container will be set up to start and where it will
deploy its deployables.| Method Detail |
|---|
public FileHandler getFileHandler()
getFileHandler in interface LocalConfigurationpublic void setFileHandler(FileHandler fileHandler)
setFileHandler in interface LocalConfigurationfileHandler - the file utility class to use for performing all file I/O.protected final 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 java.util.List getDeployables()
getDeployables in interface LocalConfigurationDeployables that are going to be deployed in the container when
it is startedLocalConfiguration.getDeployables()public java.lang.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.RESOURCE
protected void addDataSourcesFromProperties()
DatasourcePropertySet.DATASOURCE
protected abstract void doConfigure(LocalContainer container)
throws java.lang.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 configure
java.lang.Exception - if any error is raised during the configurationpublic void addResource(Resource resource)
addResource in interface LocalConfigurationresource - the Resource to add.LocalConfiguration.addResource(Resource)public java.util.List getResources()
getResources in interface LocalConfigurationpublic void addDataSource(DataSource dataSource)
LocalConfiguration#addDataSource(DataSource)public java.util.List getDataSources()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||