org.gudy.azureus2.ui.swt.views.utils
Class ManagerUtils

java.lang.Object
  extended by org.gudy.azureus2.ui.swt.views.utils.ManagerUtils

public class ManagerUtils
extends Object

Author:
Olivier

Nested Class Summary
static class ManagerUtils.ArchiveCallback
           
static interface ManagerUtils.RunDownloadManager
           
 
Constructor Summary
ManagerUtils()
           
 
Method Summary
static void asyncPause()
           
static void asyncPause(DownloadManager dm)
           
static void asyncPauseForPeriod(int seconds)
           
static void asyncPauseForPeriod(List<DownloadManager> dms, int seconds)
           
static void asyncResume()
           
static void asyncStartAll()
           
static void asyncStop(DownloadManager dm, int stateAfterStopped)
           
static void asyncStopAll()
           
static void asyncStopDelete(DownloadManager dm, int stateAfterStopped, boolean bDeleteTorrent, boolean bDeleteData, AERunnable deleteFailed)
           
static String browse(DiskManagerFileInfo file)
           
static String browse(DiskManagerFileInfo file, boolean anon, boolean launch)
           
static String browse(DownloadManager dm)
           
static String browse(DownloadManager dm, boolean anon, boolean launch)
           
static String browse(DownloadManager dm, DiskManagerFileInfo _file, boolean anon, boolean launch)
           
static boolean browseWebsite(DiskManagerFileInfo file)
           
static boolean browseWebsite(DownloadManager dm)
           
static boolean canFindMoreLikeThis()
           
static DownloadManager[] cleanUp(DownloadManager[] dms)
           
static void findMoreLikeThis(DiskManagerFileInfo file, org.eclipse.swt.widgets.Shell shell)
           
static void findMoreLikeThis(DownloadManager dm, org.eclipse.swt.widgets.Shell shell)
           
static URL getMediaServerContentURL(DiskManagerFileInfo file)
           
static void host(AzureusCore azureus_core, DownloadManager dm)
          Host a DownloadManager on our Tracker.
static boolean isForceStartable(DownloadManager dm)
           
static boolean isPauseable(DownloadManager dm)
           
static boolean isStartable(DownloadManager dm)
           
static boolean isStopable(DownloadManager dm)
           
static boolean isStopped(DownloadManager dm)
           
static void locateFiles(DownloadManager[] dms, DiskManagerFileInfo[][] dm_files, org.eclipse.swt.widgets.Shell shell)
           
static void locateFiles(DownloadManager[] dms, org.eclipse.swt.widgets.Shell shell)
           
static void moveToArchive(List<Download> downloads, ManagerUtils.ArchiveCallback _run_when_complete)
           
static void open(DiskManagerFileInfo file, boolean open_containing_folder_mode)
           
static void open(DownloadManager dm)
          Opens the parent folder of dm's path
static void open(DownloadManager dm, boolean open_containing_folder_mode)
           
static void open(File f)
           
static void open(File f, boolean open_containing_folder_mode)
           
static void pause(DownloadManager dm, org.eclipse.swt.widgets.Shell shell)
           
static void publish(AzureusCore azureus_core, DownloadManager dm)
          Publish a DownloadManager on our Tracker.
static void queue(DownloadManager dm, org.eclipse.swt.widgets.Composite panelNotUsed)
           
static void remove(DownloadManager dm, org.eclipse.swt.widgets.Shell unused_shell, boolean bDeleteTorrent, boolean bDeleteData)
          Deprecated. Use TorrentUtil.removeDownloads(DownloadManager[], AERunnable)
static void remove(DownloadManager dm, org.eclipse.swt.widgets.Shell unused_shell, boolean bDeleteTorrent, boolean bDeleteData, AERunnable deleteFailed)
          Deprecated. Use TorrentUtil.removeDownloads(DownloadManager[], AERunnable)
static void restoreFromArchive(List<DownloadStub> downloads, boolean start, ManagerUtils.ArchiveCallback _run_when_complete)
           
static void run(DownloadManager dm)
           
static void setRunRunnable(ManagerUtils.RunDownloadManager run)
           
static void start(DownloadManager dm)
           
static void stop(DownloadManager dm, org.eclipse.swt.widgets.Shell shell)
           
static void stop(DownloadManager dm, org.eclipse.swt.widgets.Shell shell, int stateAfterStopped)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ManagerUtils

public ManagerUtils()
Method Detail

setRunRunnable

public static void setRunRunnable(ManagerUtils.RunDownloadManager run)

run

public static void run(DownloadManager dm)

open

public static void open(DownloadManager dm)
Opens the parent folder of dm's path

Parameters:
dm - DownloadManager instance

open

public static void open(DownloadManager dm,
                        boolean open_containing_folder_mode)

open

public static void open(DiskManagerFileInfo file,
                        boolean open_containing_folder_mode)

open

public static void open(File f,
                        boolean open_containing_folder_mode)

open

public static void open(File f)

browseWebsite

public static boolean browseWebsite(DiskManagerFileInfo file)

browseWebsite

public static boolean browseWebsite(DownloadManager dm)

browse

public static String browse(DiskManagerFileInfo file)

browse

public static String browse(DiskManagerFileInfo file,
                            boolean anon,
                            boolean launch)

browse

public static String browse(DownloadManager dm)

browse

public static String browse(DownloadManager dm,
                            boolean anon,
                            boolean launch)

browse

public static String browse(DownloadManager dm,
                            DiskManagerFileInfo _file,
                            boolean anon,
                            boolean launch)

getMediaServerContentURL

public static URL getMediaServerContentURL(DiskManagerFileInfo file)

isStartable

public static boolean isStartable(DownloadManager dm)

isStopable

public static boolean isStopable(DownloadManager dm)

isPauseable

public static boolean isPauseable(DownloadManager dm)

isStopped

public static boolean isStopped(DownloadManager dm)

isForceStartable

public static boolean isForceStartable(DownloadManager dm)

host

public static void host(AzureusCore azureus_core,
                        DownloadManager dm)
Host a DownloadManager on our Tracker.

Doesn't require SWT Thread


publish

public static void publish(AzureusCore azureus_core,
                           DownloadManager dm)
Publish a DownloadManager on our Tracker.

Doesn't require SWT Thread


start

public static void start(DownloadManager dm)

queue

public static void queue(DownloadManager dm,
                         org.eclipse.swt.widgets.Composite panelNotUsed)

pause

public static void pause(DownloadManager dm,
                         org.eclipse.swt.widgets.Shell shell)

stop

public static void stop(DownloadManager dm,
                        org.eclipse.swt.widgets.Shell shell)

stop

public static void stop(DownloadManager dm,
                        org.eclipse.swt.widgets.Shell shell,
                        int stateAfterStopped)

remove

public static void remove(DownloadManager dm,
                          org.eclipse.swt.widgets.Shell unused_shell,
                          boolean bDeleteTorrent,
                          boolean bDeleteData)
Deprecated. Use TorrentUtil.removeDownloads(DownloadManager[], AERunnable)


remove

public static void remove(DownloadManager dm,
                          org.eclipse.swt.widgets.Shell unused_shell,
                          boolean bDeleteTorrent,
                          boolean bDeleteData,
                          AERunnable deleteFailed)
Deprecated. Use TorrentUtil.removeDownloads(DownloadManager[], AERunnable)


asyncStopDelete

public static void asyncStopDelete(DownloadManager dm,
                                   int stateAfterStopped,
                                   boolean bDeleteTorrent,
                                   boolean bDeleteData,
                                   AERunnable deleteFailed)

asyncStop

public static void asyncStop(DownloadManager dm,
                             int stateAfterStopped)

asyncPause

public static void asyncPause(DownloadManager dm)

asyncStartAll

public static void asyncStartAll()

asyncStopAll

public static void asyncStopAll()

asyncPause

public static void asyncPause()

asyncPauseForPeriod

public static void asyncPauseForPeriod(int seconds)

asyncResume

public static void asyncResume()

asyncPauseForPeriod

public static void asyncPauseForPeriod(List<DownloadManager> dms,
                                       int seconds)

moveToArchive

public static void moveToArchive(List<Download> downloads,
                                 ManagerUtils.ArchiveCallback _run_when_complete)

restoreFromArchive

public static void restoreFromArchive(List<DownloadStub> downloads,
                                      boolean start,
                                      ManagerUtils.ArchiveCallback _run_when_complete)

cleanUp

public static DownloadManager[] cleanUp(DownloadManager[] dms)

locateFiles

public static void locateFiles(DownloadManager[] dms,
                               org.eclipse.swt.widgets.Shell shell)

locateFiles

public static void locateFiles(DownloadManager[] dms,
                               DiskManagerFileInfo[][] dm_files,
                               org.eclipse.swt.widgets.Shell shell)

canFindMoreLikeThis

public static boolean canFindMoreLikeThis()

findMoreLikeThis

public static void findMoreLikeThis(DownloadManager dm,
                                    org.eclipse.swt.widgets.Shell shell)

findMoreLikeThis

public static void findMoreLikeThis(DiskManagerFileInfo file,
                                    org.eclipse.swt.widgets.Shell shell)