Class JobWorkspaceRestore

    • Field Detail

      • RESTORE_STARTED

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

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

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

        public static final int RESTORE_INITIALIZED
        RESTORE_STARTED. The state of initialized restore.
        See Also:
        Constant Field Values
      • 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 Detail

      • 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 Detail

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