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
Created by The eXo Platform SAS.
Date: 2010
Date: 2010
- Version:
- $Id$
- Author:
- Alex Reshetnyak
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Thread
Thread.Builder, Thread.State, Thread.UncaughtExceptionHandler -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final org.exoplatform.services.log.LogThe apache logger.static final intREPOSITORY_RESTORE_FAIL.static final intREPOSITORY_RESTORE_STARTED.static final intREPOSITORY_RESTORE_STARTED.static final intREPOSITORY_RESTORE_SUCCESSFUL.protected org.exoplatform.services.jcr.config.RepositoryEntryprotected org.exoplatform.services.jcr.RepositoryServiceFields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY -
Constructor Summary
ConstructorsConstructorDescriptionJobRepositoryRestore(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
Modifier and TypeMethodDescriptiongetEndTime.GetRepositoryBackupChainLog.org.exoplatform.services.jcr.config.RepositoryEntrygetRepositoryEntry.getRepositoryName.getRestoreException.getBeginTime.intgetStateRestore.protected voidremoveRepository(org.exoplatform.services.jcr.RepositoryService repositoryService, String repositoryName) Remove repository.protected final voidrestore()Restore repository.protected voidWill 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, isVirtual, join, join, join, join, ofPlatform, ofVirtual, onSpinWait, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, sleep, start, startVirtualThread, stop, suspend, threadId, toString, yield
-
Field Details
-
LOG
protected static final org.exoplatform.services.log.Log LOGThe apache logger. -
REPOSITORY_RESTORE_STARTED
public static final int REPOSITORY_RESTORE_STARTEDREPOSITORY_RESTORE_STARTED. The state of start restore.- See Also:
-
REPOSITORY_RESTORE_SUCCESSFUL
public static final int REPOSITORY_RESTORE_SUCCESSFULREPOSITORY_RESTORE_SUCCESSFUL. The state of restore successful.- See Also:
-
REPOSITORY_RESTORE_FAIL
public static final int REPOSITORY_RESTORE_FAILREPOSITORY_RESTORE_FAIL. The state of restore fail.- See Also:
-
REPOSITORY_RESTORE_INITIALIZED
public static final int REPOSITORY_RESTORE_INITIALIZEDREPOSITORY_RESTORE_STARTED. The state of initialized restore.- See Also:
-
repositoryService
protected org.exoplatform.services.jcr.RepositoryService repositoryService -
repositoryEntry
protected org.exoplatform.services.jcr.config.RepositoryEntry repositoryEntry -
workspacesMapping
-
-
Constructor Details
-
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 Details
-
restore
Restore 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.RepositoryConfigurationException Remove 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
-
run
public void run() -
getRestoreException
getRestoreException.- Returns:
- Throwable return the exception of repository restore.
-
getStateRestore
public int getStateRestore()getStateRestore.- Returns:
- int return state of restore.
-
getStartTime
getBeginTime.- Returns:
- Calendar return the start time of restore
-
getEndTime
getEndTime.- Returns:
- Calendar return the end time of restore
-
getRepositoryName
getRepositoryName.- Returns:
- String the name of destination repository
-
getRepositoryBackupChainLog
GetRepositoryBackupChainLog.- Returns:
- repositoryBackupChainLog
- Throws:
BackupOperationException
-
getRepositoryEntry
public org.exoplatform.services.jcr.config.RepositoryEntry getRepositoryEntry()getRepositoryEntry.- Returns:
- repositoryBackupChainLog
-