org.jenkinsci.plugins.periodicbackup
Class ZipStorage
java.lang.Object
hudson.model.AbstractModelObject
org.jenkinsci.plugins.periodicbackup.Storage
org.jenkinsci.plugins.periodicbackup.ZipStorage
- All Implemented Interfaces:
- hudson.model.Describable<Storage>, hudson.model.ModelObject, hudson.search.SearchableModelObject, hudson.search.SearchItem
public class ZipStorage
- extends Storage
|
Constructor Summary |
ZipStorage(boolean multiVolume,
long volumeSize)
|
| Methods inherited from class hudson.model.AbstractModelObject |
getSearch, getSearchIndex, getSearchName, makeSearchIndex, requirePOST, sendError, sendError, sendError, sendError, sendError |
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
ZipStorage
@DataBoundConstructor
public ZipStorage(boolean multiVolume,
long volumeSize)
getCurrentArchiveTotalFilesSize
public long getCurrentArchiveTotalFilesSize()
getArchiver
public org.codehaus.plexus.archiver.zip.ZipArchiver getArchiver()
getCurrentArchiveFilesCount
public int getCurrentArchiveFilesCount()
getArchivesNumber
public int getArchivesNumber()
getVolumeSize
public long getVolumeSize()
setVolumeSize
public void setVolumeSize(long volumeSize)
isMultiVolume
public boolean isMultiVolume()
setMultiVolume
public void setMultiVolume(boolean multiVolume)
backupStart
public void backupStart(java.lang.String tempDirectoryPath,
java.lang.String archiveFilenameBase)
- Description copied from class:
Storage
- Initializes Storage for the archiving process
- Specified by:
backupStart in class Storage
- Parameters:
tempDirectoryPath - String with a path to the temporary directory, where the archive(s) will be createdarchiveFilenameBase - first part of the archive filename
backupAddFile
public void backupAddFile(java.io.File fileToStore)
throws org.jenkinsci.plugins.periodicbackup.PeriodicBackupException
- Description copied from class:
Storage
- Adds a file to an archive.
- Specified by:
backupAddFile in class Storage
- Parameters:
fileToStore - The file that will be added to the archive
- Throws:
PeriodicBackupException - if something goes wrong
backupStop
public java.lang.Iterable<java.io.File> backupStop()
throws org.jenkinsci.plugins.periodicbackup.PeriodicBackupException
- Description copied from class:
Storage
- Finalizes the archiving process
- Specified by:
backupStop in class Storage
- Returns:
- Archive files
- Throws:
PeriodicBackupException - if something goes wrong
unarchiveFiles
public void unarchiveFiles(java.lang.Iterable<java.io.File> archives,
java.io.File tempDir)
- Description copied from class:
Storage
- Extracts backup files from given archives into the temporary directory
after successful extraction the archives will be deleted
- Specified by:
unarchiveFiles in class Storage
- Parameters:
archives - backup archivestempDir - Directory where the files will be extracted to, it should be empty at this point
getDisplayName
public java.lang.String getDisplayName()
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals in class java.lang.Object
hashCode
public int hashCode()
- Overrides:
hashCode in class java.lang.Object
Copyright © 2004-2013. All Rights Reserved.