|
||||||||||
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
org.codehaus.cargo.container.spi.configuration.AbstractStandaloneLocalConfiguration
org.codehaus.cargo.container.spi.configuration.builder.AbstractStandaloneLocalConfigurationWithXMLConfigurationBuilder
public abstract class AbstractStandaloneLocalConfigurationWithXMLConfigurationBuilder
Convenience class that simplifies development of
configuration
s with DataSourceSupport
. It does this
by implementing DataSourceSupport
and instead asking for the inputs to this:
createConfigurationBuilder
: how do we generate the xml element(s) representing the
datasourcegetXpathForDataSourcesParent
: under which element should datasource elements be
inserted?getNamespaces
: does this configuration file use namespaces?getDataSourceConfigurationFile
: where do we load and store the datasource
configuration?
Field Summary |
---|
Fields inherited from class org.codehaus.cargo.container.spi.configuration.AbstractLocalConfiguration |
---|
RESOURCE_PATH |
Constructor Summary | |
---|---|
AbstractStandaloneLocalConfigurationWithXMLConfigurationBuilder(String dir)
|
Method Summary | |
---|---|
void |
configure(DataSource ds,
LocalContainer container)
|
void |
configure(LocalContainer container)
Configure the specified container. |
void |
configure(Resource ds,
LocalContainer container)
|
void |
configureDataSources(LocalContainer container)
Configure the DataSources defined for this configuration. |
void |
configureResources(LocalContainer container)
Configure the Resources defined for this configuration. |
protected abstract ConfigurationBuilder |
createConfigurationBuilder(LocalContainer container)
|
protected abstract Map |
getNamespaces()
Implementations should avoid passing null, and instead pass Collections.EMPTY_MAP , if the document is DTD bound. |
protected abstract String |
getOrCreateDataSourceConfigurationFile(DataSource ds,
LocalContainer container)
note that this file could hold other configuration besides datasources. |
protected abstract String |
getOrCreateResourceConfigurationFile(Resource resource,
LocalContainer container)
note that this file could hold other configuration besides Resources. |
protected abstract String |
getXpathForDataSourcesParent()
DataSource entries must be stored in the xml configuration file. |
protected abstract String |
getXpathForResourcesParent()
Resource entries must be stored in the xml configuration file. |
protected void |
writeConfigurationToXpath(String file,
String xml,
String path)
Utility method used to write XML to an appropriate place in the configuration file. |
Methods inherited from class org.codehaus.cargo.container.spi.configuration.AbstractStandaloneLocalConfiguration |
---|
configureFiles, createFilterChain, getDestDirectoryLocation, getDestFileLocation, getFileProperties, getFilterChain, getType, setConfigFileProperty, setFileProperty, setupConfigurationDir, verify |
Methods inherited from class org.codehaus.cargo.container.spi.configuration.AbstractLocalConfiguration |
---|
addDataSource, addDataSourcesFromProperties, addDeployable, addResource, addResourcesFromProperties, collectUnsupportedDataSourcesAndThrowException, collectUnsupportedResourcesAndThrowException, doConfigure, getAntUtils, getDataSources, getDeployables, getFileHandler, getHome, getResources, getResourceUtils, parsePropertiesForPendingConfiguration, setFileHandler |
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.LocalConfiguration |
---|
addDeployable, addResource, getDeployables, getFileHandler, getHome, getResources, setFileHandler |
Methods inherited from interface org.codehaus.cargo.container.configuration.Configuration |
---|
getCapability, getProperties, getPropertyValue, setProperty |
Methods inherited from interface org.codehaus.cargo.util.log.Loggable |
---|
getLogger, setLogger |
Constructor Detail |
---|
public AbstractStandaloneLocalConfigurationWithXMLConfigurationBuilder(String dir)
dir
- configuration homeMethod Detail |
---|
protected abstract Map getNamespaces()
Collections.EMPTY_MAP
, if the document is DTD bound.
protected abstract String getXpathForDataSourcesParent()
protected abstract String getXpathForResourcesParent()
protected abstract String getOrCreateDataSourceConfigurationFile(DataSource ds, LocalContainer container)
ds
- the DataSource configuration you wish to install on the container.container
- the container whose configuration you wish to affect.
protected abstract String getOrCreateResourceConfigurationFile(Resource resource, LocalContainer container)
resource
- the Resource configuration you wish to install on the container.container
- the container whose configuration you wish to affect.
protected abstract ConfigurationBuilder createConfigurationBuilder(LocalContainer container)
container
- Container the dataSource will be configured on.
public void configure(LocalContainer container)
configure
in interface LocalConfiguration
configure
in class AbstractStandaloneLocalConfiguration
container
- the container to configureLocalConfiguration.configure(LocalContainer)
public void configureDataSources(LocalContainer container)
configureDataSources
in interface DataSourceSupport
container
- the container whose configuration you wish to affect.public void configure(Resource ds, LocalContainer container)
configure
in interface ResourceSupport
ds
- the Resource configuration you wish to install on the container.container
- the container whose configuration you wish to affect.public void configureResources(LocalContainer container)
configureResources
in interface ResourceSupport
container
- the container whose configuration you wish to affect.public void configure(DataSource ds, LocalContainer container)
configure
in interface DataSourceSupport
ds
- the DataSource configuration you wish to install on the container.container
- the container whose configuration you wish to affect.protected void writeConfigurationToXpath(String file, String xml, String path)
file
- where to write the datasource configuration to.xml
- node you wish to write to the resources configuration file.path
- where in the file to write the configuration.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |