org.jenkinsci.plugins.periodicbackup
Class LocalDirectory
java.lang.Object
hudson.model.AbstractModelObject
org.jenkinsci.plugins.periodicbackup.Location
org.jenkinsci.plugins.periodicbackup.LocalDirectory
- All Implemented Interfaces:
- hudson.model.Describable<Location>, hudson.model.ModelObject, hudson.search.SearchableModelObject, hudson.search.SearchItem
public class LocalDirectory
- extends Location
LocalDirectory defines the local folder to store the backup files
| Fields inherited from class org.jenkinsci.plugins.periodicbackup.Location |
enabled |
|
Constructor Summary |
LocalDirectory(java.io.File path,
boolean enabled)
|
| 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 |
LocalDirectory
@DataBoundConstructor
public LocalDirectory(java.io.File path,
boolean enabled)
getAvailableBackups
public java.lang.Iterable<BackupObject> getAvailableBackups()
- Description copied from class:
Location
- This method returns Iterable of BackupObject(s) in this location
- Specified by:
getAvailableBackups in class Location
- Returns:
- BackupObject(s) in location
storeBackupInLocation
public void storeBackupInLocation(java.lang.Iterable<java.io.File> archives,
java.io.File backupObjectFile)
throws java.io.IOException
- Description copied from class:
Location
- This method puts archived backup file(s) in location
- Specified by:
storeBackupInLocation in class Location
- Parameters:
archives - archive file(s)backupObjectFile - File with serialized backupObject
- Throws:
java.io.IOException - IO error
retrieveBackupFromLocation
public java.lang.Iterable<java.io.File> retrieveBackupFromLocation(BackupObject backup,
java.io.File tempDir)
throws java.io.IOException,
org.jenkinsci.plugins.periodicbackup.PeriodicBackupException
- Description copied from class:
Location
- Retrieves backup archive files from this location
- Specified by:
retrieveBackupFromLocation in class Location
- 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:
java.io.IOException - if anything goes wrong with IO
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 class Location
- Parameters:
backupObject - the backupObject of the backup we want to delete
getDisplayName
public java.lang.String getDisplayName()
getPath
public java.io.File getPath()
setPath
public void setPath(java.io.File path)
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.