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
  • Field Details

    • 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:
    • REPOSITORY_RESTORE_SUCCESSFUL

      public static final int REPOSITORY_RESTORE_SUCCESSFUL
      REPOSITORY_RESTORE_SUCCESSFUL. The state of restore successful.
      See Also:
    • REPOSITORY_RESTORE_FAIL

      public static final int REPOSITORY_RESTORE_FAIL
      REPOSITORY_RESTORE_FAIL. The state of restore fail.
      See Also:
    • REPOSITORY_RESTORE_INITIALIZED

      public static final int REPOSITORY_RESTORE_INITIALIZED
      REPOSITORY_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

      protected Map<String,File> 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

      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
      RepositoryRestoreExeption
      BackupOperationException
      ClassNotFoundException
    • 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 service
      repositoryName - String, the repository name
      Throws:
      javax.jcr.RepositoryException - will be generated the RepositoryException
      org.exoplatform.services.jcr.config.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 org.exoplatform.services.jcr.config.RepositoryEntry getRepositoryEntry()
      getRepositoryEntry.
      Returns:
      repositoryBackupChainLog