Class JobRepositoryRestore
- java.lang.Object
-
- java.lang.Thread
-
- org.exoplatform.services.jcr.ext.backup.impl.JobRepositoryRestore
-
- All Implemented Interfaces:
Runnable
- Direct Known Subclasses:
JobExistingRepositoryRestore,JobExistingRepositorySameConfigRestore
public class JobRepositoryRestore extends Thread
Created by The eXo Platform SAS.
Date: 2010- Version:
- $Id$
- Author:
- Alex Reshetnyak
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class java.lang.Thread
Thread.State, Thread.UncaughtExceptionHandler
-
-
Field Summary
Fields Modifier and Type Field Description protected static org.exoplatform.services.log.LogLOGThe apache logger.static intREPOSITORY_RESTORE_FAILREPOSITORY_RESTORE_FAIL.static intREPOSITORY_RESTORE_INITIALIZEDREPOSITORY_RESTORE_STARTED.static intREPOSITORY_RESTORE_STARTEDREPOSITORY_RESTORE_STARTED.static intREPOSITORY_RESTORE_SUCCESSFULREPOSITORY_RESTORE_SUCCESSFUL.protected org.exoplatform.services.jcr.config.RepositoryEntryrepositoryEntryprotected org.exoplatform.services.jcr.RepositoryServicerepositoryServiceprotected Map<String,File>workspacesMapping-
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
-
-
Constructor Summary
Constructors Constructor Description JobRepositoryRestore(org.exoplatform.services.jcr.RepositoryService repoService, BackupManagerImpl backupManagerImpl, org.exoplatform.services.jcr.config.RepositoryEntry repositoryEntry, Map<String,File> workspacesMapping, File backupChainLog, boolean removeJobOnceOver)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CalendargetEndTime()getEndTime.RepositoryBackupChainLoggetRepositoryBackupChainLog()GetRepositoryBackupChainLog.org.exoplatform.services.jcr.config.RepositoryEntrygetRepositoryEntry()getRepositoryEntry.StringgetRepositoryName()getRepositoryName.ThrowablegetRestoreException()getRestoreException.CalendargetStartTime()getBeginTime.intgetStateRestore()getStateRestore.protected voidremoveRepository(org.exoplatform.services.jcr.RepositoryService repositoryService, String repositoryName)Remove repository.protected voidrestore()Restore repository.protected voidrestoreRepository()Will be restored the workspace.voidrun()-
Methods inherited from class java.lang.Thread
activeCount, checkAccess, clone, countStackFrames, currentThread, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, onSpinWait, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, suspend, toString, yield
-
-
-
-
Field Detail
-
LOG
protected static final org.exoplatform.services.log.Log LOG
The apache logger.
-
REPOSITORY_RESTORE_STARTED
public static final int REPOSITORY_RESTORE_STARTED
REPOSITORY_RESTORE_STARTED. The state of start restore.- See Also:
- Constant Field Values
-
REPOSITORY_RESTORE_SUCCESSFUL
public static final int REPOSITORY_RESTORE_SUCCESSFUL
REPOSITORY_RESTORE_SUCCESSFUL. The state of restore successful.- See Also:
- Constant Field Values
-
REPOSITORY_RESTORE_FAIL
public static final int REPOSITORY_RESTORE_FAIL
REPOSITORY_RESTORE_FAIL. The state of restore fail.- See Also:
- Constant Field Values
-
REPOSITORY_RESTORE_INITIALIZED
public static final int REPOSITORY_RESTORE_INITIALIZED
REPOSITORY_RESTORE_STARTED. The state of initialized restore.- See Also:
- Constant Field Values
-
repositoryService
protected org.exoplatform.services.jcr.RepositoryService repositoryService
-
repositoryEntry
protected org.exoplatform.services.jcr.config.RepositoryEntry repositoryEntry
-
-
Constructor Detail
-
JobRepositoryRestore
public JobRepositoryRestore(org.exoplatform.services.jcr.RepositoryService repoService, BackupManagerImpl backupManagerImpl, org.exoplatform.services.jcr.config.RepositoryEntry repositoryEntry, Map<String,File> workspacesMapping, File backupChainLog, boolean removeJobOnceOver)
-
-
Method Detail
-
restore
protected final void restore() throws RepositoryRestoreExeptionRestore repository. Provide information about start and finish process.- Throws:
RepositoryRestoreExeption- if exception occurred during restore
-
restoreRepository
protected void restoreRepository() throws RepositoryRestoreExeption, BackupOperationException, ClassNotFoundExceptionWill be restored the workspace.
-
removeRepository
protected void removeRepository(org.exoplatform.services.jcr.RepositoryService repositoryService, String repositoryName) throws javax.jcr.RepositoryException, org.exoplatform.services.jcr.config.RepositoryConfigurationExceptionRemove repository.- Parameters:
repositoryService- RepositoryService, the repository servicerepositoryName- String, the repository name- Throws:
javax.jcr.RepositoryException- will be generated the RepositoryExceptionorg.exoplatform.services.jcr.config.RepositoryConfigurationException
-
getRestoreException
public Throwable getRestoreException()
getRestoreException.- Returns:
- Throwable return the exception of repository restore.
-
getStateRestore
public int getStateRestore()
getStateRestore.- Returns:
- int return state of restore.
-
getStartTime
public Calendar getStartTime()
getBeginTime.- Returns:
- Calendar return the start time of restore
-
getEndTime
public Calendar getEndTime()
getEndTime.- Returns:
- Calendar return the end time of restore
-
getRepositoryName
public String getRepositoryName()
getRepositoryName.- Returns:
- String the name of destination repository
-
getRepositoryBackupChainLog
public RepositoryBackupChainLog getRepositoryBackupChainLog() throws BackupOperationException
GetRepositoryBackupChainLog.- Returns:
- repositoryBackupChainLog
- Throws:
BackupOperationException
-
getRepositoryEntry
public org.exoplatform.services.jcr.config.RepositoryEntry getRepositoryEntry()
getRepositoryEntry.- Returns:
- repositoryBackupChainLog
-
-