Class JobWorkspaceRestore
java.lang.Object
java.lang.Thread
org.exoplatform.services.jcr.ext.backup.impl.JobWorkspaceRestore
- All Implemented Interfaces:
Runnable
- Direct Known Subclasses:
JobExistingWorkspaceRestore,JobExistingWorkspaceSameConfigRestore
Created by The eXo Platform SAS.
Date: 24.02.2009
Date: 24.02.2009
- Version:
- $Id: WorkspaceRestore.java 111 2008-11-11 11:11:11Z rainf0x $
- Author:
- Alex Reshetnyak
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Thread
Thread.State, Thread.UncaughtExceptionHandler -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final FileThe file with BackupChainLog for restore.protected final StringThe destination repository.protected final org.exoplatform.services.jcr.RepositoryServiceThe repository service.static final intRESTORE_FAIL.static final intRESTORE_STARTED.static final intRESTORE_STARTED.static final intRESTORE_SUCCESSFUL.protected final org.exoplatform.services.jcr.config.WorkspaceEntryThe WorkspaceEntry to restored workspace.Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY -
Constructor Summary
ConstructorsConstructorDescriptionJobWorkspaceRestore(org.exoplatform.services.jcr.RepositoryService repositoryService, BackupManager backupManager, String repositoryName, File logFile, org.exoplatform.services.jcr.config.WorkspaceEntry wEntry) JobWorkspaceRestore constructor. -
Method Summary
Modifier and TypeMethodDescriptiongetBackupChainLog.getEndTime.getRepositoryName.getRestoreException.getBeginTime.intgetStateRestore.org.exoplatform.services.jcr.config.WorkspaceEntrygetWorkspaceEntrygetWorkspaceName.protected voidremoveWorkspace(org.exoplatform.services.jcr.core.ManageableRepository mr, String workspaceName) Remove workspace.protected final voidrestore()Will be restored the workspace.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, join, join, join, onSpinWait, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, suspend, toString, yield
-
Field Details
-
RESTORE_STARTED
public static final int RESTORE_STARTEDRESTORE_STARTED. The state of start restore.- See Also:
-
RESTORE_SUCCESSFUL
public static final int RESTORE_SUCCESSFULRESTORE_SUCCESSFUL. The state of restore successful.- See Also:
-
RESTORE_FAIL
public static final int RESTORE_FAILRESTORE_FAIL. The state of restore fail.- See Also:
-
RESTORE_INITIALIZED
public static final int RESTORE_INITIALIZEDRESTORE_STARTED. The state of initialized restore.- See Also:
-
repositoryName
The destination repository. -
wEntry
protected final org.exoplatform.services.jcr.config.WorkspaceEntry wEntryThe WorkspaceEntry to restored workspace. -
repositoryService
protected final org.exoplatform.services.jcr.RepositoryService repositoryServiceThe repository service. -
backupChainLogFile
The file with BackupChainLog for restore.
-
-
Constructor Details
-
JobWorkspaceRestore
public JobWorkspaceRestore(org.exoplatform.services.jcr.RepositoryService repositoryService, BackupManager backupManager, String repositoryName, File logFile, org.exoplatform.services.jcr.config.WorkspaceEntry wEntry) JobWorkspaceRestore constructor.- Parameters:
repositoryService- the RepositoryServicebackupManager- the BackupManagerrepositoryName- the destination repositorylogFile- the backup chain logwEntry- the workspace entry
-
-
Method Details
-
run
public void run() -
restore
Will be restored the workspace.- Throws:
Throwable- will be generated the Throwable
-
restoreWorkspace
Will be restored the workspace.- Throws:
Throwable- will be generated the Throwable
-
removeWorkspace
protected void removeWorkspace(org.exoplatform.services.jcr.core.ManageableRepository mr, String workspaceName) throws javax.jcr.RepositoryException Remove workspace.- Parameters:
mr- ManageableRepository, the manageable repositoryworkspaceName- String, the workspace name- Throws:
javax.jcr.RepositoryException- will be generated the RepositoryException
-
getRestoreException
getRestoreException.- Returns:
- Throwable return the exception of 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
-
getBackupChainLog
getBackupChainLog.- Returns:
- BackupChainLog return the backup chain log for this restore.
- Throws:
BackupOperationException
-
getRepositoryName
getRepositoryName.- Returns:
- String the name of destination repository
-
getWorkspaceName
getWorkspaceName.- Returns:
- String the name of destination workspace
-
getWorkspaceEntry
public org.exoplatform.services.jcr.config.WorkspaceEntry getWorkspaceEntry()getWorkspaceEntry- Returns:
- WorkspaceEntry
-