public abstract class AbstractStandaloneLocalConfigurationWithXMLConfigurationBuilder extends AbstractStandaloneLocalConfiguration implements DataSourceSupport, ResourceSupport
StandaloneLocalConfiguration configurations
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?RESOURCE_PATH| Constructor and Description |
|---|
AbstractStandaloneLocalConfigurationWithXMLConfigurationBuilder(String dir) |
| Modifier and Type | Method and Description |
|---|---|
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<String,String> |
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.
|
addXmlReplacement, addXmlReplacement, addXmlReplacement, configureFiles, getType, performXmlReplacements, removeXmlReplacement, removeXmlReplacement, replaceInFile, setupConfigurationDir, verifyaddDataSource, addDataSourcesFromProperties, addDeployable, addResource, addResourcesFromProperties, applyPortOffset, applyPortOffset, collectUnsupportedDataSourcesAndThrowException, collectUnsupportedResourcesAndThrowException, createFilterChain, doConfigure, getAntUtils, getDataSources, getDeployables, getDestDirectoryLocation, getDestFileLocation, getFileHandler, getFileProperties, getFilterChain, getHome, getResources, getResourceUtils, parsePropertiesForPendingConfiguration, revertPortOffset, revertPortOffset, setConfigFileProperty, setFileHandler, setFileProperty, setLoggergetProperties, getPropertyValue, setPropertygetLoggerclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddDataSource, addDeployable, addResource, applyPortOffset, getDataSources, getDeployables, getFileHandler, getFileProperties, getHome, getResources, revertPortOffset, setConfigFileProperty, setFileHandler, setFilePropertygetCapability, getProperties, getPropertyValue, setPropertypublic AbstractStandaloneLocalConfigurationWithXMLConfigurationBuilder(String dir)
dir - configuration homeprotected abstract Map<String,String> 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 LocalConfigurationconfigure in class AbstractLocalConfigurationcontainer - the container to configureLocalConfiguration.configure(LocalContainer)public void configureDataSources(LocalContainer container)
configureDataSources in interface DataSourceSupportcontainer - the container whose configuration you wish to affect.public void configure(Resource ds, LocalContainer container)
configure in interface ResourceSupportds - 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 ResourceSupportcontainer - the container whose configuration you wish to affect.public void configure(DataSource ds, LocalContainer container)
configure in interface DataSourceSupportds - 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.Copyright © 2004-2013 Codehaus. All Rights Reserved.