Class ZipStorage
- java.lang.Object
-
- hudson.model.AbstractModelObject
-
- org.jenkinsci.plugins.periodicbackup.Storage
-
- org.jenkinsci.plugins.periodicbackup.ZipStorage
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classZipStorage.DescriptorImpl
-
Constructor Summary
Constructors Constructor Description ZipStorage(boolean multiVolume, long volumeSize)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidbackupAddFile(File fileToStore)Adds a file to an archive.voidbackupStart(String tempDirectoryPath, String archiveFilenameBase)Initializes Storage for the archiving processIterable<File>backupStop()Finalizes the archiving processbooleanequals(Object o)org.codehaus.plexus.archiver.zip.ZipArchivergetArchiver()intgetArchivesNumber()intgetCurrentArchiveFilesCount()longgetCurrentArchiveTotalFilesSize()StringgetDisplayName()longgetVolumeSize()inthashCode()booleanisMultiVolume()voidsetMultiVolume(boolean multiVolume)voidsetVolumeSize(long volumeSize)voidunarchiveFiles(Iterable<File> archives, File tempDir)Extracts backup files from given archives into the temporary directory after successful extraction the archives will be deleted-
Methods inherited from class org.jenkinsci.plugins.periodicbackup.Storage
all, getDescriptor, getSearchUrl
-
-
-
-
Method Detail
-
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(String tempDirectoryPath, String archiveFilenameBase)
Description copied from class:StorageInitializes Storage for the archiving process- Specified by:
backupStartin classStorage- 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(File fileToStore) throws org.jenkinsci.plugins.periodicbackup.PeriodicBackupException
Description copied from class:StorageAdds a file to an archive.- Specified by:
backupAddFilein classStorage- Parameters:
fileToStore- The file that will be added to the archive- Throws:
org.jenkinsci.plugins.periodicbackup.PeriodicBackupException- if something goes wrong
-
backupStop
public Iterable<File> backupStop() throws org.jenkinsci.plugins.periodicbackup.PeriodicBackupException
Description copied from class:StorageFinalizes the archiving process- Specified by:
backupStopin classStorage- Returns:
- Archive files
- Throws:
org.jenkinsci.plugins.periodicbackup.PeriodicBackupException- if something goes wrong
-
unarchiveFiles
public void unarchiveFiles(Iterable<File> archives, File tempDir)
Description copied from class:StorageExtracts backup files from given archives into the temporary directory after successful extraction the archives will be deleted- Specified by:
unarchiveFilesin classStorage- Parameters:
archives- backup archivestempDir- Directory where the files will be extracted to, it should be empty at this point
-
getDisplayName
public String getDisplayName()
-
-