Class AbstractBackupJob
- java.lang.Object
-
- org.exoplatform.services.jcr.ext.backup.impl.AbstractBackupJob
-
- Direct Known Subclasses:
AbstractFullBackupJob,AbstractIncrementalBackupJob
public abstract class AbstractBackupJob extends Object implements BackupJob
Created by The eXo Platform SAS Date: 05.02.2008- Version:
- $Id: AbstrackBackupJob.java 760 2008-02-07 15:08:07Z pnedonosko $
- Author:
- Peter Nedonosko
-
-
Field Summary
Fields Modifier and Type Field Description protected BackupConfigconfigprotected intidprotected org.exoplatform.services.jcr.core.ManageableRepositoryrepositoryprotected intstateprotected CalendartimeStampprotected URLurlprotected StringworkspaceName
-
Constructor Summary
Constructors Constructor Description AbstractBackupJob()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description voidaddListener(BackupJobListener listener)Adding listener.protected abstract URLcreateStorage()This method is called by run() and resume() Backup implementation knows how to create new storageintgetId()Getting the id of job.intgetState()Getting state of job.URLgetStorageURL()Getting storage URL.protected voidnotifyError(String message, Throwable error)Notify all listeners about an errorprotected voidnotifyListeners()Notify all listeners about the job state changedvoidremoveListener(BackupJobListener listener)Remove listener.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
-
-
Field Detail
-
state
protected volatile int state
-
id
protected int id
-
config
protected BackupConfig config
-
repository
protected org.exoplatform.services.jcr.core.ManageableRepository repository
-
workspaceName
protected String workspaceName
-
timeStamp
protected Calendar timeStamp
-
url
protected URL url
-
-
Method Detail
-
createStorage
protected abstract URL createStorage() throws FileNotFoundException, IOException
This method is called by run() and resume() Backup implementation knows how to create new storage- Returns:
- URL of new storage
- Throws:
FileNotFoundExceptionIOException
-
getStorageURL
public final URL getStorageURL()
Description copied from interface:BackupJobGetting storage URL.- Specified by:
getStorageURLin interfaceBackupJob- Returns:
- URL return the storage URL
- See Also:
BackupJob.getStorageURL()
-
getState
public final int getState()
Description copied from interface:BackupJobGetting state of job.
-
getId
public final int getId()
Description copied from interface:BackupJobGetting the id of job.
-
addListener
public void addListener(BackupJobListener listener)
Description copied from interface:BackupJobAdding listener.- Specified by:
addListenerin interfaceBackupJob- Parameters:
listener- BackupJobListener, the job listener
-
removeListener
public void removeListener(BackupJobListener listener)
Description copied from interface:BackupJobRemove listener.- Specified by:
removeListenerin interfaceBackupJob- Parameters:
listener- BackupJobListener, the job listener
-
notifyListeners
protected void notifyListeners()
Notify all listeners about the job state changed
-
-