Class AbstractDirectoryPackager
- java.lang.Object
-
- org.codehaus.cargo.util.log.LoggedObject
-
- org.codehaus.cargo.container.spi.packager.AbstractDirectoryPackager
-
- Direct Known Subclasses:
JettyDirectoryPackager,TomcatDirectoryPackager
public abstract class AbstractDirectoryPackager extends LoggedObject implements Packager
Package a container distribution and its local configuration in a directory.
-
-
Constructor Summary
Constructors Constructor Description AbstractDirectoryPackager(String targetDirectory)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract List<String>getConfigurationExclusions()protected abstract List<String>getDistributionExclusions()protected FileHandlergetFileHandler()StringgetTargetDirectory()voidpackageContainer(InstalledLocalContainer container)Package an installed container distribution and its local configuration in a single location.protected voidsetFileHandler(FileHandler fileHandler)voidsetLogger(Logger logger)Overriden in order to set the logger on ancillary components.-
Methods inherited from class org.codehaus.cargo.util.log.LoggedObject
getLogger
-
-
-
-
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.
-
setLogger
public void setLogger(Logger logger)
Overriden in order to set the logger on ancillary components.- Specified by:
setLoggerin interfaceLoggable- Overrides:
setLoggerin classLoggedObject- Parameters:
logger- the logger to set and set in the ancillary objects
-
packageContainer
public void packageContainer(InstalledLocalContainer container)
Package an installed container distribution and its local configuration in a single location.- Specified by:
packageContainerin interfacePackager- Parameters:
container- the installed container to package
-
getDistributionExclusions
protected abstract List<String> 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<String> 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().
-
-