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, waitcommit, rollbackprotected 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
IOExceptionprotected void revertFilesCreated() throws IOException
IOExceptionprotected void createBackup(Path file) throws IOException
IOExceptionprotected void restoreBackups() throws IOException
IOExceptionprotected void restoreBackup(Path file) throws IOException
IOExceptionprotected void createChecksums(Path file, boolean force) throws IOException
file - force - whether existing checksums should be overwritten or notIOExceptionprotected void writeStringToFile(Path file, String content) throws IOException
IOExceptionprotected String getChecksumFileExtension(ChecksumAlgorithm algorithm)
Copyright © 2006–2019 The Apache Software Foundation. All rights reserved.