Class Storage

  • All Implemented Interfaces:
    hudson.model.Describable<Storage>, hudson.model.ModelObject, hudson.search.SearchableModelObject, hudson.search.SearchItem
    Direct Known Subclasses:
    NullStorage, TarGzStorage, ZipStorage

    public abstract class Storage
    extends hudson.model.AbstractModelObject
    implements hudson.model.Describable<Storage>
    Storage is responsible for operating on backup archives
    • Constructor Detail

      • Storage

        public Storage()
    • Method Detail

      • backupStart

        public abstract void backupStart​(String tempDirectoryPath,
                                         String archiveFilenameBase)
                                  throws org.jenkinsci.plugins.periodicbackup.PeriodicBackupException
        Initializes Storage for the archiving process
        Parameters:
        tempDirectoryPath - String with a path to the temporary directory, where the archive(s) will be created
        archiveFilenameBase - first part of the archive filename
        Throws:
        org.jenkinsci.plugins.periodicbackup.PeriodicBackupException - if something goes wrong
      • backupAddFile

        public abstract void backupAddFile​(File fileToStore)
                                    throws org.jenkinsci.plugins.periodicbackup.PeriodicBackupException
        Adds a file to an archive.
        Parameters:
        fileToStore - The file that will be added to the archive
        Throws:
        org.jenkinsci.plugins.periodicbackup.PeriodicBackupException - if something goes wrong
      • backupStop

        public abstract Iterable<File> backupStop()
                                           throws org.jenkinsci.plugins.periodicbackup.PeriodicBackupException
        Finalizes the archiving process
        Returns:
        Archive files
        Throws:
        org.jenkinsci.plugins.periodicbackup.PeriodicBackupException - if something goes wrong
      • unarchiveFiles

        public abstract void unarchiveFiles​(Iterable<File> archives,
                                            File finalResultDir)
        Extracts backup files from given archives into the temporary directory after successful extraction the archives will be deleted
        Parameters:
        archives - backup archives
        finalResultDir - Directory where the files will be extracted to, it should be empty at this point
      • getDescriptor

        public StorageDescriptor getDescriptor()
        Specified by:
        getDescriptor in interface hudson.model.Describable<Storage>
      • getSearchUrl

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

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