org.jboss.deployers.vfs.spi.structure.modified
Class AbstractSynchAdapter

java.lang.Object
  extended by org.jboss.deployers.vfs.spi.structure.modified.AbstractSynchAdapter
All Implemented Interfaces:
SynchAdapter
Direct Known Subclasses:
MergeOverrideSynchAdapter, MergeSynchAdapter, OverrideSynchAdapter

public abstract class AbstractSynchAdapter
extends Object
implements SynchAdapter

Abstract synch adapter.

Author:
Ales Justin

Field Summary
protected static org.jboss.logging.Logger log
          The log
 
Constructor Summary
AbstractSynchAdapter()
           
 
Method Summary
 long add(org.jboss.virtual.VirtualFile fileToAdd, org.jboss.virtual.VirtualFile tempRoot, String pathToFile)
          Add new file to temp.
protected static long copy(org.jboss.virtual.VirtualFile fileToAdd, File newFile)
          Do copy.
 boolean delete(org.jboss.virtual.VirtualFile fileToDelete)
          Add new file to temp.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.jboss.deployers.vfs.spi.structure.modified.SynchAdapter
update
 

Field Detail

log

protected static org.jboss.logging.Logger log
The log

Constructor Detail

AbstractSynchAdapter

public AbstractSynchAdapter()
Method Detail

add

public long add(org.jboss.virtual.VirtualFile fileToAdd,
                org.jboss.virtual.VirtualFile tempRoot,
                String pathToFile)
         throws IOException
Description copied from interface: SynchAdapter
Add new file to temp.

Specified by:
add in interface SynchAdapter
Parameters:
fileToAdd - file to add
tempRoot - temp root
pathToFile - the path to file
Returns:
addition timestamp
Throws:
IOException - for any error

copy

protected static long copy(org.jboss.virtual.VirtualFile fileToAdd,
                           File newFile)
                    throws IOException
Do copy.

Parameters:
fileToAdd - file to add
newFile - new file location
Returns:
new timestamp
Throws:
IOException - for any error

delete

public boolean delete(org.jboss.virtual.VirtualFile fileToDelete)
               throws IOException
Description copied from interface: SynchAdapter
Add new file to temp.

Specified by:
delete in interface SynchAdapter
Parameters:
fileToDelete - file to delete
Returns:
true if deleted, false otherwise
Throws:
IOException - for any error


Copyright © 2011 JBoss, a division of Red Hat, Inc.. All Rights Reserved.