com.atlassian.studio.svnimport.components
Class SvnDumpFileManager

java.lang.Object
  extended by com.atlassian.studio.svnimport.components.SvnDumpFileManager

public class SvnDumpFileManager
extends Object

User: kalamon Date: 2010-11-10 Time: 14:16:20


Nested Class Summary
static class SvnDumpFileManager.ArgumentException
           
static class SvnDumpFileManager.UndumpException
           
static class SvnDumpFileManager.UndumpingStatus
           
 
Field Summary
static String DUMP_FILES_WEBDAV_SUBDIRECTORY
           
static int REQUIRED_PERMISSION
           
static String STAGING_DIRECTORY_KEY
           
static String STAGING_SVN_REPO_NAME
           
static String STUDIO_SVN_IMPORT_REPO_OWNER_NAME_KEY
           
static String STUDIO_SVN_IMPORT_USE_SUDO_KEY
           
static String WEBDAV_DIRECTORY_KEY
           
 
Constructor Summary
SvnDumpFileManager(com.atlassian.studio.host.common.ThemeProperties themeProperties, ProjectManager projectManager, com.atlassian.sal.api.user.UserManager userManager, com.atlassian.sal.api.message.I18nResolver i18n, com.atlassian.studio.host.common.initialdata.InitialDataService initialDataService, com.atlassian.applinks.core.AppLinksManager appLinksManager, com.atlassian.sal.api.net.RequestFactory<?> requestFactory)
           
 
Method Summary
 void abortUndumping()
           
 void deleteDumpFile(String fileName)
           
 Collection<File> getAvailableDumpFiles()
           
 ExternalCommands.Builder getCommandsBuilder()
           
 int getCurrentRev()
           
 String getCurrentUndumpedFile()
           
 String getLastMessage()
           
 String getLastUndumpedFileName()
           
 String getLastWarningMessage()
           
 int getTotalRevisions()
           
 SvnDumpFileManager.UndumpingStatus getUndumpingStatus()
           
 Collection<String> getUnknownUsers(String svnDumpFileName)
           
 void initiateUndumping(String fileName)
           
 boolean isExistingRepositoryEmpty()
           
 boolean isUndumpingInProgress()
           
 void joinUndumperThread()
           
static void setJustTesting(boolean val)
           
 void stallUndumping()
          /* only used as testing instrumentation - stops the undumping thread at the very beginning of run()
 void stallUndumpingWhileLoadingRevisions()
          /* only used as testing instrumentation - stops the undumping thread at the "revision loaded" listener
 void unstallUndumping()
          /* only used as testing instrumentation - restarts the undumping thread
 void unstallUndumpingWhileLoadingRevisions()
          /* only used as testing instrumentation - restarts the undumping thread
 void waitForUndumperThreadToProcessOneRevision()
          /* only used as testing instrumentation - waits for teh undumping thread to start
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

REQUIRED_PERMISSION

public static int REQUIRED_PERMISSION

WEBDAV_DIRECTORY_KEY

public static final String WEBDAV_DIRECTORY_KEY
See Also:
Constant Field Values

STAGING_DIRECTORY_KEY

public static final String STAGING_DIRECTORY_KEY
See Also:
Constant Field Values

STUDIO_SVN_IMPORT_USE_SUDO_KEY

public static final String STUDIO_SVN_IMPORT_USE_SUDO_KEY
See Also:
Constant Field Values

STUDIO_SVN_IMPORT_REPO_OWNER_NAME_KEY

public static final String STUDIO_SVN_IMPORT_REPO_OWNER_NAME_KEY
See Also:
Constant Field Values

STAGING_SVN_REPO_NAME

public static final String STAGING_SVN_REPO_NAME
See Also:
Constant Field Values

DUMP_FILES_WEBDAV_SUBDIRECTORY

public static final String DUMP_FILES_WEBDAV_SUBDIRECTORY
See Also:
Constant Field Values
Constructor Detail

SvnDumpFileManager

public SvnDumpFileManager(com.atlassian.studio.host.common.ThemeProperties themeProperties,
                          ProjectManager projectManager,
                          com.atlassian.sal.api.user.UserManager userManager,
                          com.atlassian.sal.api.message.I18nResolver i18n,
                          com.atlassian.studio.host.common.initialdata.InitialDataService initialDataService,
                          com.atlassian.applinks.core.AppLinksManager appLinksManager,
                          com.atlassian.sal.api.net.RequestFactory<?> requestFactory)
Method Detail

getCommandsBuilder

public ExternalCommands.Builder getCommandsBuilder()

getAvailableDumpFiles

public Collection<File> getAvailableDumpFiles()
                                       throws InvalidSettingsException
Throws:
InvalidSettingsException

initiateUndumping

public void initiateUndumping(String fileName)
                       throws SvnDumpFileManager.UndumpException,
                              IOException,
                              InterruptedException,
                              CommandExecutor.ExecuteException,
                              SvnDumpFileManager.ArgumentException
Throws:
SvnDumpFileManager.UndumpException
IOException
InterruptedException
CommandExecutor.ExecuteException
SvnDumpFileManager.ArgumentException

isUndumpingInProgress

public boolean isUndumpingInProgress()

abortUndumping

public void abortUndumping()
                    throws SvnDumpFileManager.UndumpException,
                           InterruptedException
Throws:
SvnDumpFileManager.UndumpException
InterruptedException

joinUndumperThread

public void joinUndumperThread()
                        throws InterruptedException
Throws:
InterruptedException

getTotalRevisions

public int getTotalRevisions()

getCurrentRev

public int getCurrentRev()

getCurrentUndumpedFile

public String getCurrentUndumpedFile()

getLastMessage

public String getLastMessage()

getLastWarningMessage

public String getLastWarningMessage()

getLastUndumpedFileName

public String getLastUndumpedFileName()

getUndumpingStatus

public SvnDumpFileManager.UndumpingStatus getUndumpingStatus()

getUnknownUsers

public Collection<String> getUnknownUsers(String svnDumpFileName)
                                   throws IOException,
                                          CommandExecutor.ExecuteException,
                                          InterruptedException,
                                          InvalidSettingsException,
                                          SvnDumpFileManager.UndumpException
Throws:
IOException
CommandExecutor.ExecuteException
InterruptedException
InvalidSettingsException
SvnDumpFileManager.UndumpException

isExistingRepositoryEmpty

public boolean isExistingRepositoryEmpty()
                                  throws InvalidSettingsException,
                                         IOException,
                                         CommandExecutor.ExecuteException,
                                         InterruptedException
Throws:
InvalidSettingsException
IOException
CommandExecutor.ExecuteException
InterruptedException

deleteDumpFile

public void deleteDumpFile(String fileName)
                    throws InvalidSettingsException,
                           SvnDumpFileManager.ArgumentException
Throws:
InvalidSettingsException
SvnDumpFileManager.ArgumentException

stallUndumping

public void stallUndumping()
                    throws IllegalStateException
/* only used as testing instrumentation - stops the undumping thread at the very beginning of run()

Throws:
IllegalStateException - - this variable can only be set in idle state

unstallUndumping

public void unstallUndumping()
/* only used as testing instrumentation - restarts the undumping thread


stallUndumpingWhileLoadingRevisions

public void stallUndumpingWhileLoadingRevisions()
                                         throws IllegalStateException
/* only used as testing instrumentation - stops the undumping thread at the "revision loaded" listener

Throws:
IllegalStateException - - this variable can only be set in idle state

unstallUndumpingWhileLoadingRevisions

public void unstallUndumpingWhileLoadingRevisions()
/* only used as testing instrumentation - restarts the undumping thread


waitForUndumperThreadToProcessOneRevision

public void waitForUndumperThreadToProcessOneRevision()
                                               throws InterruptedException
/* only used as testing instrumentation - waits for teh undumping thread to start

Throws:
InterruptedException - - this can only be called after initiateUndumping()

setJustTesting

public static void setJustTesting(boolean val)


Copyright © 2002-2012 Atlassian. All Rights Reserved.