eXo JCR :: Component :: Extension Service 1.15.1-CP01

org.exoplatform.services.jcr.ext.backup.impl
Class JobRepositoryRestore

java.lang.Object
  extended by java.lang.Thread
      extended by 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
protected static org.exoplatform.services.log.Log LOG
          The apache logger.
static int REPOSITORY_RESTORE_FAIL
          REPOSITORY_RESTORE_FAIL.
static int REPOSITORY_RESTORE_INITIALIZED
          REPOSITORY_RESTORE_STARTED.
static int REPOSITORY_RESTORE_STARTED
          REPOSITORY_RESTORE_STARTED.
static int REPOSITORY_RESTORE_SUCCESSFUL
          REPOSITORY_RESTORE_SUCCESSFUL.
protected  RepositoryEntry repositoryEntry
           
protected  RepositoryService repositoryService
           
protected  Map<String,File> workspacesMapping
           
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
JobRepositoryRestore(RepositoryService repoService, BackupManagerImpl backupManagerImpl, RepositoryEntry repositoryEntry, Map<String,File> workspacesMapping, File backupChainLog, boolean removeJobOnceOver)
           
 
Method Summary
 Calendar getEndTime()
          getEndTime.
 RepositoryBackupChainLog getRepositoryBackupChainLog()
          GetRepositoryBackupChainLog.
 RepositoryEntry getRepositoryEntry()
          getRepositoryEntry.
 String getRepositoryName()
          getRepositoryName.
 Throwable getRestoreException()
          getRestoreException.
 Calendar getStartTime()
          getBeginTime.
 int getStateRestore()
          getStateRestore.
protected  void removeRepository(RepositoryService repositoryService, String repositoryName)
          Remove repository.
protected  void restore()
          Restore repository.
protected  void restoreRepository()
          Will be restored the workspace.
 void run()
          
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, clone, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

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 RepositoryService repositoryService

repositoryEntry

protected RepositoryEntry repositoryEntry

workspacesMapping

protected Map<String,File> workspacesMapping
Constructor Detail

JobRepositoryRestore

public JobRepositoryRestore(RepositoryService repoService,
                            BackupManagerImpl backupManagerImpl,
                            RepositoryEntry repositoryEntry,
                            Map<String,File> workspacesMapping,
                            File backupChainLog,
                            boolean removeJobOnceOver)
Method Detail

restore

protected final void restore()
                      throws RepositoryRestoreExeption
Restore repository. Provide information about start and finish process.

Throws:
RepositoryRestoreExeption - if exception occurred during restore

restoreRepository

protected void restoreRepository()
                          throws RepositoryRestoreExeption,
                                 BackupOperationException,
                                 ClassNotFoundException
Will be restored the workspace.

Throws:
RepositoryRestoreExeption
ClassNotFoundException
BackupOperationException
Throwable - will be generated the Throwable

removeRepository

protected void removeRepository(RepositoryService repositoryService,
                                String repositoryName)
                         throws javax.jcr.RepositoryException,
                                RepositoryConfigurationException
Remove repository.

Parameters:
repositoryService - RepositoryService, the repository service
repositoryName - String, the repository name
Throws:
javax.jcr.RepositoryException - will be generated the RepositoryException
RepositoryConfigurationException

run

public void run()

Specified by:
run in interface Runnable
Overrides:
run in class Thread

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 RepositoryEntry getRepositoryEntry()
getRepositoryEntry.

Returns:
repositoryBackupChainLog

eXo JCR :: Component :: Extension Service 1.15.1-CP01

Copyright © 2013 eXo Platform SAS. All Rights Reserved.