org.apache.pluto.util.assemble
Class AbstractArchiveAssembler
java.lang.Object
org.apache.pluto.util.assemble.WebXmlRewritingAssembler
org.apache.pluto.util.assemble.AbstractArchiveAssembler
- All Implemented Interfaces:
- Assembler
- Direct Known Subclasses:
- EarAssembler, WarAssembler
public abstract class AbstractArchiveAssembler
- extends WebXmlRewritingAssembler
A base class that assembler implementations should extend.
The purpose of this class is to ensure consistent behavior
when performing assembly.
Method Summary |
void |
assemble(AssemblerConfig config)
This implementation throws UtilityException if the source
archive doesn't exist or is a directory. |
protected abstract void |
assembleInternal(AssemblerConfig config)
Assemble the source file to the destination file. |
protected boolean |
performInPlaceAssembly(AssemblerConfig config)
Performs a series of checks to determine whether or not the assembly should
occur "in-place" - that is, if the source archive will be assembled and then
replaced by the destination archive. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AbstractArchiveAssembler
public AbstractArchiveAssembler()
assemble
public void assemble(AssemblerConfig config)
throws UtilityException
- This implementation throws
UtilityException
if the source
archive doesn't exist or is a directory. If the destination archive is
null, it assumes that in-place assembly is dessired. It determines
if the source archive should be replaced with the destination archive
and provisions temporary files as needed.
- Throws:
UtilityException
performInPlaceAssembly
protected boolean performInPlaceAssembly(AssemblerConfig config)
- Performs a series of checks to determine whether or not the assembly should
occur "in-place" - that is, if the source archive will be assembled and then
replaced by the destination archive.
- If the destination is null, then perform in place assembly.
- If the destination is equal to the source, then perform in place assembly.
- Parameters:
config
- the AssemblerConfig
- Returns:
- true if in-place configuration should occur
assembleInternal
protected abstract void assembleInternal(AssemblerConfig config)
throws UtilityException,
java.io.IOException
- Assemble the source file to the destination file. The superclass is responsible for ensuring
correct and not-null values for the source and destination, and for temporary file handling
used during in-place assembly.
- Parameters:
config
- the assembler configuration object
- Throws:
UtilityException
java.io.IOException
Copyright © 2003-2011 Apache Software Foundation. All Rights Reserved.