Class 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
    • Constructor Detail

      • LocalDirectory

        @DataBoundConstructor
        public LocalDirectory​(File path,
                              boolean enabled)
    • Method Detail

      • 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 class Location
        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 class Location
        Parameters:
        backup - BackupObject related to the backup
        tempDir - temporary directory to store archived backup file(s)
        Returns:
        Iterable of backup archive(s) in temporary location
        Throws:
        IOException - if anything goes wrong with IO
        org.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 class Location
        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)
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object