org.jboss.virtual.plugins.copy
Class ExplodedCopyMechanism

java.lang.Object
  extended by org.jboss.virtual.plugins.copy.AbstractCopyMechanism
      extended by org.jboss.virtual.plugins.copy.ExplodedCopyMechanism
All Implemented Interfaces:
CopyMechanism

public class ExplodedCopyMechanism
extends AbstractCopyMechanism

Explode any archive into temp dir.

Author:
Ales Justin

Field Summary
static ExplodedCopyMechanism INSTANCE
           
 
Constructor Summary
ExplodedCopyMechanism()
           
 
Method Summary
protected  void doCopy(File copy, VirtualFileHandler handler)
          Do copy.
protected  String getType()
          Get mechanism type.
protected  boolean isAlreadyModified(VirtualFileHandler handler)
          Is handler already modified.
protected  boolean replaceOldHandler(VirtualFileHandler parent, VirtualFileHandler oldHandler, VirtualFileHandler newHandler)
          Should we replace old handler with new.
 
Methods inherited from class org.jboss.virtual.plugins.copy.AbstractCopyMechanism
copy, copy, createCopy, createTempDirectory, exactCopy, explode, getTempDirectory, rewrite, unjar, unpack, unwrap
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

INSTANCE

public static final ExplodedCopyMechanism INSTANCE
Constructor Detail

ExplodedCopyMechanism

public ExplodedCopyMechanism()
Method Detail

getType

protected String getType()
Description copied from class: AbstractCopyMechanism
Get mechanism type.

Specified by:
getType in class AbstractCopyMechanism
Returns:
the type

isAlreadyModified

protected boolean isAlreadyModified(VirtualFileHandler handler)
                             throws IOException
Description copied from class: AbstractCopyMechanism
Is handler already modified.

Specified by:
isAlreadyModified in class AbstractCopyMechanism
Parameters:
handler - the handler
Returns:
true if already modified
Throws:
IOException - for any error

doCopy

protected void doCopy(File copy,
                      VirtualFileHandler handler)
               throws IOException
Description copied from class: AbstractCopyMechanism
Do copy.

Specified by:
doCopy in class AbstractCopyMechanism
Parameters:
copy - the copy destination
handler - the handler
Throws:
IOException - for any error

replaceOldHandler

protected boolean replaceOldHandler(VirtualFileHandler parent,
                                    VirtualFileHandler oldHandler,
                                    VirtualFileHandler newHandler)
                             throws IOException
Description copied from class: AbstractCopyMechanism
Should we replace old handler with new.

Specified by:
replaceOldHandler in class AbstractCopyMechanism
Parameters:
parent - the parent handler
oldHandler - the old handler
newHandler - the new handler
Returns:
true if needs replacement
Throws:
IOException - for any error


Copyright © 2009 JBoss, A division of Red Hat, Inc. All Rights Reserved.