Class FileManager

  • All Implemented Interfaces:
    hudson.model.Describable<FileManager>, hudson.model.ModelObject, hudson.search.SearchableModelObject, hudson.search.SearchItem
    Direct Known Subclasses:
    ConfigOnly, FullBackup

    public abstract class FileManager
    extends hudson.model.AbstractModelObject
    implements hudson.model.Describable<FileManager>
    FileManager determines the files selection for backup and restore policies
    • Constructor Detail

      • FileManager

        public FileManager()
    • Method Detail

      • getFilesToBackup

        public abstract Iterable<File> getFilesToBackup()
                                                 throws org.jenkinsci.plugins.periodicbackup.PeriodicBackupException
        This method determines files and folders for Storage
        Returns:
        Files to be included in the backup
        Throws:
        org.jenkinsci.plugins.periodicbackup.PeriodicBackupException - if anything bad happens
      • restoreFiles

        public void restoreFiles​(File finalResultDir)
                          throws IOException,
                                 org.jenkinsci.plugins.periodicbackup.PeriodicBackupException
        This will restore files to their right place in the HUDSON directory
        Parameters:
        finalResultDir - the temporary directory where ONLY the files for restoring are
        Throws:
        IOException - IOException when IO problem
        org.jenkinsci.plugins.periodicbackup.PeriodicBackupException - if anything else bad happens
      • all

        public static hudson.DescriptorExtensionList<FileManager,​FileManagerDescriptor> all()
        This will allow to retrieve the list of plugins at runtime
        Returns:
        Collection of FileManager Descriptors
      • getSearchUrl

        public String getSearchUrl()
        Specified by:
        getSearchUrl in interface hudson.search.SearchItem
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object