Class AbstractResinStandaloneLocalConfiguration
- 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.resin.internal.AbstractResinStandaloneLocalConfiguration
-
- All Implemented Interfaces:
Configuration
,DataSourceSupport
,ResourceSupport
,LocalConfiguration
,StandaloneLocalConfiguration
,ContainerConfiguration
,Loggable
- Direct Known Subclasses:
Resin3xStandaloneLocalConfiguration
public abstract class AbstractResinStandaloneLocalConfiguration extends AbstractStandaloneLocalConfigurationWithXMLConfigurationBuilder
Common class for all Resin standalone local configurations.
-
-
Field Summary
-
Fields inherited from class org.codehaus.cargo.container.spi.configuration.AbstractLocalConfiguration
RESOURCE_PATH
-
-
Constructor Summary
Constructors Constructor Description AbstractResinStandaloneLocalConfiguration(String dir)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected String
createExpandedWarTokenValue(String dirAttribute)
protected void
doConfigure(LocalContainer container)
Implementation ofLocalConfiguration.configure(LocalContainer)
that all local configuration using this class must implement.String
getOrCreateDataSourceConfigurationFile(DataSource ds, LocalContainer container)
note that this file could hold other configuration besides datasources.protected String
getOrCreateResourceConfigurationFile(Resource resource, LocalContainer container)
note that this file could hold other configuration besides Resources.protected String
getResinConfigurationFileName()
protected String
getSecurityToken(String prefix, String suffix)
protected String
getXpathForDataSourcesParent()
DataSource entries must be stored in the xml configuration file.protected abstract void
prepareConfigurationDirectory(Container container, String confDir)
Allow specific version implementations to add custom preparation steps before the container is started.String
toString()
-
Methods inherited from class org.codehaus.cargo.container.spi.configuration.builder.AbstractStandaloneLocalConfigurationWithXMLConfigurationBuilder
configure, configure, configure, configureDataSources, configureResources, createConfigurationBuilder, getNamespaces, getXpathForResourcesParent, 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
getCapability, 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
-
AbstractResinStandaloneLocalConfiguration
public AbstractResinStandaloneLocalConfiguration(String dir)
-
-
Method Detail
-
getOrCreateDataSourceConfigurationFile
public String getOrCreateDataSourceConfigurationFile(DataSource ds, LocalContainer container)
note that this file could hold other configuration besides datasources.- Specified by:
getOrCreateDataSourceConfigurationFile
in classAbstractStandaloneLocalConfigurationWithXMLConfigurationBuilder
- Parameters:
ds
- the DataSource configuration you wish to install on the container.container
- the container whose configuration you wish to affect.- Returns:
- the file that holds datasource configuration.
-
getOrCreateResourceConfigurationFile
protected String getOrCreateResourceConfigurationFile(Resource resource, LocalContainer container)
note that this file could hold other configuration besides Resources.- Specified by:
getOrCreateResourceConfigurationFile
in classAbstractStandaloneLocalConfigurationWithXMLConfigurationBuilder
- Parameters:
resource
- the Resource configuration you wish to install on the container.container
- the container whose configuration you wish to affect.- Returns:
- the file that holds Resource configuration.
-
getXpathForDataSourcesParent
protected String getXpathForDataSourcesParent()
DataSource entries must be stored in the xml configuration file. Under which element do we insert the entries? example: //Engine/DefaultContext- Specified by:
getXpathForDataSourcesParent
in classAbstractStandaloneLocalConfigurationWithXMLConfigurationBuilder
- Returns:
- path the the parent element datasources should be inserted under.
-
prepareConfigurationDirectory
protected abstract void prepareConfigurationDirectory(Container container, String confDir) throws IOException
Allow specific version implementations to add custom preparation steps before the container is started.- Parameters:
container
- the container to configureconfDir
- Resinconf
directory- Throws:
IOException
- in case of an error
-
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
-
createExpandedWarTokenValue
protected String createExpandedWarTokenValue(String dirAttribute)
- Parameters:
dirAttribute
- name of attribute used inresin.conf
to specify where the war is located. This Attribute is different for different versions of Resin.- Returns:
- the value for the
resin3x.expanded.webapps
filter token
-
getSecurityToken
protected String getSecurityToken(String prefix, String suffix)
- Parameters:
prefix
- the prefix string to use for each usersuffix
- the suffix string to use for each user- Returns:
- an Ant filter token containing all the user-defined users
-
getResinConfigurationFileName
protected String getResinConfigurationFileName()
- Returns:
- Resin configuration file name.
-
-