Class LocalDirectory
- java.lang.Object
-
- hudson.model.AbstractModelObject
-
- org.jenkinsci.plugins.periodicbackup.Location
-
- org.jenkinsci.plugins.periodicbackup.LocalDirectory
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
LocalDirectory.DescriptorImpl
-
Constructor Summary
Constructors Constructor Description LocalDirectory(File path, boolean enabled)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
deleteBackupFiles(BackupObject backupObject)
This method deletes all files related to given BackupObjectboolean
equals(Object o)
Iterable<BackupObject>
getAvailableBackups()
This method returns Iterable of BackupObject(s) in this locationString
getDisplayName()
File
getPath()
int
hashCode()
Iterable<File>
retrieveBackupFromLocation(BackupObject backup, File tempDir)
Retrieves backup archive files from this locationvoid
setPath(File path)
void
storeBackupInLocation(Iterable<File> archives, File backupObjectFile)
This method puts archived backup file(s) in location-
Methods inherited from class org.jenkinsci.plugins.periodicbackup.Location
all, getDescriptor, getSearchUrl
-
-
-
-
Constructor Detail
-
LocalDirectory
@DataBoundConstructor public LocalDirectory(File path, boolean enabled)
-
-
Method Detail
-
getAvailableBackups
public Iterable<BackupObject> getAvailableBackups()
Description copied from class:Location
This method returns Iterable of BackupObject(s) in this location- Specified by:
getAvailableBackups
in classLocation
- Returns:
- BackupObject(s) in location
-
storeBackupInLocation
public void storeBackupInLocation(Iterable<File> archives, File backupObjectFile) throws IOException
Description copied from class:Location
This method puts archived backup file(s) in location- Specified by:
storeBackupInLocation
in classLocation
- Parameters:
archives
- archive file(s)backupObjectFile
- File with serialized backupObject- Throws:
IOException
- IO error
-
retrieveBackupFromLocation
public Iterable<File> retrieveBackupFromLocation(BackupObject backup, File tempDir) throws IOException, org.jenkinsci.plugins.periodicbackup.PeriodicBackupException
Description copied from class:Location
Retrieves backup archive files from this location- Specified by:
retrieveBackupFromLocation
in classLocation
- Parameters:
backup
- BackupObject related to the backuptempDir
- temporary directory to store archived backup file(s)- Returns:
- Iterable of backup archive(s) in temporary location
- Throws:
IOException
- if anything goes wrong with IOorg.jenkinsci.plugins.periodicbackup.PeriodicBackupException
- if anything else goes wrong
-
deleteBackupFiles
public void deleteBackupFiles(BackupObject backupObject)
Description copied from class:Location
This method deletes all files related to given BackupObject- Specified by:
deleteBackupFiles
in classLocation
- Parameters:
backupObject
- the backupObject of the backup we want to delete
-
getDisplayName
public String getDisplayName()
-
getPath
public File getPath()
-
setPath
public void setPath(File path)
-
-