public abstract class AbstractTransactionEvent extends Object implements TransactionEvent
Modifier and Type | Field and Description |
---|---|
private Map<File,File> |
backups |
private List<File> |
createdDirs |
private List<File> |
createdFiles |
private List<? extends org.codehaus.plexus.digest.Digester> |
digesters
List <Digester > |
Modifier | Constructor and Description |
---|---|
protected |
AbstractTransactionEvent() |
protected |
AbstractTransactionEvent(List<? extends org.codehaus.plexus.digest.Digester> digesters) |
Modifier and Type | Method and Description |
---|---|
protected void |
createBackup(File file) |
protected void |
createChecksums(File file,
boolean force)
Create checksums of file using all digesters defined at construction time.
|
protected String |
getDigesterFileExtension(org.codehaus.plexus.digest.Digester digester)
File extension for checksums
TODO should be moved to plexus-digester ?
|
protected List<? extends org.codehaus.plexus.digest.Digester> |
getDigesters() |
protected void |
mkDirs(File dir)
Method that creates a directory as well as all the parent directories needed
|
protected void |
restoreBackup(File file) |
protected void |
restoreBackups() |
protected void |
revertFilesCreated() |
protected void |
revertMkDirs() |
protected void |
writeStringToFile(File file,
String content)
TODO: Remove in favor of using FileUtils directly.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
commit, rollback
private List<File> createdDirs
private List<File> createdFiles
protected AbstractTransactionEvent()
protected AbstractTransactionEvent(List<? extends org.codehaus.plexus.digest.Digester> digesters)
protected List<? extends org.codehaus.plexus.digest.Digester> getDigesters()
protected void mkDirs(File 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(File file) throws IOException
IOException
protected void restoreBackups() throws IOException
IOException
protected void restoreBackup(File file) throws IOException
IOException
protected void createChecksums(File file, boolean force) throws IOException
file
- force
- whether existing checksums should be overwritten or notIOException
protected void writeStringToFile(File file, String content) throws IOException
IOException
protected String getDigesterFileExtension(org.codehaus.plexus.digest.Digester digester)
Copyright © 2006–2022 The Apache Software Foundation. All rights reserved.