Class TomcatCopyingInstalledLocalDeployer
- java.lang.Object
-
- org.codehaus.cargo.util.log.LoggedObject
-
- org.codehaus.cargo.container.spi.deployer.AbstractDeployer
-
- org.codehaus.cargo.container.spi.deployer.AbstractLocalDeployer
-
- org.codehaus.cargo.container.spi.deployer.AbstractInstalledLocalDeployer
-
- org.codehaus.cargo.container.spi.deployer.AbstractCopyingInstalledLocalDeployer
-
- org.codehaus.cargo.container.tomcat.TomcatCopyingInstalledLocalDeployer
-
- Direct Known Subclasses:
TomeeCopyingInstalledLocalDeployer
public class TomcatCopyingInstalledLocalDeployer extends AbstractCopyingInstalledLocalDeployer
Static deployer that deploys WARs to the Tomcatwebappsdirectory.
-
-
Constructor Summary
Constructors Constructor Description TomcatCopyingInstalledLocalDeployer(LocalContainer container)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voiddoDeploy(String deployableDir, Deployable deployable)Do the actual deployment.StringgetDeployableDir(Deployable deployable)Specifies the directoryDeployables should be copied to.protected StringgetDeployableName(Deployable deployable)Replace the slashes with#in the deployable name (see: CARGO-1041).voidsetShouldCopyWars(boolean shouldCopyWars)Whether the local deployer should copy the wars to the Tomcat webapps directory.voidundeploy(Deployable deployable)Undeploy WAR deployables by deleting the local file from the Tomcat webapps directory.-
Methods inherited from class org.codehaus.cargo.container.spi.deployer.AbstractCopyingInstalledLocalDeployer
canBeDeployed, deploy, setShouldDeployExpanded, shouldDeployExpanded
-
Methods inherited from class org.codehaus.cargo.container.spi.deployer.AbstractInstalledLocalDeployer
getType
-
Methods inherited from class org.codehaus.cargo.container.spi.deployer.AbstractLocalDeployer
getContainer, getFileHandler
-
Methods inherited from class org.codehaus.cargo.container.spi.deployer.AbstractDeployer
deploy, deploy, redeploy, redeploy, redeploy, start, start, stop, stop, undeploy
-
Methods inherited from class org.codehaus.cargo.util.log.LoggedObject
getLogger, setLogger
-
-
-
-
Constructor Detail
-
TomcatCopyingInstalledLocalDeployer
public TomcatCopyingInstalledLocalDeployer(LocalContainer container)
-
-
Method Detail
-
getDeployableDir
public String getDeployableDir(Deployable deployable)
Specifies the directoryDeployables should be copied to.. For Tomcat this is thewebappsdirectory.- Specified by:
getDeployableDirin classAbstractCopyingInstalledLocalDeployer- Parameters:
deployable- Deployable to deploy.- Returns:
- Deployable directory
-
setShouldCopyWars
public void setShouldCopyWars(boolean shouldCopyWars)
Whether the local deployer should copy the wars to the Tomcat webapps directory. This is because Tomcat standalone configuration may not want to copy wars and instead configure server.xml to point to where the wars are located instead of copying them.- Parameters:
shouldCopyWars- true if the wars should be copied
-
doDeploy
protected void doDeploy(String deployableDir, Deployable deployable)
Do the actual deployment. This can be overriden.. We override the base implementation in order to handle the special Tomcat scenarios: if the deployable is aTomcatWARinstance and it contains acontext.xmlfile that we need to manually copy.- Overrides:
doDeployin classAbstractCopyingInstalledLocalDeployer- Parameters:
deployableDir- Directory in which to deploy.deployable- Deployable to deploy.
-
undeploy
public void undeploy(Deployable deployable)
Undeploy WAR deployables by deleting the local file from the Tomcat webapps directory. Undeploy aDeployablefrom the running container. The service becomes unavailable for requests.- Specified by:
undeployin interfaceDeployer- Overrides:
undeployin classAbstractDeployer- Parameters:
deployable- theDeployableto undeploy
-
getDeployableName
protected String getDeployableName(Deployable deployable)
Replace the slashes with#in the deployable name (see: CARGO-1041). Gets the deployable name for the givendeployable.- Overrides:
getDeployableNamein classAbstractCopyingInstalledLocalDeployer- Parameters:
deployable- Deployable to get the name for.- Returns:
- Deployable name.
-
-