Package com.biglybt.ui.swt.views.utils
Class ManagerUtils
java.lang.Object
com.biglybt.ui.swt.views.utils.ManagerUtils
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
static interface
private static class
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static AsyncDispatcher
private static AsyncDispatcher
private static Map
<DownloadManager, WebPlugin> private static final boolean
private static List
<TextViewerWindow> private static final int
private static final int
private static final int
private static final int
private static final int
private static final int
private static final int
private static final int
private static final long
private static final long
private static final Object
private static ManagerUtils.RunDownloadManager
private static List
<TextViewerWindow> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic void
advancedRename
(DownloadManager[] dms) private static void
advancedRename
(List<DownloadManager> list) static void
allocate
(DownloadManager[] dms) static void
static void
static void
asyncPauseForPeriod
(int seconds) static void
asyncPauseForPeriod
(List<DownloadManager> dms, int seconds) static void
static void
static void
asyncStop
(DownloadManager dm, int stateAfterStopped) static void
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
static String
browse
(DownloadManager dm, boolean anon, boolean launch) static String
browse
(DownloadManager dm, DiskManagerFileInfo _file, boolean anon, boolean launch) static boolean
static boolean
private static int
buildFileMap
(TextViewerWindow viewer, File dir, Map<Long, Set<File>> map, long[] log_details, boolean[] quit) static boolean
static boolean
static boolean
static DownloadManager[]
cleanUp
(DownloadManager[] dms) static void
findMoreLikeThis
(DiskManagerFileInfo file, org.eclipse.swt.widgets.Shell shell) private static void
findMoreLikeThis
(DownloadManager dm, DiskManagerFileInfo file, org.eclipse.swt.widgets.Shell shell) static void
findMoreLikeThis
(DownloadManager dm, org.eclipse.swt.widgets.Shell shell) private static boolean
private static DiskManagerFileInfo
static URL
static void
host
(Core core, DownloadManager dm) Host a DownloadManager on our Tracker.static boolean
static boolean
isForceStartable
(DownloadManager dm, boolean allow_error) static boolean
static boolean
static boolean
isStartable
(DownloadManager dm, boolean allow_error) static boolean
static boolean
static void
locateFiles
(DownloadManager[] dms, DiskManagerFileInfo[][] dm_files, org.eclipse.swt.widgets.Shell shell) private static void
locateFiles
(DownloadManager[] dms, DiskManagerFileInfo[][] dm_files, org.eclipse.swt.widgets.Shell shell, String[] initial_search_roots, int mode, int link_type, int tolerance, boolean include_skipped, boolean test_only) static void
locateFiles
(DownloadManager[] dms, org.eclipse.swt.widgets.Shell shell) private static void
locateFilesSupport
(DownloadManager[] dms, DiskManagerFileInfo[][] dm_files, List<TorrentOpenOptions> torrents, Consumer<File[]> listener, org.eclipse.swt.widgets.Shell shell) static void
locateSaveLocations
(List<TorrentOpenOptions> torrents, org.eclipse.swt.widgets.Shell shell, Consumer<File[]> listener) static void
locateSavePaths
(List<TorrentOpenOptions> torrents, org.eclipse.swt.widgets.Shell shell, String[] roots, Consumer<File[]> listener) private static void
log
(TextViewerWindow viewer, int indent, String str) private static void
logLine
(TextViewerWindow viewer, int indent, String str) static void
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 pathstatic void
open
(DownloadManager dm, boolean open_containing_folder_mode) static void
static void
static void
pause
(DownloadManager dm, org.eclipse.swt.widgets.Shell shell) static void
publish
(Core core, DownloadManager dm) Publish a DownloadManager on our Tracker.static void
queue
(DownloadManager dm) static void
restoreFromArchive
(List<DownloadStub> downloads, boolean start, ManagerUtils.ArchiveCallback _run_when_complete) static void
run
(DownloadManager dm) static void
setFileSkipped
(DiskManagerFileInfo file_info, boolean skipped) Takes account of whether the download has ever been started and if not selects between normal/delete as opposed to normal/do-not-downloadstatic void
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) static void
viewDebug
(DownloadManager[] dms) static void
viewLinks
(DownloadManager[] dms)
-
Field Details
-
run
-
browse_plugins
-
alloc_dispatcher
-
async
-
LOCATE_MODE_LINK
private static final int LOCATE_MODE_LINK- See Also:
-
LOCATE_MODE_COPY
private static final int LOCATE_MODE_COPY- See Also:
-
LOCATE_MODE_MOVE
private static final int LOCATE_MODE_MOVE- See Also:
-
LOCATE_MODE_PIECE
private static final int LOCATE_MODE_PIECE- See Also:
-
LOCATE_MODE_RELOCATE
private static final int LOCATE_MODE_RELOCATE- See Also:
-
LOCATE_MODE_LINK_BLANK
private static final int LOCATE_MODE_LINK_BLANK- See Also:
-
LOCATE_MODE_LINK_INTERNAL
private static final int LOCATE_MODE_LINK_INTERNAL- See Also:
-
LOCATE_MODE_LINK_HARD
private static final int LOCATE_MODE_LINK_HARD- See Also:
-
lf_windows
-
sp_windows
-
lf_reuse
private static final boolean lf_reuse -
LOG_TICK_DOT_MIN
private static final long LOG_TICK_DOT_MIN- See Also:
-
LOG_TICK_DOT_MAX
private static final long LOG_TICK_DOT_MAX- See Also:
-
LOW_RES_RECHECK_KEY
-
-
Constructor Details
-
ManagerUtils
public ManagerUtils()
-
-
Method Details
-
setRunRunnable
-
run
-
open
Opens the parent folder of dm's path- Parameters:
dm
- DownloadManager instance
-
open
-
open
-
open
-
open
-
getBrowseAnon
-
getBrowseHomePage
-
browseWebsite
-
browseWebsite
-
browse
-
browse
-
browse
-
browse
-
browse
public static String browse(DownloadManager dm, DiskManagerFileInfo _file, boolean anon, boolean launch) -
getMediaServerContentURL
-
isStartable
-
isStartable
-
isStopable
-
isPauseable
-
isStopped
-
isForceStartable
-
isForceStartable
-
host
Host a DownloadManager on our Tracker.Doesn't require SWT Thread
-
publish
Publish a DownloadManager on our Tracker.Doesn't require SWT Thread
-
start
-
canAllocate
-
allocate
-
queue
-
pause
-
stop
-
stop
public static void stop(DownloadManager dm, org.eclipse.swt.widgets.Shell shell, int stateAfterStopped) -
asyncStopDelete
public static void asyncStopDelete(DownloadManager dm, int stateAfterStopped, boolean bDeleteTorrent, boolean bDeleteData, AERunnable deleteFailed) -
asyncStop
-
asyncPause
-
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
-
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
-
locateFiles
-
locateFiles
public static void locateFiles(DownloadManager[] dms, DiskManagerFileInfo[][] dm_files, org.eclipse.swt.widgets.Shell shell) -
locateFilesSupport
private static void locateFilesSupport(DownloadManager[] dms, DiskManagerFileInfo[][] dm_files, List<TorrentOpenOptions> torrents, Consumer<File[]> listener, org.eclipse.swt.widgets.Shell shell) -
locateFiles
private static void locateFiles(DownloadManager[] dms, DiskManagerFileInfo[][] dm_files, org.eclipse.swt.widgets.Shell shell, String[] initial_search_roots, int mode, int link_type, int tolerance, boolean include_skipped, boolean test_only) -
locateSavePaths
public static void locateSavePaths(List<TorrentOpenOptions> torrents, org.eclipse.swt.widgets.Shell shell, String[] roots, Consumer<File[]> listener) -
locateSaveLocations
public static void locateSaveLocations(List<TorrentOpenOptions> torrents, org.eclipse.swt.widgets.Shell shell, Consumer<File[]> listener) -
logLine
-
log
-
buildFileMap
-
canFindMoreLikeThis
public static boolean canFindMoreLikeThis() -
findMoreLikeThis
-
findMoreLikeThis
-
findMoreLikeThis
private static void findMoreLikeThis(DownloadManager dm, DiskManagerFileInfo file, org.eclipse.swt.widgets.Shell shell) -
setFileSkipped
Takes account of whether the download has ever been started and if not selects between normal/delete as opposed to normal/do-not-download- Parameters:
file_info
-skipped
-
-
canLowResourceRecheck
-
lowResourceRecheck
-
advancedRename
-
advancedRename
-
viewLinks
-
viewDebug
-