org.codehaus.cargo.container.spi.packager
Class AbstractDirectoryPackager

java.lang.Object
  extended by org.codehaus.cargo.util.log.LoggedObject
      extended by org.codehaus.cargo.container.spi.packager.AbstractDirectoryPackager
All Implemented Interfaces:
Packager, Loggable
Direct Known Subclasses:
TomcatDirectoryPackager

public abstract class AbstractDirectoryPackager
extends LoggedObject
implements Packager

Package a container distribution and its local configuration in a directory.

Version:
$Id: AbstractDirectoryPackager.java 1705 2008-09-02 13:14:55Z adriana $

Constructor Summary
AbstractDirectoryPackager(String targetDirectory)
           
 
Method Summary
protected abstract  List getConfigurationExclusions()
           
protected abstract  List getDistributionExclusions()
           
protected  FileHandler getFileHandler()
           
 String getTargetDirectory()
           
 void packageContainer(InstalledLocalContainer container)
          Package an installed container distribution and its local configuration in a single location.
protected  void setFileHandler(FileHandler fileHandler)
           
 
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
 

Constructor Detail

AbstractDirectoryPackager

public AbstractDirectoryPackager(String targetDirectory)
Parameters:
targetDirectory - the directory where the container distribution and its local configuration will be packaged
Method Detail

getTargetDirectory

public String getTargetDirectory()
Returns:
the directory where the container distribution and its local configuration will be packaged

getFileHandler

protected FileHandler getFileHandler()
Returns:
the Cargo file utility class

setFileHandler

protected void setFileHandler(FileHandler fileHandler)
Parameters:
fileHandler - the Cargo file utility class to use. This method is useful for unit testing with Mock objects as it can be passed a test file handler that doesn't perform any real file action.

packageContainer

public void packageContainer(InstalledLocalContainer container)
Package an installed container distribution and its local configuration in a single location.

Specified by:
packageContainer in interface Packager
Parameters:
container - the installed container to package
See Also:
Packager.packageContainer(org.codehaus.cargo.container.InstalledLocalContainer)

getDistributionExclusions

protected abstract List getDistributionExclusions()
Returns:
the list of distribution files (specified as Ant File patterns) which will not be present in the generated package. These files are files found in InstalledLocalContainer.getHome().

getConfigurationExclusions

protected abstract List getConfigurationExclusions()
Returns:
the list of configuration files (specified as Ant File patterns) which will not be present in the generated package. These files are files found in LocalConfiguration.getHome().


Copyright © 2004-2012 Codehaus. All Rights Reserved.