org.apache.archiva.transaction
Class CopyFileEvent
java.lang.Object
org.apache.archiva.transaction.AbstractTransactionEvent
org.apache.archiva.transaction.CopyFileEvent
- All Implemented Interfaces:
- TransactionEvent
public class CopyFileEvent
- extends AbstractTransactionEvent
Event to copy a file.
Constructor Summary |
CopyFileEvent(File source,
File destination,
List<? extends org.codehaus.plexus.digest.Digester> digesters)
|
Method Summary |
void |
commit()
Commit this event. |
private boolean |
copyChecksum(String extension)
Copy checksum of source file with extension provided if exists |
private void |
copyChecksums()
Copy checksums of source file with all digesters if exist |
void |
rollback()
Rollback the even already committed. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
source
private final File source
destination
private final File destination
CopyFileEvent
public CopyFileEvent(File source,
File destination,
List<? extends org.codehaus.plexus.digest.Digester> digesters)
- Parameters:
source
- destination
- digesters
- List
<Digester
> digesters to use for checksumming
commit
public void commit()
throws IOException
- Description copied from interface:
TransactionEvent
- Commit this event.
- Throws:
IOException
- if an error occurred committing the change
copyChecksums
private void copyChecksums()
throws IOException
- Copy checksums of source file with all digesters if exist
- Throws:
IOException
copyChecksum
private boolean copyChecksum(String extension)
throws IOException
- Copy checksum of source file with extension provided if exists
- Parameters:
extension
-
- Returns:
- whether the checksum exists or not
- Throws:
IOException
rollback
public void rollback()
throws IOException
- Description copied from interface:
TransactionEvent
- Rollback the even already committed.
- Throws:
IOException
- if an error occurred reverting the change
Copyright © 2006-2013 The Apache Software Foundation. All Rights Reserved.