org.apache.cactus.integration.api.deployable
Class AbstractDeployableFile

java.lang.Object
  extended by org.apache.cactus.integration.api.deployable.AbstractDeployableFile
All Implemented Interfaces:
java.lang.Cloneable, DeployableFile
Direct Known Subclasses:
EarDeployableFile, WarDeployableFile

public abstract class AbstractDeployableFile
extends java.lang.Object
implements DeployableFile, java.lang.Cloneable

Logic common to all deployable implementations (WAR and EAR deployments).

Since:
Cactus 1.5
Version:
$Id: AbstractDeployableFile.java 239003 2004-05-31 20:05:27Z vmassol $

Field Summary
protected  java.io.File deployableFile
          The WAR or EAR file to deploy.
protected  java.lang.String filterRedirectorMapping
          Filter mapping of the Cactus Filter redirector found in the warArchive WAR.
protected  java.lang.String jspRedirectorMapping
          JSP mapping of the Cactus JSP redirector found in the warArchive WAR.
protected  java.lang.String servletRedirectorMapping
          Servlet mapping of the Cactus Servlet redirector found in the warArchive WAR.
protected  java.lang.String testContext
          Webapp context path containing the Cactus tests.
protected  org.codehaus.cargo.module.webapp.WarArchive warArchive
          WAR deployment descriptor as a java object.
 
Constructor Summary
AbstractDeployableFile()
           
 
Method Summary
 java.lang.Object clone()
          Clone the object.
 java.io.File getFile()
          
 java.lang.String getFilterRedirectorMapping()
          Returns the first URL-pattern to which the Cactus filter redirector is mapped in the deployment descriptor.
 java.lang.String getJspRedirectorMapping()
          Returns the first URL-pattern to which the Cactus JSP redirector is mapped in the deployment descriptor.
 java.lang.String getServletRedirectorMapping()
          Returns the first URL-pattern to which the Cactus servlet redirector is mapped in the deployment descriptor.
 java.lang.String getTestContext()
          
 org.codehaus.cargo.module.webapp.WarArchive getWarArchive()
          
 void setFile(java.io.File theDeployableFile)
           
 void setFilterRedirectorMapping(java.lang.String theMapping)
           
 void setJspRedirectorMapping(java.lang.String theMapping)
           
 void setServletRedirectorMapping(java.lang.String theMapping)
           
 void setTestContext(java.lang.String theTestContext)
          
 void setWarArchive(org.codehaus.cargo.module.webapp.WarArchive theWarArchive)
           
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.cactus.integration.api.deployable.DeployableFile
isEar, isWar
 

Field Detail

deployableFile

protected java.io.File deployableFile
The WAR or EAR file to deploy.


warArchive

protected org.codehaus.cargo.module.webapp.WarArchive warArchive
WAR deployment descriptor as a java object. In case of an EAR, it is the first WAR containing the Cactus Servlet redirector.


testContext

protected java.lang.String testContext
Webapp context path containing the Cactus tests.


servletRedirectorMapping

protected java.lang.String servletRedirectorMapping
Servlet mapping of the Cactus Servlet redirector found in the warArchive WAR.


filterRedirectorMapping

protected java.lang.String filterRedirectorMapping
Filter mapping of the Cactus Filter redirector found in the warArchive WAR.


jspRedirectorMapping

protected java.lang.String jspRedirectorMapping
JSP mapping of the Cactus JSP redirector found in the warArchive WAR.

Constructor Detail

AbstractDeployableFile

public AbstractDeployableFile()
Method Detail

getFile

public final java.io.File getFile()

Specified by:
getFile in interface DeployableFile
Returns:
the file to deploy in a container (either WAR or EAR)
See Also:
DeployableFile.getFile()

setFile

public final void setFile(java.io.File theDeployableFile)
Parameters:
theDeployableFile - the file to deploy

getTestContext

public final java.lang.String getTestContext()

Specified by:
getTestContext in interface DeployableFile
Returns:
the webapp context which holds the Cactus tests
See Also:
DeployableFile.getTestContext()

setTestContext

public final void setTestContext(java.lang.String theTestContext)

Specified by:
setTestContext in interface DeployableFile
Parameters:
theTestContext - the test context that will be used to test if the container is started or not
See Also:
DeployableFile.setTestContext(String)

getServletRedirectorMapping

public final java.lang.String getServletRedirectorMapping()
Returns the first URL-pattern to which the Cactus servlet redirector is mapped in the deployment descriptor.

Specified by:
getServletRedirectorMapping in interface DeployableFile
Returns:
The mapping, or null if the servlet redirector is not defined or mapped in the descriptor
See Also:
DeployableFile.getServletRedirectorMapping()

setServletRedirectorMapping

public final void setServletRedirectorMapping(java.lang.String theMapping)
Parameters:
theMapping - the servlet redirector mapping

getFilterRedirectorMapping

public final java.lang.String getFilterRedirectorMapping()
Returns the first URL-pattern to which the Cactus filter redirector is mapped in the deployment descriptor.

Specified by:
getFilterRedirectorMapping in interface DeployableFile
Returns:
The mapping, or null if the filter redirector is not defined or mapped in the descriptor
See Also:
DeployableFile.getFilterRedirectorMapping()

setFilterRedirectorMapping

public final void setFilterRedirectorMapping(java.lang.String theMapping)
Parameters:
theMapping - the filter redirector mapping

getJspRedirectorMapping

public final java.lang.String getJspRedirectorMapping()
Returns the first URL-pattern to which the Cactus JSP redirector is mapped in the deployment descriptor.

Specified by:
getJspRedirectorMapping in interface DeployableFile
Returns:
The mapping, or null if the JSP redirector is not defined or mapped in the descriptor
See Also:
DeployableFile.getJspRedirectorMapping()

setJspRedirectorMapping

public final void setJspRedirectorMapping(java.lang.String theMapping)
Parameters:
theMapping - the JSP redirector mapping

getWarArchive

public final org.codehaus.cargo.module.webapp.WarArchive getWarArchive()

Specified by:
getWarArchive in interface DeployableFile
Returns:
the WAR deployment descriptor object for the WAR containing the Cactus Servlet redirector
See Also:
DeployableFile.getWarArchive()

clone

public java.lang.Object clone()
                       throws java.lang.CloneNotSupportedException
Clone the object.

Specified by:
clone in interface DeployableFile
Overrides:
clone in class java.lang.Object
Returns:
the object clone
Throws:
java.lang.CloneNotSupportedException - If clone is not supported (duh)
See Also:
DeployableFile.clone()

setWarArchive

public final void setWarArchive(org.codehaus.cargo.module.webapp.WarArchive theWarArchive)
Parameters:
theWarArchive - the WAR archive object


Copyright © 2001-2009 The Apache Software Foundation. All Rights Reserved.