org.jenkinsci.plugins.periodicbackup
Class PeriodicBackupLink
java.lang.Object
hudson.model.ManagementLink
org.jenkinsci.plugins.periodicbackup.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
| Nested classes/interfaces inherited from interface hudson.ExtensionPoint |
hudson.ExtensionPoint.LegacyInstancesAreScopedToHudson |
| Fields inherited from class hudson.model.ManagementLink |
LIST |
| Fields inherited from interface hudson.model.Saveable |
NOOP |
| Methods inherited from class hudson.model.ManagementLink |
all |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PeriodicBackupLink
public PeriodicBackupLink()
throws java.io.IOException
- Throws:
java.io.IOException
getTempDirectory
public java.lang.String getTempDirectory()
setTempDirectory
public void setTempDirectory(java.lang.String tempDirectory)
getCron
public java.lang.String getCron()
setCron
public void setCron(java.lang.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 java.lang.String getDisplayName()
- Specified by:
getDisplayName in interface hudson.model.Action- Specified by:
getDisplayName in interface hudson.model.ModelObject
doBackup
public void doBackup(org.kohsuke.stapler.StaplerRequest req,
org.kohsuke.stapler.StaplerResponse rsp)
throws java.lang.Exception
- Throws:
java.lang.Exception
doRestore
public void doRestore(org.kohsuke.stapler.StaplerRequest req,
org.kohsuke.stapler.StaplerResponse rsp,
@QueryParameter(value="backupHash")
int backupHash)
throws java.io.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 - StaplerRequestrsp - StaplerResponsebackupHash - hash code of the selected BackupObject set to be restored
- Throws:
java.io.IOException - If an IO problem occurs
PeriodicBackupException - If other problem occurs
getUrlName
public java.lang.String getUrlName()
- Specified by:
getUrlName in interface hudson.model.Action- Specified by:
getUrlName in class hudson.model.ManagementLink
getIconFileName
public java.lang.String getIconFileName()
- Specified by:
getIconFileName in interface hudson.model.Action- Specified by:
getIconFileName in class hudson.model.ManagementLink
getDescription
public java.lang.String getDescription()
- Overrides:
getDescription in class hudson.model.ManagementLink
load
protected void load()
throws java.io.IOException
- Throws:
java.io.IOException
save
public void save()
throws java.io.IOException
- Specified by:
save in interface hudson.model.Saveable
- Throws:
java.io.IOException
getConfigXml
protected hudson.XmlFile getConfigXml()
getRootDirectory
public java.lang.String getRootDirectory()
doConfigSubmit
public void doConfigSubmit(org.kohsuke.stapler.StaplerRequest req,
org.kohsuke.stapler.StaplerResponse rsp)
throws javax.servlet.ServletException,
java.io.IOException,
java.lang.ClassNotFoundException
- Throws:
javax.servlet.ServletException
java.io.IOException
java.lang.ClassNotFoundException
getDescriptor
public PeriodicBackupLink.DescriptorImpl getDescriptor()
- Specified by:
getDescriptor in interface hudson.model.Describable<PeriodicBackupLink>
getFileManagerDescriptors
public java.util.Collection<FileManagerDescriptor> getFileManagerDescriptors()
getStorageDescriptors
public java.util.Collection<StorageDescriptor> getStorageDescriptors()
getLocationDescriptors
public java.util.Collection<LocationDescriptor> getLocationDescriptors()
getFileManagerPlugin
public FileManager getFileManagerPlugin()
setFileManagerPlugin
public void setFileManagerPlugin(FileManager fileManagerPlugin)
getStorages
public hudson.util.DescribableList<Storage,StorageDescriptor> getStorages()
getLocations
public hudson.util.DescribableList<Location,LocationDescriptor> getLocations()
get
public static PeriodicBackupLink get()
getMessage
public java.lang.String getMessage()
setMessage
public void setMessage(java.lang.String message)
Copyright © 2004-2013. All Rights Reserved.