Class JRun4xStandaloneLocalConfiguration
- java.lang.Object
-
- org.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
-
- org.codehaus.cargo.container.jrun.JRun4xStandaloneLocalConfiguration
-
- All Implemented Interfaces:
Configuration
,DataSourceSupport
,ResourceSupport
,LocalConfiguration
,StandaloneLocalConfiguration
,ContainerConfiguration
,Loggable
public class JRun4xStandaloneLocalConfiguration extends AbstractStandaloneLocalConfigurationWithXMLConfigurationBuilder
JRun standaloneContainerConfiguration
implementation.
-
-
Field Summary
-
Fields inherited from class org.codehaus.cargo.container.spi.configuration.AbstractLocalConfiguration
RESOURCE_PATH
-
-
Constructor Summary
Constructors Constructor Description JRun4xStandaloneLocalConfiguration(String dir)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected ConfigurationBuilder
createConfigurationBuilder(LocalContainer container)
Gets this configuration'sConfigurationBuilder
.protected void
doConfigure(LocalContainer container)
Implementation ofLocalConfiguration.configure(LocalContainer)
that all local configuration using this class must implement.ConfigurationCapability
getCapability()
protected Map<String,String>
getNamespaces()
The xml namespaces.protected String
getOrCreateDataSourceConfigurationFile(DataSource ds, LocalContainer container)
Gets the file to insert Datasource Configuraton into.protected String
getOrCreateResourceConfigurationFile(Resource resource, LocalContainer container)
Gets the file to insert Resource Configuraton into.protected String
getXpathForDataSourcesParent()
Returns the Xpath for the parent element of the datasource xml.protected String
getXpathForResourcesParent()
The XPath of the parent Element of resource configuration.String
toString()
-
Methods inherited from class org.codehaus.cargo.container.spi.configuration.builder.AbstractStandaloneLocalConfigurationWithXMLConfigurationBuilder
configure, configure, configure, configureDataSources, configureResources, writeConfigurationToXpath
-
Methods inherited from class org.codehaus.cargo.container.spi.configuration.AbstractStandaloneLocalConfiguration
addXmlReplacement, addXmlReplacement, addXmlReplacement, addXmlReplacement, configureFiles, getType, getXmlReplacements, performXmlReplacements, removeXmlReplacement, removeXmlReplacement, replaceInFile, setupConfigurationDir, verify
-
Methods inherited from class org.codehaus.cargo.container.spi.configuration.AbstractLocalConfiguration
addDataSource, addDataSourcesFromProperties, addDeployable, addResource, addResourcesFromProperties, addUser, addUsersFromProperties, applyPortOffset, applyPortOffset, collectUnsupportedDataSourcesAndThrowException, collectUnsupportedResourcesAndThrowException, flagOffsetApplied, getDataSources, getDeployables, getDestDirectoryLocation, getDestFileLocation, getFileHandler, getFileProperties, getHome, getPropertyValue, getReplacements, getResources, getResourceUtils, getUsers, isOffsetApplied, isOffsetApplied, parsePropertiesForPendingConfiguration, revertPortOffset, revertPortOffset, setConfigFileProperty, setFileHandler, setFileProperty, setLogger
-
Methods inherited from class org.codehaus.cargo.container.spi.configuration.AbstractConfiguration
getProperties, setProperty
-
Methods inherited from class org.codehaus.cargo.util.log.LoggedObject
getLogger
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.codehaus.cargo.container.configuration.Configuration
getProperties, getPropertyValue, setProperty
-
Methods inherited from interface org.codehaus.cargo.container.configuration.LocalConfiguration
addDataSource, addDeployable, addResource, addUser, applyPortOffset, getDataSources, getDeployables, getFileHandler, getFileProperties, getHome, getResources, getUsers, isOffsetApplied, revertPortOffset, setConfigFileProperty, setFileHandler, setFileProperty
-
-
-
-
Constructor Detail
-
JRun4xStandaloneLocalConfiguration
public JRun4xStandaloneLocalConfiguration(String dir)
-
-
Method Detail
-
getCapability
public ConfigurationCapability getCapability()
- Returns:
- the
ConfigurationCapability
of the configuration in term of properties it supports, etc
-
doConfigure
protected void doConfigure(LocalContainer container) throws Exception
Implementation ofLocalConfiguration.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...- Specified by:
doConfigure
in classAbstractLocalConfiguration
- Parameters:
container
- the container to configure- Throws:
Exception
- if any error is raised during the configuration
-
createConfigurationBuilder
protected ConfigurationBuilder createConfigurationBuilder(LocalContainer container)
Gets this configuration'sConfigurationBuilder
.- Specified by:
createConfigurationBuilder
in classAbstractStandaloneLocalConfigurationWithXMLConfigurationBuilder
- Parameters:
container
- the current Container.- Returns:
- the
ConfigurationBuilder
.
-
getNamespaces
protected Map<String,String> getNamespaces()
The xml namespaces.- Specified by:
getNamespaces
in classAbstractStandaloneLocalConfigurationWithXMLConfigurationBuilder
- Returns:
- an empty Map.
-
getXpathForDataSourcesParent
protected String getXpathForDataSourcesParent()
Returns the Xpath for the parent element of the datasource xml.- Specified by:
getXpathForDataSourcesParent
in classAbstractStandaloneLocalConfigurationWithXMLConfigurationBuilder
- Returns:
- the Xpath for the parent element of the datasource xml.
-
getOrCreateDataSourceConfigurationFile
protected String getOrCreateDataSourceConfigurationFile(DataSource ds, LocalContainer container)
Gets the file to insert Datasource Configuraton into.- Specified by:
getOrCreateDataSourceConfigurationFile
in classAbstractStandaloneLocalConfigurationWithXMLConfigurationBuilder
- Parameters:
ds
- the Datasource instance.container
- the current Container.- Returns:
- the file to insert Datasource Configuraton into.
-
getOrCreateResourceConfigurationFile
protected String getOrCreateResourceConfigurationFile(Resource resource, LocalContainer container)
Gets the file to insert Resource Configuraton into.- Specified by:
getOrCreateResourceConfigurationFile
in classAbstractStandaloneLocalConfigurationWithXMLConfigurationBuilder
- Parameters:
resource
- the Resource definition.container
- the current Container.- Returns:
- the file to insert Resource Configuraton into.
-
getXpathForResourcesParent
protected String getXpathForResourcesParent()
The XPath of the parent Element of resource configuration.- Specified by:
getXpathForResourcesParent
in classAbstractStandaloneLocalConfigurationWithXMLConfigurationBuilder
- Returns:
- XPath of the parent Element of resource configuration.
-
-