|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.archiva.transaction.AbstractTransactionEvent
public abstract class AbstractTransactionEvent
Abstract class for the TransactionEvents
Field Summary | |
---|---|
private Map<File,File> |
backups
|
private List<File> |
createdDirs
|
private List<File> |
createdFiles
|
private List<? extends org.codehaus.plexus.digest.Digester> |
digesters
List <Digester > |
Constructor Summary | |
---|---|
protected |
AbstractTransactionEvent()
|
protected |
AbstractTransactionEvent(List<? extends org.codehaus.plexus.digest.Digester> digesters)
|
Method Summary | |
---|---|
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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.apache.archiva.transaction.TransactionEvent |
---|
commit, rollback |
Field Detail |
---|
private Map<File,File> backups
private List<File> createdDirs
private List<File> createdFiles
private List<? extends org.codehaus.plexus.digest.Digester> digesters
List
<Digester
>
Constructor Detail |
---|
protected AbstractTransactionEvent()
protected AbstractTransactionEvent(List<? extends org.codehaus.plexus.digest.Digester> digesters)
Method Detail |
---|
protected List<? extends org.codehaus.plexus.digest.Digester> getDigesters()
protected void mkDirs(File dir) throws IOException
dir
- The File directory to be created
IOException
- 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 not
IOException
protected void writeStringToFile(File file, String content) throws IOException
IOException
protected String getDigesterFileExtension(org.codehaus.plexus.digest.Digester digester)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |