Class Location
- java.lang.Object
-
- hudson.model.AbstractModelObject
-
- org.jenkinsci.plugins.periodicbackup.Location
-
- All Implemented Interfaces:
hudson.model.Describable<Location>
,hudson.model.ModelObject
,hudson.search.SearchableModelObject
,hudson.search.SearchItem
- Direct Known Subclasses:
LocalDirectory
,S3
public abstract class Location extends hudson.model.AbstractModelObject implements hudson.model.Describable<Location>
Location determines where to store backup files and is responsible for accessing the backup files once stored
-
-
Field Summary
Fields Modifier and Type Field Description boolean
enabled
-
Constructor Summary
Constructors Constructor Description Location(boolean enabled)
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description static hudson.DescriptorExtensionList<Location,LocationDescriptor>
all()
This will allow to retrieve the list of plugins at runtimeabstract void
deleteBackupFiles(BackupObject backupObject)
This method deletes all files related to given BackupObjectabstract Iterable<BackupObject>
getAvailableBackups()
This method returns Iterable of BackupObject(s) in this locationLocationDescriptor
getDescriptor()
String
getSearchUrl()
abstract Iterable<File>
retrieveBackupFromLocation(BackupObject backup, File tempDir)
Retrieves backup archive files from this locationabstract void
storeBackupInLocation(Iterable<File> archives, File backupObjectFile)
This method puts archived backup file(s) in location-
Methods inherited from class hudson.model.AbstractModelObject
getSearch, getSearchIndex, getSearchName, makeSearchIndex, requirePOST, sendError, sendError, sendError, sendError, sendError
-
-
-
-
Method Detail
-
getAvailableBackups
public abstract Iterable<BackupObject> getAvailableBackups()
This method returns Iterable of BackupObject(s) in this location- Returns:
- BackupObject(s) in location
-
storeBackupInLocation
public abstract void storeBackupInLocation(Iterable<File> archives, File backupObjectFile) throws IOException
This method puts archived backup file(s) in location- Parameters:
archives
- archive file(s)backupObjectFile
- File with serialized backupObject- Throws:
IOException
- IO error
-
retrieveBackupFromLocation
public abstract Iterable<File> retrieveBackupFromLocation(BackupObject backup, File tempDir) throws IOException, org.jenkinsci.plugins.periodicbackup.PeriodicBackupException
Retrieves backup archive files from this 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:
IOException
- if anything goes wrong with IOorg.jenkinsci.plugins.periodicbackup.PeriodicBackupException
- if anything else goes wrong
-
deleteBackupFiles
public abstract void deleteBackupFiles(BackupObject backupObject)
This method deletes all files related to given BackupObject- Parameters:
backupObject
- the backupObject of the backup we want to delete
-
all
public static hudson.DescriptorExtensionList<Location,LocationDescriptor> all()
This will allow to retrieve the list of plugins at runtime- Returns:
- Collection of FileManager Descriptors
-
getDescriptor
public LocationDescriptor getDescriptor()
- Specified by:
getDescriptor
in interfacehudson.model.Describable<Location>
-
getSearchUrl
public String getSearchUrl()
- Specified by:
getSearchUrl
in interfacehudson.search.SearchItem
-
-