Class AbstractBackupJob
java.lang.Object
org.exoplatform.services.jcr.ext.backup.impl.AbstractBackupJob
- Direct Known Subclasses:
AbstractFullBackupJob,AbstractIncrementalBackupJob
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
FieldsModifier and TypeFieldDescriptionprotected BackupConfigprotected intprotected org.exoplatform.services.jcr.core.ManageableRepositoryprotected intprotected Calendarprotected URLprotected String -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddListener(BackupJobListener listener) Adding listener.protected abstract URLThis method is called by run() and resume() Backup implementation knows how to create new storagefinal intgetId()Getting the id of job.final intgetState()Getting state of job.final URLGetting storage URL.protected voidnotifyError(String message, Throwable error) Notify all listeners about an errorprotected voidNotify 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 Details
-
state
protected volatile int state -
id
protected int id -
config
-
repository
protected org.exoplatform.services.jcr.core.ManageableRepository repository -
workspaceName
-
timeStamp
-
url
-
-
Constructor Details
-
AbstractBackupJob
public AbstractBackupJob()
-
-
Method Details
-
createStorage
This method is called by run() and resume() Backup implementation knows how to create new storage- Returns:
- URL of new storage
- Throws:
FileNotFoundExceptionIOException
-
getStorageURL
Description copied from interface:BackupJobGetting storage URL.- Specified by:
getStorageURLin interfaceBackupJob- Returns:
- URL return the storage URL
- See Also:
-
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
Description copied from interface:BackupJobAdding listener.- Specified by:
addListenerin interfaceBackupJob- Parameters:
listener- BackupJobListener, the job listener
-
removeListener
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 -
notifyError
Notify all listeners about an error- Parameters:
error- - Throwable instance
-