org.codehaus.cargo.container.deployable
Class WAR

java.lang.Object
  extended by org.codehaus.cargo.util.log.LoggedObject
      extended by org.codehaus.cargo.container.spi.deployable.AbstractDeployable
          extended by org.codehaus.cargo.container.deployable.WAR
All Implemented Interfaces:
Deployable, org.codehaus.cargo.util.log.Loggable

public class WAR
extends AbstractDeployable

Wraps a WAR file that will be deployed in the container. The root context for this WAR is taken from the name of the WAR file (without the extension).

Version:
$Id: WAR.java 1163 2006-07-31 09:19:12Z vmassol $

Constructor Summary
WAR(java.lang.String war)
           
 
Method Summary
 java.lang.String getContext()
           
 DeployableType getType()
          
 boolean isExpandedWar()
           
 void setContext(java.lang.String context)
           
 
Methods inherited from class org.codehaus.cargo.container.spi.deployable.AbstractDeployable
getFile, getFileHandler, setFileHandler
 
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.util.log.Loggable
getLogger, setLogger
 

Constructor Detail

WAR

public WAR(java.lang.String war)
Parameters:
war - the location of the WAR being wrapped. This must point to either a WAR file or an expanded WAR directory.
Method Detail

setContext

public void setContext(java.lang.String context)
Parameters:
context - the context name to use when deploying this WAR. If not specified by the user, then the default context name is computed from the name of WAR itself (without the file extension).

getContext

public java.lang.String getContext()
Returns:
the context name, either the computed name derived from the WAR file name or the name defined by the user. Note that this method doesn't return any leading "/" before the context name.

isExpandedWar

public boolean isExpandedWar()
Returns:
true if the WAR file specified is pointing to an expanded WAR directory, false otherwise

getType

public DeployableType getType()

Returns:
the deployable's type (war, ear, etc)
See Also:
Deployable.getType()


Copyright © 2004-2010 Codehaus. All Rights Reserved.