org.jenkinsci.plugins.periodicbackup
Class Storage

java.lang.Object
  extended by hudson.model.AbstractModelObject
      extended by org.jenkinsci.plugins.periodicbackup.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 Summary
Storage()
           
 
Method Summary
static hudson.DescriptorExtensionList<Storage,StorageDescriptor> all()
          This will allow to retrieve the list of plugins at runtime
abstract  void backupAddFile(java.io.File fileToStore)
          Adds a file to an archive.
abstract  void backupStart(java.lang.String tempDirectoryPath, java.lang.String archiveFilenameBase)
          Initializes Storage for the archiving process
abstract  java.lang.Iterable<java.io.File> backupStop()
          Finalizes the archiving process
 StorageDescriptor getDescriptor()
           
 java.lang.String getSearchUrl()
           
abstract  void unarchiveFiles(java.lang.Iterable<java.io.File> archives, java.io.File finalResultDir)
          Extracts backup files from given archives into the temporary directory after successful extraction the archives will be deleted
 
Methods inherited from class hudson.model.AbstractModelObject
getSearch, getSearchIndex, getSearchName, makeSearchIndex, requirePOST, sendError, sendError, sendError, sendError, sendError
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface hudson.model.ModelObject
getDisplayName
 

Constructor Detail

Storage

public Storage()
Method Detail

backupStart

public abstract void backupStart(java.lang.String tempDirectoryPath,
                                 java.lang.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:
PeriodicBackupException - if something goes wrong

backupAddFile

public abstract void backupAddFile(java.io.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:
PeriodicBackupException - if something goes wrong

backupStop

public abstract java.lang.Iterable<java.io.File> backupStop()
                                                     throws org.jenkinsci.plugins.periodicbackup.PeriodicBackupException
Finalizes the archiving process

Returns:
Archive files
Throws:
PeriodicBackupException - if something goes wrong

unarchiveFiles

public abstract void unarchiveFiles(java.lang.Iterable<java.io.File> archives,
                                    java.io.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 java.lang.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


Copyright © 2004-2013. All Rights Reserved.