Class PeriodicBackupLink

  • All Implemented Interfaces:
    hudson.ExtensionPoint, hudson.model.Action, hudson.model.Describable<PeriodicBackupLink>, hudson.model.ModelObject, hudson.model.Saveable

    @Extension
    public class PeriodicBackupLink
    extends hudson.model.ManagementLink
    implements hudson.model.Describable<PeriodicBackupLink>, hudson.model.Saveable
    Main class of the plugin This plugin is based on and inspired by the backup plugin developed by: Vincent Sellier, Manufacture Fran�aise des Pneumatiques Michelin, Romain Seguy and the PXE plugin developed by: Kohsuke Kawaguchi
    • Method Detail

      • getTempDirectory

        public String getTempDirectory()
      • setTempDirectory

        public void setTempDirectory​(String tempDirectory)
      • getCron

        public String getCron()
      • setCron

        public void setCron​(String cron)
      • isBackupNow

        public boolean isBackupNow()
      • setBackupNow

        public void setBackupNow​(boolean backupNow)
      • getCycleQuantity

        public int getCycleQuantity()
      • setCycleQuantity

        public void setCycleQuantity​(int cycleQuantity)
      • getCycleDays

        public int getCycleDays()
      • setCycleDays

        public void setCycleDays​(int cycleDays)
      • getDisplayName

        public String getDisplayName()
        Specified by:
        getDisplayName in interface hudson.model.Action
        Specified by:
        getDisplayName in interface hudson.model.ModelObject
      • doBackup

        @Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class)
        @RestrictedSince("1.4")
        public void doBackup​(org.kohsuke.stapler.StaplerRequest req,
                             org.kohsuke.stapler.StaplerResponse rsp)
                      throws Exception
        Throws:
        Exception
      • doRestore

        @Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class)
        @RestrictedSince("1.4")
        public void doRestore​(org.kohsuke.stapler.StaplerRequest req,
                              org.kohsuke.stapler.StaplerResponse rsp,
                              @QueryParameter("backupHash")
                              int backupHash)
                       throws IOException,
                              org.jenkinsci.plugins.periodicbackup.PeriodicBackupException
        Performing restore when triggered form restore web page, backupHash of selected backup is passed to determine which backup in this location should be chosen
        Parameters:
        req - StaplerRequest
        rsp - StaplerResponse
        backupHash - hash code of the selected BackupObject set to be restored
        Throws:
        IOException - If an IO problem occurs
        org.jenkinsci.plugins.periodicbackup.PeriodicBackupException - If other problem occurs
      • getUrlName

        public String getUrlName()
        Specified by:
        getUrlName in interface hudson.model.Action
        Specified by:
        getUrlName in class hudson.model.ManagementLink
      • getIconFileName

        public String getIconFileName()
        Specified by:
        getIconFileName in interface hudson.model.Action
        Specified by:
        getIconFileName in class hudson.model.ManagementLink
      • getDescription

        public String getDescription()
        Overrides:
        getDescription in class hudson.model.ManagementLink
      • save

        public void save()
                  throws IOException
        Specified by:
        save in interface hudson.model.Saveable
        Throws:
        IOException
      • getConfigXml

        protected hudson.XmlFile getConfigXml()
      • getRootDirectory

        public String getRootDirectory()
      • doConfigSubmit

        @Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class)
        @RestrictedSince("1.4")
        public void doConfigSubmit​(org.kohsuke.stapler.StaplerRequest req,
                                   org.kohsuke.stapler.StaplerResponse rsp)
                            throws javax.servlet.ServletException,
                                   IOException,
                                   ClassNotFoundException
        Throws:
        javax.servlet.ServletException
        IOException
        ClassNotFoundException
      • getFileManagerPlugin

        public FileManager getFileManagerPlugin()
      • setFileManagerPlugin

        public void setFileManagerPlugin​(FileManager fileManagerPlugin)
      • getMessage

        public String getMessage()
      • setMessage

        public void setMessage​(String message)