public abstract class AbstractTransactionEvent extends Object implements TransactionEvent
Modifier | Constructor and Description |
---|---|
protected |
AbstractTransactionEvent() |
protected |
AbstractTransactionEvent(List<ChecksumAlgorithm> checksumAlgorithms) |
Modifier and Type | Method and Description |
---|---|
protected void |
createBackup(Path file) |
protected void |
createChecksums(Path file,
boolean force)
Create checksums of file using all digesters defined at construction time.
|
protected List<ChecksumAlgorithm> |
getChecksumAlgorithms() |
protected String |
getChecksumFileExtension(ChecksumAlgorithm algorithm)
File extension for checksums
TODO should be moved to plexus-digester ?
|
protected void |
mkDirs(Path dir)
Method that creates a directory as well as all the parent directories needed
|
protected void |
restoreBackup(Path file) |
protected void |
restoreBackups() |
protected void |
revertFilesCreated() |
protected void |
revertMkDirs() |
protected void |
writeStringToFile(Path file,
String content)
TODO: Remove in favor of using FileUtils directly.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
commit, rollback
protected AbstractTransactionEvent()
protected AbstractTransactionEvent(List<ChecksumAlgorithm> checksumAlgorithms)
protected List<ChecksumAlgorithm> getChecksumAlgorithms()
protected void mkDirs(Path dir) throws IOException
dir
- The File directory to be createdIOException
- when an unrecoverable error occurredprotected void revertMkDirs() throws IOException
IOException
protected void revertFilesCreated() throws IOException
IOException
protected void createBackup(Path file) throws IOException
IOException
protected void restoreBackups() throws IOException
IOException
protected void restoreBackup(Path file) throws IOException
IOException
protected void createChecksums(Path file, boolean force) throws IOException
file
- force
- whether existing checksums should be overwritten or notIOException
protected void writeStringToFile(Path file, String content) throws IOException
IOException
protected String getChecksumFileExtension(ChecksumAlgorithm algorithm)
Copyright © 2006–2019 The Apache Software Foundation. All rights reserved.