org.apache.pluto.util.assemble
Class AbstractArchiveAssembler

java.lang.Object
  extended by org.apache.pluto.util.assemble.WebXmlRewritingAssembler
      extended by 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.


Field Summary
 
Fields inherited from interface org.apache.pluto.util.assemble.Assembler
DISPATCH_SERVLET_CLASS, PORTLET_XML, SERVLET_XML
 
Constructor Summary
AbstractArchiveAssembler()
           
 
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 org.apache.pluto.util.assemble.WebXmlRewritingAssembler
updateWebappDescriptor
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractArchiveAssembler

public AbstractArchiveAssembler()
Method Detail

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.

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-2010 Apache Software Foundation. All Rights Reserved.