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

public class JobWorkspaceRestore extends Thread
Created by The eXo Platform SAS.
Date: 24.02.2009
Version:
$Id: WorkspaceRestore.java 111 2008-11-11 11:11:11Z rainf0x $
Author:
Alex Reshetnyak
  • Field Details

    • RESTORE_STARTED

      public static final int RESTORE_STARTED
      RESTORE_STARTED. The state of start restore.
      See Also:
    • RESTORE_SUCCESSFUL

      public static final int RESTORE_SUCCESSFUL
      RESTORE_SUCCESSFUL. The state of restore successful.
      See Also:
    • RESTORE_FAIL

      public static final int RESTORE_FAIL
      RESTORE_FAIL. The state of restore fail.
      See Also:
    • RESTORE_INITIALIZED

      public static final int RESTORE_INITIALIZED
      RESTORE_STARTED. The state of initialized restore.
      See Also:
    • repositoryName

      protected final String repositoryName
      The destination repository.
    • wEntry

      protected final org.exoplatform.services.jcr.config.WorkspaceEntry wEntry
      The WorkspaceEntry to restored workspace.
    • repositoryService

      protected final org.exoplatform.services.jcr.RepositoryService repositoryService
      The repository service.
    • backupChainLogFile

      protected final File 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 RepositoryService
      backupManager - the BackupManager
      repositoryName - the destination repository
      logFile - the backup chain log
      wEntry - the workspace entry
  • Method Details

    • run

      public void run()
      Specified by:
      run in interface Runnable
      Overrides:
      run in class Thread
    • restore

      protected final void restore() throws Throwable
      Will be restored the workspace.
      Throws:
      Throwable - will be generated the Throwable
    • restoreWorkspace

      protected void restoreWorkspace() throws Throwable
      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 repository
      workspaceName - String, the workspace name
      Throws:
      javax.jcr.RepositoryException - will be generated the RepositoryException
    • getRestoreException

      public Throwable getRestoreException()
      getRestoreException.
      Returns:
      Throwable return the exception of 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
    • getBackupChainLog

      public BackupChainLog getBackupChainLog() throws BackupOperationException
      getBackupChainLog.
      Returns:
      BackupChainLog return the backup chain log for this restore.
      Throws:
      BackupOperationException
    • getRepositoryName

      public String getRepositoryName()
      getRepositoryName.
      Returns:
      String the name of destination repository
    • getWorkspaceName

      public String getWorkspaceName()
      getWorkspaceName.
      Returns:
      String the name of destination workspace
    • getWorkspaceEntry

      public org.exoplatform.services.jcr.config.WorkspaceEntry getWorkspaceEntry()
      getWorkspaceEntry
      Returns:
      WorkspaceEntry